Skip to content

Commit

Permalink
know ssid added
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuhammedrafi committed Oct 4, 2024
1 parent b19a37a commit 1cbd1f9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 64 deletions.
62 changes: 0 additions & 62 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ if(ENABLE_GNOME_NETWORKMANAGER)
GnomeProxy/NetworkManagerGnomeUtils.cpp
GnomeProxy/NetworkManagerGnomeClient.cpp
)
target_include_directories(${MODULE_NAME} PRIVATE ${GLIB_INCLUDE_DIRS} ${LIBNM_INCLUDE_DIRS})
target_include_directories(${MODULE_NAME} PRIVATE ${GLIB_INCLUDE_DIRS} ${LIBNM_INCLUDE_DIRS} GnomeProxy)
target_link_libraries(${MODULE_NAME} PRIVATE ${GLIB_LIBRARIES} ${GIO_LIBRARIES})
else()
target_sources(${MODULE_NAME} PRIVATE NetworkManagerRDKProxy.cpp)
Expand Down
20 changes: 19 additions & 1 deletion NetworkManagerGnomeProxy.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "NetworkManagerImplementation.h"
#include "NetworkManagerGnomeClient.h"

using namespace WPEFramework;
using namespace WPEFramework::Plugin;
Expand All @@ -9,6 +10,7 @@ namespace WPEFramework
namespace Plugin
{
NetworkManagerImplementation* _instance = nullptr;
NetworkManagerClient* gnomeClient = nullptr;
void NetworkManagerInternalEventHandler(const char *owner, int eventId, void *data, size_t len)
{
return;
Expand All @@ -17,6 +19,7 @@ namespace WPEFramework
void NetworkManagerImplementation::platform_init()
{
::_instance = this;
gnomeClient = NetworkManagerClient::getInstance();
}

uint32_t NetworkManagerImplementation::GetAvailableInterfaces (Exchange::INetworkManager::IInterfaceDetailsIterator*& interfacesItr/* @out */)
Expand Down Expand Up @@ -66,7 +69,22 @@ namespace WPEFramework

uint32_t NetworkManagerImplementation::GetKnownSSIDs(IStringIterator*& ssids /* @out */)
{
return Core::ERROR_NONE;
uint32_t rc = Core::ERROR_RPC_CALL_FAILED;
std::list<string> ssidList;
if(gnomeClient->getKnownSSIDs(ssidList))
{
if (!ssidList.empty())
{
ssids = Core::Service<RPC::StringIterator>::Create<RPC::IStringIterator>(ssidList);
rc = Core::ERROR_NONE;
}
else
{
NMLOG_ERROR("know ssids not found !");
rc = Core::ERROR_GENERAL;
}
}
return rc;
}

uint32_t NetworkManagerImplementation::AddToKnownSSIDs(const WiFiConnectTo& ssid /* @in */)
Expand Down

0 comments on commit 1cbd1f9

Please sign in to comment.