Skip to content

Commit

Permalink
Merge branch 'WebPlatformForEmbedded:master' into development/depreca…
Browse files Browse the repository at this point in the history
…ted-2.42-api
  • Loading branch information
VeithMetro authored Nov 30, 2023
2 parents 35102b6 + 9a6d1ad commit af552e8
Show file tree
Hide file tree
Showing 18 changed files with 89 additions and 34 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ if(ENABLE_STRICT_COMPILER_SETTINGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_STRICT_COMPILER_SETTINGS}")
endif()

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

if(PLUGIN_DEVICEIDENTIFICATION)
add_subdirectory(DeviceIdentification)
endif()
Expand Down
4 changes: 4 additions & 0 deletions DeviceIdentification/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ set(PLUGIN_DEVICEIDENTIFICATION_MODE "Off" CACHE STRING "Controls if the plugin
set(PLUGIN_DEVICEIDENTIFICATION_INTERFACE_NAME "eth0" CACHE STRING "Ethernet Card name which has to be associated for the Raw Device Id creation")
option(PLUGIN_DEVICEIDENTIFICATION_USE_MFR "Get device identification details using MFR library" OFF)

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(NEXUS QUIET)
find_package(BCM_HOST QUIET)
find_package(MFRFWLibs QUIET)
Expand Down
4 changes: 4 additions & 0 deletions DeviceInfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")

set(PLUGIN_DEVICEINFO_AUTOSTART "true" CACHE STRING "Automatically start DeviceInfo plugin")

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions DisplayInfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ if(PLUGIN_DISPLAYINFO_OUTOFPROCESS STREQUAL "true")
unset(PLUGIN_DISPLAYINFO_OUTOFPROCESS CACHE)
endif()

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions LocationSync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ set(PLUGIN_LOCATIONSYNC_AUTOSTART "true" CACHE STRING "Automatically start Locat
set(PLUGIN_LOCATIONSYNC_URI "location.webplatformforembedded.org" CACHE STRING "URI to request the location information")
set(PLUGIN_LOCATIONSYNC_OVERRIDE_TIMEZONE CACHE STRING "Override Timezone value")

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions MessageControl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ set(PLUGIN_MESSAGECONTROL_REMOTE "false" CACHE STRING "Remote binding details en
set(PLUGIN_MESSAGECONTROL_PORT "0" CACHE STRING "PORT address")
set(PLUGIN_MESSAGECONTROL_BINDING "0.0.0.0" CACHE STRING "Binding IP Address")

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(${NAMESPACE}Messaging REQUIRED)
Expand Down
55 changes: 25 additions & 30 deletions MessageControl/MessageControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,41 +239,36 @@ namespace Plugin {

void Dispatch()
{
std::vector<uint32_t> attaching;
std::vector<uint32_t> detaching;

_adminLock.Lock();

bool done = false;

while (done == false) {
Observers::iterator index = _observing.begin();

while (done == false) {
if (index->second == state::ATTACHING) {
const uint32_t id = index->first;
index->second = state::OBSERVING;
_adminLock.Unlock();
_parent.Attach(id);
_adminLock.Lock();
break;
}
else if (index->second == state::DETACHING) {
const uint32_t id = index->first;
_observing.erase(index);
_adminLock.Unlock();
_parent.Detach(id);
_adminLock.Lock();
break;
}
else {
index++;

if (index == _observing.end()) {
done = true;
}
}
Observers::iterator index = _observing.begin();

while (index != _observing.end()) {
if (index->second == state::ATTACHING) {
attaching.emplace_back(index->first);
index->second = state::OBSERVING;
index++;
}
else if (index->second == state::DETACHING) {
detaching.emplace_back(index->first);
index = _observing.erase(index);
}
else {
index++;
}
}

_adminLock.Unlock();

for (const uint32_t& id : detaching) {
_parent.Detach(id);
}
for (const uint32_t& id : attaching) {
_parent.Attach(id);
}
}

private:
Expand Down
4 changes: 4 additions & 0 deletions Messenger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ if(PLUGIN_MESSENGER_OUTOFPROCESS STREQUAL "false")
unset(PLUGIN_MESSENGER_OUTOFPROCESS CACHE)
endif()

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions Monitor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ if(PLUGIN_MONITOR_YOUTUBE_MEMORYLIMIT)
unset(PLUGIN_MONITOR_YOUTUBE_MEMORYLIMIT CACHE)
endif()

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)

Expand Down
4 changes: 4 additions & 0 deletions OpenCDMi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ elseif(PLUGIN_OPENCDMI_OUTOFPROCESS STREQUAL "false")
unset(PLUGIN_OPENCDMI_OUTOFPROCESS CACHE)
endif()

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)

Expand Down
4 changes: 4 additions & 0 deletions Packager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(libprovision QUIET)
find_package(LibOPKG REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions PerformanceMetrics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ set(PLUGIN_PERFORMANCEMETRICS_WEBKITBROWSER_RESIDENT_APP "${PLUGIN_WEBKITBROWSER
set(PLUGIN_PERFORMANCEMETRICS_WEBKITBROWSER_UX "${PLUGIN_WEBKITBROWSER_UX}" CACHE BOOL "Enable monitor for the Performance Metrics UX plugin")
set(PLUGIN_PERFORMANCEMETRICS_WEBKITBROWSER_YOUTUBE "${PLUGIN_WEBKITBROWSER_YOUTUBE}" CACHE BOOL "Enable monitor for the Performance Metrics Youtube plugin")

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)

Expand Down
4 changes: 4 additions & 0 deletions PlayerInfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ set(PLUGIN_PLAYERINFO_AUTOSTART "true" CACHE STRING "Automatically start PlayerI
set(PLUGIN_PLAYERINFO_STARTUPORDER "" CACHE STRING "Automatically start PlayerInfo plugin")
set(PLUGIN_PLAYERINFO_MODE "Off" CACHE STRING "Controls if the plugin should run in its own process, in process or remote")

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions RustBridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
set(PLUGIN_NAME RustBridge)
set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)

Expand Down
4 changes: 4 additions & 0 deletions SecurityAgent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")
set(PLUGIN_SECURITYAGENT_AUTOSTART "true" CACHE STRING "Automatically start SecurityAgent plugin")
set(PLUGIN_SECURITYAGENT_STARTUPORDER "" CACHE STRING "To configure startup order of SecurityAgent plugin")

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)

Expand Down
4 changes: 4 additions & 0 deletions TraceControl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ set(PLUGIN_TRACECONTROL_PORT "0" CACHE STRING "PORT address")
set(PLUGIN_TRACECONTROL_BINDING "0.0.0.0" CACHE STRING "Binding IP Address")
set(PLUGIN_TRACECONTROL_MAX_EXPORTCONNECTIONS 5 CACHE STRING "Maximum allowed export connections")

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions WebBridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
set(PLUGIN_NAME WebBridge)
set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})

if(BUILD_REFERENCE)
+ add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
+endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(CompileSettingsDebug CONFIG REQUIRED)

Expand Down
4 changes: 4 additions & 0 deletions WebKitBrowser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ set(PLUGIN_AMAZON_MEMORYPRESSURE_WEBPROCESS_SETTINGS_POLLINTERVAL ${PLUGIN_WEBKI
set(PLUGIN_AMAZON_MEMORYPRESSURE_NETWORKPROCESS_SETTINGS_LIMIT ${PLUGIN_WEBKITBROWSER_MEMORYPRESSURE_NETWORKPROCESS_SETTINGS_LIMIT} CACHE STRING "Amazon App Memory Pressure Networkprocess Limit")
set(PLUGIN_AMAZON_MEMORYPRESSURE_NETWORKPROCESS_SETTINGS_POLLINTERVAL ${PLUGIN_WEBKITBROWSER_MEMORYPRESSURE_NETWORKPROCESS_SETTINGS_POLLINTERVAL} CACHE STRING "Amazon App Memory Pressure Networkprocess Poll Interval")

if(BUILD_REFERENCE)
add_definitions(-DBUILD_REFERENCE=${BUILD_REFERENCE})
endif()

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(${NAMESPACE}Cryptography REQUIRED)
Expand Down

0 comments on commit af552e8

Please sign in to comment.