diff --git a/lib/external/libwolv b/lib/external/libwolv index 76f8317e8..b81b21112 160000 --- a/lib/external/libwolv +++ b/lib/external/libwolv @@ -1 +1 @@ -Subproject commit 76f8317e8e7c761879a34227bed22a4e647ea353 +Subproject commit b81b211122d235f86c6b59bdb91436e8c9a603c1 diff --git a/lib/libimhex/CMakeLists.txt b/lib/libimhex/CMakeLists.txt index 16420d780..349933d12 100644 --- a/lib/libimhex/CMakeLists.txt +++ b/lib/libimhex/CMakeLists.txt @@ -69,4 +69,4 @@ elseif (APPLE) endif () target_link_libraries(libimhex PRIVATE ${FMT_LIBRARIES}) -target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} libpl intervaltree ${MINIAUDIO_LIBRARIES} libwolv-utils libwolv-io libwolv-hash) \ No newline at end of file +target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} libpl intervaltree ${MINIAUDIO_LIBRARIES} libwolv-utils libwolv-io libwolv-hash libwolv-net) \ No newline at end of file diff --git a/lib/libimhex/include/hex.hpp b/lib/libimhex/include/hex.hpp index 5e7f4a422..4a1d299ef 100644 --- a/lib/libimhex/include/hex.hpp +++ b/lib/libimhex/include/hex.hpp @@ -1,7 +1,4 @@ #pragma once #include -#include - -constexpr static const auto ImHexApiURL = "https://api.werwolv.net/imhex"; -constexpr static const auto GitHubApiURL = "https://api.github.com/repos/WerWolv/ImHex"; +#include \ No newline at end of file diff --git a/lib/libimhex/include/hex/api_urls.hpp b/lib/libimhex/include/hex/api_urls.hpp new file mode 100644 index 000000000..5b9160820 --- /dev/null +++ b/lib/libimhex/include/hex/api_urls.hpp @@ -0,0 +1,2 @@ +constexpr static const auto ImHexApiURL = "https://api.werwolv.net/imhex"; +constexpr static const auto GitHubApiURL = "https://api.github.com/repos/WerWolv/ImHex"; diff --git a/main/source/init/tasks.cpp b/main/source/init/tasks.cpp index 4e83b0797..e1fbd6916 100644 --- a/main/source/init/tasks.cpp +++ b/main/source/init/tasks.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include #include diff --git a/plugins/builtin/include/content/providers/gdb_provider.hpp b/plugins/builtin/include/content/providers/gdb_provider.hpp index 04abfe94d..30322be66 100644 --- a/plugins/builtin/include/content/providers/gdb_provider.hpp +++ b/plugins/builtin/include/content/providers/gdb_provider.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include #include @@ -53,7 +53,7 @@ namespace hex::plugin::builtin { std::variant queryInformation(const std::string &category, const std::string &argument) override; protected: - wolv::util::Socket m_socket; + wolv::net::SocketClient m_socket; std::string m_ipAddress; int m_port = 0; diff --git a/plugins/builtin/source/content/providers/gdb_provider.cpp b/plugins/builtin/source/content/providers/gdb_provider.cpp index 81cdacaaa..e1afc1bcd 100644 --- a/plugins/builtin/source/content/providers/gdb_provider.cpp +++ b/plugins/builtin/source/content/providers/gdb_provider.cpp @@ -56,15 +56,15 @@ namespace hex::plugin::builtin { } - void sendAck(wolv::util::Socket &socket) { + void sendAck(wolv::net::SocketClient &socket) { socket.writeString("+"); } - void continueExecution(wolv::util::Socket &socket) { + void continueExecution(wolv::net::SocketClient &socket) { socket.writeString(createPacket("vCont;c")); } - std::vector readMemory(wolv::util::Socket &socket, u64 address, size_t size) { + std::vector readMemory(wolv::net::SocketClient &socket, u64 address, size_t size) { std::string packet = createPacket(hex::format("m{:X},{:X}", address, size)); socket.writeString(packet); @@ -88,7 +88,7 @@ namespace hex::plugin::builtin { return data; } - void writeMemory(wolv::util::Socket &socket, u64 address, const void *buffer, size_t size) { + void writeMemory(wolv::net::SocketClient &socket, u64 address, const void *buffer, size_t size) { std::vector bytes(size); std::memcpy(bytes.data(), buffer, size); @@ -101,7 +101,7 @@ namespace hex::plugin::builtin { auto receivedPacket = socket.readString(6); } - bool enableNoAckMode(wolv::util::Socket &socket) { + bool enableNoAckMode(wolv::net::SocketClient &socket) { socket.writeString(createPacket("QStartNoAckMode")); auto ack = socket.readString(1); @@ -245,6 +245,7 @@ namespace hex::plugin::builtin { } bool GDBProvider::open() { + this->m_socket = wolv::net::SocketClient(wolv::net::SocketClient::Type::TCP); this->m_socket.connect(this->m_ipAddress, this->m_port); if (!gdb::enableNoAckMode(this->m_socket)) { this->m_socket.disconnect(); diff --git a/plugins/builtin/source/content/views/view_store.cpp b/plugins/builtin/source/content/views/view_store.cpp index 41ac2c131..71d48bbfe 100644 --- a/plugins/builtin/source/content/views/view_store.cpp +++ b/plugins/builtin/source/content/views/view_store.cpp @@ -1,5 +1,6 @@ #include "content/views/view_store.hpp" -#include "hex/api/theme_manager.hpp" +#include +#include #include diff --git a/tests/helpers/source/net.cpp b/tests/helpers/source/net.cpp index 8b4e06c47..77acdea09 100644 --- a/tests/helpers/source/net.cpp +++ b/tests/helpers/source/net.cpp @@ -1,5 +1,6 @@ #include +#include #include #include #include