Skip to content

Commit

Permalink
DELIA-66644 : Implement ComRPC in Network and WiFi Plugin to communic…
Browse files Browse the repository at this point in the history
…ate with NetworkManager

Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
  • Loading branch information
karuna2git committed Oct 31, 2024
1 parent 99ad0a7 commit 44e5028
Show file tree
Hide file tree
Showing 26 changed files with 2,680 additions and 2,526 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ set(PLUGIN_NETWORKMANAGER_STARTUPORDER "55" CACHE STRING "To configure startup o
set(PLUGIN_LEGACY_NW_STARTUPORDER "56" CACHE STRING "To configure startup order of Legacy Network plugin")
set(PLUGIN_LEGACY_WIFI_STARTUPORDER "56" CACHE STRING "To configure startup order of Legacy WiFi plugin")

set(PLUGIN_BUILD_REFERENCE ${PROJECT_VERSION} CACHE STRING "To configure startup order of Legacy WiFi plugin")
add_definitions(-DPLUGIN_BUILD_REFERENCE=${PLUGIN_BUILD_REFERENCE})

if(ENABLE_GNOME_NETWORKMANAGER)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(LIBNM REQUIRED libnm)
Expand All @@ -45,6 +48,7 @@ endif ()
message("Setup ProxyStub for INetworkManager.h")
find_package(CompileSettingsDebug CONFIG REQUIRED)
find_package(ProxyStubGenerator REQUIRED)
find_package(JsonGenerator REQUIRED)

set(ProxyStubGenerator_DIR ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/tools/cmake ${ProxyStubGenerator_DIR})

Expand All @@ -55,6 +59,9 @@ endif()
message("The Search path is, ${GENERATOR_SEARCH_PATH}")
ProxyStubGenerator(INPUT "${CMAKE_CURRENT_SOURCE_DIR}" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH})

set(JSON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/NetworkManager.json")
JsonGenerator(CODE INPUT ${JSON_FILE} OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH} CPPIFDIR "${CMAKE_CURRENT_SOURCE_DIR}" DOCS)

file(GLOB PROXY_STUB_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/generated/ProxyStubs*.cpp")

message("Setup ${PROJECT_NAME} v${PROJECT_VERSION}")
Expand Down
191 changes: 96 additions & 95 deletions INetworkManager.h

Large diffs are not rendered by default.

810 changes: 456 additions & 354 deletions LegacyPlugin_NetworkAPIs.cpp

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion LegacyPlugin_NetworkAPIs.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "Module.h"
#include "core/Link.h"
#include "NetworkManagerTimer.h"
#include "INetworkManager.h"

namespace WPEFramework {
namespace Plugin {
Expand All @@ -31,8 +32,10 @@ namespace WPEFramework {
void registerLegacyMethods(void);
void unregisterLegacyMethods(void);
void subscribeToEvents(void);
static std::string getInterfaceMapping(const std::string &interface);
void activatePrimaryPlugin();
uint32_t internalGetIPSettings(const JsonObject& parameters, JsonObject& response);
string getInterfaceNameToType(const string & interface);
string getInterfaceTypeToName(const string & interface);

/* Methods */
uint32_t getInterfaces(const JsonObject& parameters, JsonObject& response);
Expand Down Expand Up @@ -84,6 +87,7 @@ namespace WPEFramework {
private:
PluginHost::IShell* m_service;
std::shared_ptr<WPEFramework::JSONRPC::SmartLinkType<WPEFramework::Core::JSON::IElement>> m_networkmanager;
//WPEFramework::Exchange::INetworkManager* m_nwmgr;
string m_defaultInterface;
NetworkManagerTimer m_timer;

Expand Down
Loading

0 comments on commit 44e5028

Please sign in to comment.