From d3fd47e97a24c9718cadf54110530ad4e3e9e604 Mon Sep 17 00:00:00 2001 From: Joohyun Kim Date: Fri, 19 Jul 2013 13:52:40 +0900 Subject: [PATCH] Move files to own directory Change-Id: I5d70aa75502dad74785b25c981a224108b991c8f Signed-off-by: Joohyun Kim --- CMakeLists.txt | 28 ++++++++++++++++++---- inc/FApp_PackageManagerStub.h | 0 manifest.xml | 0 packaging/osp-common-service.spec | 0 src/FApp_PackageManagerStub.cpp | 0 src/system/CMakeLists.txt | 4 +++- src/{runtime => system}/FSys_RuntimeInfoStub.cpp | 0 src/system/FSys_SettingService.cpp | 7 ++++++ src/system/FSys_SettingService.h | 1 + .../FSys_SystemServiceIpcEventForAsync.cpp | 0 10 files changed, 34 insertions(+), 6 deletions(-) mode change 100755 => 100644 CMakeLists.txt mode change 100755 => 100644 inc/FApp_PackageManagerStub.h mode change 100755 => 100644 manifest.xml mode change 100755 => 100644 packaging/osp-common-service.spec mode change 100755 => 100644 src/FApp_PackageManagerStub.cpp rename src/{runtime => system}/FSys_RuntimeInfoStub.cpp (100%) rename src/{ => system}/FSys_SystemServiceIpcEventForAsync.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 index 4e0ca8e..f4cfb90 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,16 +28,13 @@ INCLUDE_DIRECTORIES ( ) SET (${this_target}_SOURCE_FILES - src/system/FSys_SettingService.cpp - src/runtime/FSys_RuntimeInfoStub.cpp src/FApp_PackageManagerStub.cpp src/FUi_UiManagerStub.cpp src/CommonService.cpp src/CommonServiceEntry.cpp - src/FSys_SystemServiceIpcEventForAsync.cpp ) -#ADD_SUBDIRECTORY(src/system) +ADD_SUBDIRECTORY(src/system) ## SET EXTRA COMPILER FLAGS SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIE -Wall -pthread -g3" ) @@ -55,9 +52,30 @@ SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) SET(CMAKE_INSTALL_RPATH "/usr/lib/osp-server") SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) -## Create Library +## Create Executable ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES}) +## Create Shared Library +SET(STATIC_LIBS system_service) + +SET_TARGET_PROPERTIES(${this_target} PROPERTIES LINK_INTERFACE_LIBRARIES "") + +ADD_DEPENDENCIES(${this_target} ${STATIC_LIBS}) + +MACRO(OSP_ADD_OBJS_IN_ARCHIVE archives) + SET(LINK_OBJECTS_IN_ARCHIVE) + FOREACH(archive ${ARGV}) + SET(LINK_OBJECTS_IN_ARCHIVE "${LINK_OBJECTS_IN_ARCHIVE} -l${archive}") + ENDFOREACH(archive) + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--whole-archive ${LINK_OBJECTS_IN_ARCHIVE} -Wl,-no-whole-archive") +ENDMACRO(OSP_ADD_OBJS_IN_ARCHIVE) + +OSP_ADD_OBJS_IN_ARCHIVE(${STATIC_LIBS}) + +SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed") + +TARGET_LINK_LIBRARIES( ${this_target} ${STATIC_LIBS}) + TARGET_LINK_LIBRARIES(${this_target} -Xlinker --no-undefined -Xlinker --as-needed -pie) TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw -lchromium") TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-uifw" ) diff --git a/inc/FApp_PackageManagerStub.h b/inc/FApp_PackageManagerStub.h old mode 100755 new mode 100644 diff --git a/manifest.xml b/manifest.xml old mode 100755 new mode 100644 diff --git a/packaging/osp-common-service.spec b/packaging/osp-common-service.spec old mode 100755 new mode 100644 diff --git a/src/FApp_PackageManagerStub.cpp b/src/FApp_PackageManagerStub.cpp old mode 100755 new mode 100644 diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt index e413a3b..0452443 100644 --- a/src/system/CMakeLists.txt +++ b/src/system/CMakeLists.txt @@ -1,4 +1,4 @@ -SET (this_target system) +SET (this_target system_service) INCLUDE_DIRECTORIES( ${SLP_INCLUDE_DIRS} @@ -9,6 +9,8 @@ INCLUDE_DIRECTORIES( SET (${this_target}_SOURCE_FILES FSys_SettingService.cpp + FSys_RuntimeInfoStub.cpp + FSys_SystemServiceIpcEventForAsync.cpp ) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") diff --git a/src/runtime/FSys_RuntimeInfoStub.cpp b/src/system/FSys_RuntimeInfoStub.cpp similarity index 100% rename from src/runtime/FSys_RuntimeInfoStub.cpp rename to src/system/FSys_RuntimeInfoStub.cpp diff --git a/src/system/FSys_SettingService.cpp b/src/system/FSys_SettingService.cpp index 7d2e764..7312d43 100644 --- a/src/system/FSys_SettingService.cpp +++ b/src/system/FSys_SettingService.cpp @@ -103,6 +103,9 @@ _SettingService::_SettingService() r = __ipcServer.Start(); SysTryCatch(NID_SYS, r == E_SUCCESS, , r, "It is failed to start IPC server."); + r = __responseMessage.Construct(); + SysTryCatch(NID_SYS, r == E_SUCCESS, , r, "It is failed to create response message container."); + CATCH: if(r != E_SUCCESS) { @@ -117,6 +120,7 @@ _SettingService::~_SettingService() __pSettingInfo->RemoveSettingEventListener(*this); __pSettingInfo = null; result r = __ipcServer.Stop(); + __responseMessage.RemoveAll(true); SysTryReturnVoidResult(NID_SYS, r == E_SUCCESS, r, "It is failed to stop IPC server."); } @@ -161,6 +165,7 @@ _SettingService::OnRequestOccured(const ArrayList& request, ArrayList* response) SysTryCatch(NID_SYS, response != null, r = E_SYSTEM, r, "There is no response instance."); + __responseMessage.RemoveAll(true); pCommand = (String*)request.GetAt(SETTING_SERVICE_IPC_MSG_COMMAND); SysTryCatch(NID_SYS, pCommand != null, r = E_SYSTEM, r, "There is no command information."); @@ -385,6 +390,8 @@ CATCH: SysLog(NID_SYS, "Value is %ls.", pValue->GetPointer()); response->Add(pValue); } + + __responseMessage.AddItems(*response); } return true; diff --git a/src/system/FSys_SettingService.h b/src/system/FSys_SettingService.h index b9c62a7..bbf2aa4 100644 --- a/src/system/FSys_SettingService.h +++ b/src/system/FSys_SettingService.h @@ -80,6 +80,7 @@ private: Tizen::Base::Collection::HashMap __asyncList; Tizen::Base::Collection::ArrayList __eventList; Tizen::Base::Collection::ArrayList __eventListForInternal; + Tizen::Base::Collection::ArrayList __responseMessage; Tizen::App::AppId __currentPkgId; int __currentPid; diff --git a/src/FSys_SystemServiceIpcEventForAsync.cpp b/src/system/FSys_SystemServiceIpcEventForAsync.cpp similarity index 100% rename from src/FSys_SystemServiceIpcEventForAsync.cpp rename to src/system/FSys_SystemServiceIpcEventForAsync.cpp -- 2.7.4