diff options
author | Christian Linke <christian.linke@bmw.de> | 2015-12-02 17:25:12 +0000 |
---|---|---|
committer | Christian Linke <christian.linke@bmw.de> | 2015-12-02 17:25:12 +0000 |
commit | 3f8431c8d0886dd18ab157694a64766a2d7288bd (patch) | |
tree | 92e6743dd11f74a0862c1b69ec36e5cd364b39ff | |
parent | 2312c029d469fcc00bc465f44c398f6460cb51e5 (diff) | |
download | audiomanager-3f8431c8d0886dd18ab157694a64766a2d7288bd.tar.gz |
moved watchdog into utilities and created .pc file for utilities
Signed-off-by: Christian Linke <christian.linke@bmw.de>
-rw-r--r-- | AudioManagerDaemon/CMakeLists.txt | 15 | ||||
-rw-r--r-- | AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt | 7 | ||||
-rw-r--r-- | AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt | 7 | ||||
-rw-r--r-- | AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt | 7 | ||||
-rw-r--r-- | AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt | 7 | ||||
-rw-r--r-- | AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt | 7 | ||||
-rw-r--r-- | AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt | 7 | ||||
-rw-r--r-- | AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt | 7 | ||||
-rw-r--r-- | AudioManagerUtilities/CMakeLists.txt | 19 | ||||
-rwxr-xr-x | AudioManagerUtilities/include/CAmWatchdog.h (renamed from AudioManagerDaemon/include/CAmWatchdog.h) | 0 | ||||
-rw-r--r-- | AudioManagerUtilities/include/sd-daemon.h (renamed from AudioManagerDaemon/include/sd-daemon.h) | 0 | ||||
-rwxr-xr-x | AudioManagerUtilities/src/CAmWatchdog.cpp (renamed from AudioManagerDaemon/src/CAmWatchdog.cpp) | 3 | ||||
-rw-r--r-- | AudioManagerUtilities/src/sd-daemon.c (renamed from AudioManagerDaemon/src/sd-daemon.c) | 0 |
13 files changed, 70 insertions, 16 deletions
diff --git a/AudioManagerDaemon/CMakeLists.txt b/AudioManagerDaemon/CMakeLists.txt index 260483c..5165141 100644 --- a/AudioManagerDaemon/CMakeLists.txt +++ b/AudioManagerDaemon/CMakeLists.txt @@ -82,21 +82,6 @@ if(WITH_TELNET) src/CAmTelnetMenuHelper.cpp) endif(WITH_TELNET) -if(WITH_SYSTEMD_WATCHDOG) - set (AUDIOMAN_SRCS_CXX - ${AUDIOMAN_SRCS_CXX} - src/CAmWatchdog.cpp) - set (AM_LINK_LIBS - ${AM_LINK_LIBS} - ${SYSTEMD_LIBRARIES}) -endif(WITH_SYSTEMD_WATCHDOG) - -if (NOT SYSTEMD_FOUND) - set (AUDIOMAN_SRCS_CXX - ${AUDIOMAN_SRCS_CXX} - src/sd-daemon.c) -endif (NOT SYSTEMD_FOUND) - if(WITH_DBUS_WRAPPER) set (AUDIOMAN_SRCS_CXX ${AUDIOMAN_SRCS_CXX} diff --git a/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt b/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt index 44b3aef..b21ca91 100644 --- a/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt +++ b/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt @@ -25,6 +25,13 @@ set (AM_LINK_LIBS ${CMAKE_DL_LIBS} AudioManagerUtilities rt) + +IF (WITH_CAPI_WRAPPER) + set (AM_LINK_LIBS + ${AM_LINK_LIBS} + -Wl,--as-needed CommonAPI + ) +ENDIF (WITH_CAPI_WRAPPER) if(WITH_DATABASE_STORAGE) pkg_check_modules(SQLITE REQUIRED sqlite3) diff --git a/AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt index 22bd598..760be6c 100644 --- a/AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt +++ b/AudioManagerDaemon/test/AmMapHandlerTest/CMakeLists.txt @@ -33,6 +33,13 @@ if(WITH_DLT) ${DLT_LIBRARIES}) endif(WITH_DLT) +IF (WITH_CAPI_WRAPPER) + set (AM_LINK_LIBS + ${AM_LINK_LIBS} + -Wl,--as-needed CommonAPI + ) +ENDIF (WITH_CAPI_WRAPPER) + INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${AUDIO_INCLUDE_FOLDER} diff --git a/AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt index f538741..720ef64 100644 --- a/AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt +++ b/AudioManagerDaemon/test/AmRouterMapTest/CMakeLists.txt @@ -26,6 +26,13 @@ set (AM_LINK_LIBS AudioManagerUtilities rt) +IF (WITH_CAPI_WRAPPER) + set (AM_LINK_LIBS + ${AM_LINK_LIBS} + -Wl,--as-needed CommonAPI + ) +ENDIF (WITH_CAPI_WRAPPER) + if(WITH_DLT) pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0) set (AM_LINK_LIBS diff --git a/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt index d4e2580..e9b0e80 100644 --- a/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt +++ b/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt @@ -25,6 +25,13 @@ set (AM_LINK_LIBS ${CMAKE_DL_LIBS} AudioManagerUtilities rt) + +IF (WITH_CAPI_WRAPPER) + set (AM_LINK_LIBS + ${AM_LINK_LIBS} + -Wl,--as-needed CommonAPI + ) +ENDIF (WITH_CAPI_WRAPPER) if(WITH_DLT) pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0) diff --git a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt index 7c19a4b..426ac7a 100644 --- a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt +++ b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt @@ -28,6 +28,13 @@ set (AM_LINK_LIBS AudioManagerUtilities rt) +IF (WITH_CAPI_WRAPPER) + set (AM_LINK_LIBS + ${AM_LINK_LIBS} + -Wl,--as-needed CommonAPI + ) +ENDIF (WITH_CAPI_WRAPPER) + if(WITH_DLT) pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0) set (AM_LINK_LIBS diff --git a/AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt index bf197f4..bff74b6 100644 --- a/AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt +++ b/AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt @@ -25,6 +25,13 @@ set (AM_LINK_LIBS ${CMAKE_DL_LIBS} AudioManagerUtilities rt) + +IF (WITH_CAPI_WRAPPER) + set (AM_LINK_LIBS + ${AM_LINK_LIBS} + -Wl,--as-needed CommonAPI + ) +ENDIF (WITH_CAPI_WRAPPER) if(WITH_DLT) pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0) diff --git a/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt index e7e7955..7f1cc2c 100644 --- a/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt +++ b/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt @@ -23,6 +23,13 @@ set (AM_LINK_LIBS ${CMAKE_DL_LIBS} AudioManagerUtilities rt) + +IF (WITH_CAPI_WRAPPER) + set (AM_LINK_LIBS + ${AM_LINK_LIBS} + -Wl,--as-needed CommonAPI + ) +ENDIF (WITH_CAPI_WRAPPER) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1 -DDLT_CONTEXT=AudioManager") diff --git a/AudioManagerUtilities/CMakeLists.txt b/AudioManagerUtilities/CMakeLists.txt index 7a0c5cc..cc122eb 100644 --- a/AudioManagerUtilities/CMakeLists.txt +++ b/AudioManagerUtilities/CMakeLists.txt @@ -40,6 +40,23 @@ SET(AUDIO_MANAGER_UTILITIES_SRCS_CXX src/CAmCommandLineSingleton.cpp src/CAmDltWrapper.cpp src/CAmSocketHandler.cpp) + +if(WITH_SYSTEMD_WATCHDOG) + set (AUDIO_MANAGER_UTILITIES_SRCS_CXX + ${AUDIO_MANAGER_UTILITIES_SRCS_CXX} + src/CAmWatchdog.cpp) + set (AM_LINK_LIBS + ${AM_LINK_LIBS} + ${SYSTEMD_LIBRARIES}) +endif(WITH_SYSTEMD_WATCHDOG) + + +if (NOT SYSTEMD_FOUND) + set (AUDIO_MANAGER_UTILITIES_SRCS_CXX + ${AUDIO_MANAGER_UTILITIES_SRCS_CXX} + src/sd-daemon.c) +endif (NOT SYSTEMD_FOUND) + IF (WITH_DBUS_WRAPPER) pkg_check_modules (DBUS "dbus-1 >= 1.4") @@ -80,6 +97,8 @@ IF (WITH_SHARED_UTILITIES) LIBRARY DESTINATION lib PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ COMPONENT bin) + configure_file( ${CMAKE_SOURCE_DIR}/cmake/audiomanagerutilities.pc.in ${CMAKE_BINARY_DIR}/audiomanagerutilities.pc @ONLY ) + install(FILES ${CMAKE_BINARY_DIR}/audiomanagerutilities.pc DESTINATION lib/pkgconfig COMPONENT devel) ELSE (WITH_SHARED_UTILITIES) INSTALL(TARGETS AudioManagerUtilities ARCHIVE DESTINATION lib diff --git a/AudioManagerDaemon/include/CAmWatchdog.h b/AudioManagerUtilities/include/CAmWatchdog.h index 4449c75..4449c75 100755 --- a/AudioManagerDaemon/include/CAmWatchdog.h +++ b/AudioManagerUtilities/include/CAmWatchdog.h diff --git a/AudioManagerDaemon/include/sd-daemon.h b/AudioManagerUtilities/include/sd-daemon.h index 50f7409..50f7409 100644 --- a/AudioManagerDaemon/include/sd-daemon.h +++ b/AudioManagerUtilities/include/sd-daemon.h diff --git a/AudioManagerDaemon/src/CAmWatchdog.cpp b/AudioManagerUtilities/src/CAmWatchdog.cpp index 4ac890f..db65095 100755 --- a/AudioManagerDaemon/src/CAmWatchdog.cpp +++ b/AudioManagerUtilities/src/CAmWatchdog.cpp @@ -80,7 +80,8 @@ CAmWatchdog::CAmWatchdog(CAmSocketHandler* CAmSocketHandler) : CAmWatchdog::~CAmWatchdog() { //remove the timer again. - mpCAmSocketHandler->removeTimer(mHandle); + if (mHandle!=0) + mpCAmSocketHandler->removeTimer(mHandle); } void CAmWatchdog::timerCallback(sh_timerHandle_t handle, void* userData) diff --git a/AudioManagerDaemon/src/sd-daemon.c b/AudioManagerUtilities/src/sd-daemon.c index cf35148..cf35148 100644 --- a/AudioManagerDaemon/src/sd-daemon.c +++ b/AudioManagerUtilities/src/sd-daemon.c |