Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
karuna2git authored Jan 23, 2025
2 parents 3697fb1 + 5e78de9 commit c467ea8
Show file tree
Hide file tree
Showing 25 changed files with 2,184 additions and 897 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/gnome_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Configure cache
if: ${{ !env.ACT }}
id: cache
uses: actions/cache@v3
with:
path: |
build/Thunder
build/ThunderInterfaces
build/ThunderTools
install
!install/etc/WPEFramework/plugins
!install/usr/lib/wpeframework/plugins
key: ${{ runner.os }}-${{ env.THUNDER_REF }}

- name: Install packages
run: |
sudo apt update
Expand All @@ -46,14 +32,12 @@ jobs:
cmake-version: '3.16.x'

- name: Checkout thunder repositories
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/rdkcentral/ThunderTools ThunderTools --branch ${{ env.THUNDER_REF }}
git clone https://github.com/rdkcentral/Thunder Thunder --branch ${{ env.THUNDER_REF }}
git clone https://github.com/rdkcentral/ThunderInterfaces ThunderInterfaces --branch ${{ env.THUNDER_REF }}
- name: Build ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake
-S "${{github.workspace}}/ThunderTools" -B build/ThunderTools
Expand All @@ -64,7 +48,6 @@ jobs:
cmake --build build/ThunderTools --target install -j8
- name: Build Thunder
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake
-S "${{github.workspace}}/Thunder" -B build/Thunder
Expand All @@ -77,7 +60,6 @@ jobs:
cmake --build build/Thunder --target install -j8
- name: Build ThunderInterfaces
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake
-S "${{github.workspace}}/ThunderInterfaces" -B build/ThunderInterfaces
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ 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)
pkg_check_modules(GLIB REQUIRED gio-2.0)
else()
find_package(IARMBus REQUIRED)
endif ()
Expand Down
5 changes: 0 additions & 5 deletions INetworkManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,6 @@ namespace WPEFramework
/* @brief Get Authentication URL if the device is behind Captive Portal */
virtual uint32_t GetCaptivePortalURI(string &uri/* @out */) const = 0;

/* @brief Start The Internet Connectivity Monitoring */
virtual uint32_t StartConnectivityMonitoring(const uint32_t interval /* @in */) = 0;
/* @brief Stop The Internet Connectivity Monitoring */
virtual uint32_t StopConnectivityMonitoring(void) const = 0;

/* @brief Get the Public IP used for external world communication */
virtual uint32_t GetPublicIP (string& interface /* @inout */, string &ipversion /* @inout */, string& ipaddress /* @out */) = 0;

Expand Down
26 changes: 2 additions & 24 deletions LegacyPlugin_NetworkAPIs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,19 +817,7 @@ const string CIDR_PREFIXES[CIDR_NETMASK_IP_LEN+1] = {
uint32_t Network::startConnectivityMonitoring(const JsonObject& parameters, JsonObject& response)
{
LOG_INPARAM();
uint32_t rc = Core::ERROR_GENERAL;
uint32_t interval = parameters["interval"].Number();

NMLOG_DEBUG("connectivity interval = %d", interval);
auto _nwmgr = m_service->QueryInterfaceByCallsign<Exchange::INetworkManager>(NETWORK_MANAGER_CALLSIGN);
if (_nwmgr)
rc = _nwmgr->StartConnectivityMonitoring(interval);
else
rc = Core::ERROR_UNAVAILABLE;

if(_nwmgr)
_nwmgr->Release();

uint32_t rc = Core::ERROR_NONE;
returnJson(rc);
}

Expand Down Expand Up @@ -857,17 +845,7 @@ const string CIDR_PREFIXES[CIDR_NETMASK_IP_LEN+1] = {
uint32_t Network::stopConnectivityMonitoring(const JsonObject& parameters, JsonObject& response)
{
LOG_INPARAM();
uint32_t rc = Core::ERROR_GENERAL;

auto _nwmgr = m_service->QueryInterfaceByCallsign<Exchange::INetworkManager>(NETWORK_MANAGER_CALLSIGN);
if (_nwmgr)
{
rc = _nwmgr->StopConnectivityMonitoring();
_nwmgr->Release();
}
else
rc = Core::ERROR_UNAVAILABLE;

uint32_t rc = Core::ERROR_NONE;
returnJson(rc);
}

Expand Down
2 changes: 0 additions & 2 deletions NetworkManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ namespace WPEFramework
uint32_t SetConnectivityTestEndpoints(const JsonObject& parameters, JsonObject& response);
uint32_t IsConnectedToInternet(const JsonObject& parameters, JsonObject& response);
uint32_t GetCaptivePortalURI(const JsonObject& parameters, JsonObject& response);
uint32_t StartConnectivityMonitoring(const JsonObject& parameters, JsonObject& response);
uint32_t StopConnectivityMonitoring(const JsonObject& parameters, JsonObject& response);
uint32_t GetPublicIP(const JsonObject& parameters, JsonObject& response);
uint32_t Ping(const JsonObject& parameters, JsonObject& response);
uint32_t Trace(const JsonObject& parameters, JsonObject& response);
Expand Down
100 changes: 25 additions & 75 deletions NetworkManager.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@
"example": "30"
},
"ssid":{
"summary": "The paired SSID",
"summary": "The WiFi SSID Name",
"type": "string",
"example": "123412341234"
"example": "myHomeSSID"
},
"bssid":{
"summary": "The paired BSSID",
"summary": "The BSSID of given SSID",
"type": "string",
"example": "ff:ff:ff:ff:ff:ff"
"example": "AA:BB:CC:DD:EE:FF"
},
"passphrase": {
"summary": "The access point password",
Expand All @@ -128,10 +128,15 @@
"example": 6
},
"strength":{
"summary": "The RSSI value in dBm",
"summary": "The Signal RSSI value in dBm",
"type": "string",
"example": "-27.000000"
},
"quality":{
"summary": "Signal strength Quality",
"type": "string",
"example": "Excellent"
},
"frequency":{
"summary": "The supported frequency for this SSID in GHz",
"type": "string",
Expand Down Expand Up @@ -334,9 +339,7 @@
"type": "object",
"properties": {
"interface": {
"summary": "Disable the specified interface",
"type": "string",
"example": "wlan0"
"$ref": "#/definitions/interface"
}
},
"required": [
Expand Down Expand Up @@ -552,9 +555,10 @@
"type":"object",
"properties": {
"endpoints": {
"summary": "",
"summary": "A list of endpoint URLs used",
"type": "array",
"items": {
"summary": "The endpoint URL",
"type": "string",
"example": "http://clients3.google.com/generate_204"
}
Expand All @@ -578,6 +582,7 @@
"summary": "A list of endpoints to test",
"type": "array",
"items": {
"summary": "The endpoint URL",
"type": "string",
"example": "http://clients3.google.com/generate_204"
}
Expand Down Expand Up @@ -665,49 +670,6 @@
]
}
},
"StartConnectivityMonitoring":{
"summary": "Enable a continuous monitoring of internet connectivity with heart beat interval thats given. If the monitoring is already happening, it will be restarted with new given interval. When the interval is not passed, it will be 60s by default.",
"events":{
"onInternetStatusChange" : "Triggered when internet connection state changed."
},
"params": {
"type":"object",
"properties": {
"interval": {
"summary": "Interval in sec.",
"type": "number",
"example": "30"
}
},
"required": [
]
},
"result": {
"type": "object",
"properties": {
"success":{
"$ref": "#/definitions/success"
}
},
"required": [
"success"
]
}
},
"StopConnectivityMonitoring":{
"summary": "Stops the connectivity monitoring",
"result": {
"type": "object",
"properties": {
"success":{
"$ref": "#/definitions/success"
}
},
"required": [
"success"
]
}
},
"GetPublicIP":{
"summary": "Gets the internet/public IP Address of the device.",
"params": {
Expand Down Expand Up @@ -915,6 +877,7 @@
"summary": "The list of SSIDs to be scanned.",
"type": "array",
"items": {
"summary": "The SSID to scan.",
"type": "string",
"example": "Xfinity Mobile"
}
Expand Down Expand Up @@ -955,9 +918,10 @@
"type": "object",
"properties": {
"ssids": {
"summary": "Known SSIDS",
"summary": "A list of known SSIDs",
"type": "array",
"items": {
"summary": "The WiFi SSID Name",
"type": "string",
"example": "Xfinity_Guest"
}
Expand Down Expand Up @@ -1263,9 +1227,7 @@
"$ref": "#/definitions/strength"
},
"quality":{
"summary": "Signal strength Quality",
"type": "string",
"example": "Excellent"
"$ref": "#/definitions/quality"
},
"success":{
"$ref": "#/definitions/success"
Expand Down Expand Up @@ -1514,24 +1476,18 @@
"type":"object",
"properties": {
"ssid":{
"summary": "ssid",
"summary": "Discovered SSID",
"type": "string",
"example": "myAP-2.4"
},
"security":{
"summary": "security",
"type": "integer",
"example": 6
"$ref": "#/definitions/security"
},
"strength":{
"summary": "strength",
"type": "string",
"example": "-27.000000"
"$ref": "#/definitions/strength"
},
"frequency":{
"summary": "frequency",
"type": "string",
"example": "2.442000"
"$ref": "#/definitions/frequency"
}
},
"required": [
Expand Down Expand Up @@ -1573,19 +1529,13 @@
"type": "object",
"properties": {
"ssid":{
"summary": "Signal Strength changed SSID",
"type": "string",
"example": "home-new_123"
"$ref": "#/definitions/ssid"
},
"strength":{
"summary": "Signal Strength",
"type": "string",
"example": "-27.000000"
"$ref": "#/definitions/strength"
},
"quality":{
"summary": "Signal quality",
"type": "string",
"example": "Excellent"
"$ref": "#/definitions/quality"
}
},
"required": [
Expand Down
Loading

0 comments on commit c467ea8

Please sign in to comment.