app namespace source cleanup
authorYoung Ik Cho <youngik.cho@samsung.com>
Mon, 22 Jul 2013 05:18:44 +0000 (14:18 +0900)
committerYoung Ik Cho <youngik.cho@samsung.com>
Wed, 24 Jul 2013 07:56:49 +0000 (16:56 +0900)
Change-Id: I2e70712fad6cdcbfe2eeaeb31d0698210d63f83b
Signed-off-by: Young Ik Cho <youngik.cho@samsung.com>
src/app/CMakeLists.txt
src/app/FApp_AppManagerImpl.cpp
src/app/FApp_AppManagerProxy.cpp
src/app/FApp_ConditionManagerProxy.cpp
src/app/FApp_ConditionManagerProxy.h
src/app/inc/FApp_Types.h [changed mode: 0755->0644]
src/app/package/FApp_PackageManagerIpcMessages.cpp [moved from src/app/FApp_PackageManagerIpcMessages.cpp with 100% similarity]
src/app/package/FApp_PackageManagerProxy.cpp [moved from src/app/FApp_PackageManagerProxy.cpp with 96% similarity]

index 75921b7..6ba1638 100644 (file)
@@ -20,6 +20,8 @@ SET (${this_target}_SOURCE_FILES
        package/FAppPkg_PackageInfoImpl.cpp
        package/FAppPkg_PackageManagerImpl.cpp
        package/FAppPkg_PackageParser.cpp
+       package/FApp_PackageManagerProxy.cpp
+       package/FApp_PackageManagerIpcMessages.cpp
        FAppApp.cpp
        FApp_AppImpl.cpp
        FAppServiceApp.cpp
@@ -29,7 +31,6 @@ SET (${this_target}_SOURCE_FILES
        FApp_AppManagerImpl.cpp
        FApp_AppManagerProxy.cpp
        FApp_ConditionManagerProxy.cpp
-       FApp_PackageManagerProxy.cpp
        FAppAppRegistry.cpp
        FApp_AppRegistryImpl.cpp
        FAppAppResource.cpp
@@ -47,7 +48,6 @@ SET (${this_target}_SOURCE_FILES
        FApp_NotificationManagerImpl.cpp
        FApp_AppManagerIpcMessage.cpp
        FApp_ConditionManagerIpcMessages.cpp
-       FApp_PackageManagerIpcMessages.cpp
        FAppSqlDataControl.cpp
        FApp_SqlDataControlImpl.cpp
        FAppMapDataControl.cpp
index 840ed38..6772012 100755 (executable)
@@ -27,7 +27,6 @@
 #include <aul/aul.h>
 #include <bundle.h>
 
-#include <FBaseInteger.h>
 #include <FBaseObject.h>
 #include <FBaseString.h>
 #include <FBaseColArrayList.h>
index 48cab0c..eac9cac 100755 (executable)
 #include "FApp_AppManagerEventArg.h"
 #include "FApp_AppManagerProxy.h"
 #include "FApp_AppManagerIpcMessage.h"
-#include "FApp_IAppLifecycleEventListener.h"
 
-namespace
-{
 
-const char IPC_SERVER_NAME[] = "osp.app.ipcserver.appmanager";
-const int INVALID_CLIENT_ID = -1;
-};
+using namespace Tizen::Base;
+using namespace Tizen::Io;
+using namespace Tizen::Base::Runtime;
 
+static const int INVALID_CLIENT_ID = -1;
 
 namespace Tizen { namespace App
 {
 
-using namespace Tizen::Base;
-using namespace Tizen::Io;
-using namespace Tizen::Base::Runtime;
-
+const char IPC_SERVER_NAME[] = "osp.app.ipcserver.appmanager";
 
 _IAppManager* _AppManagerProxy::__pSelf = null;
 _IAppManagerServiceEventListener* _AppManagerProxy::__pServiceEventListener = null;
index 98c6aac..2c77a29 100644 (file)
@@ -25,7 +25,6 @@
 #include <unique_ptr.h>
 
 #include <FBaseErrors.h>
-
 #include <FBaseSysLog.h>
 #include <FIo_IpcClient.h>
 
@@ -40,6 +39,8 @@ using namespace Tizen::Io;
 namespace Tizen { namespace App
 {
 
+const char CONDITION_MANAGER_IPC_NAME[] = "osp.app.ipcserver.conditionmanager";
+
 _ConditionManagerProxy::_ConditionManagerProxy(void)
        : __pIpcClient(null)
 {
@@ -57,7 +58,7 @@ _ConditionManagerProxy::Construct()
        std::unique_ptr<_IpcClient> pIpcClient(new (std::nothrow) _IpcClient());
        SysTryReturnResult(NID_APP, pIpcClient.get() != null, E_OUT_OF_MEMORY, "_IpcClient creation failed.");
 
-       result r = pIpcClient->Construct("osp.app.ipcserver.conditionmanager");
+       result r = pIpcClient->Construct(CONDITION_MANAGER_IPC_NAME);
        SysTryReturn(NID_APP, !IsFailed(r), r, r, "[%%s] _IpcClient constructing faliied.", GetErrorMessage(r));
 
        __pIpcClient = pIpcClient.release();
@@ -79,7 +80,7 @@ _ConditionManagerProxy::RegisterAppLaunch(const AppId& appId, const String& cond
 
        std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) ConditionManager_RegisterAppLaunch(
                                                appId, condition, (pArrayList != null) ? *pArrayList : dummy,
-                                               (int) AppManager::LAUNCH_OPTION_DEFAULT, &response));
+                                               static_cast<int>(AppManager::LAUNCH_OPTION_DEFAULT), &response));
        result r = __pIpcClient->SendRequest(*pMsg.get());
 
        SysTryReturn(NID_APP, !IsFailed(r), r, r, "__pIpcClient->SendRequest is failed. (%s)", GetErrorMessage(r));
@@ -89,7 +90,7 @@ _ConditionManagerProxy::RegisterAppLaunch(const AppId& appId, const String& cond
 
 
 result
-_ConditionManagerProxy::UnregisterAppLaunch(const AppId& appId, /*const Tizen::Base::String& executableName,*/ const String* pCondition)
+_ConditionManagerProxy::UnregisterAppLaunch(const AppId& appId, const String* pCondition)
 {
        SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
        SysLog(NID_APP, "");
index 12ee139..c4f1dd8 100644 (file)
 
 #include <FBaseObject.h>
 #include <FBaseString.h>
-#include <FAppTypes.h>
 #include <FAppAppManager.h>
 
-#include "FApp_Types.h"
-
 namespace Tizen { namespace Io { class _IpcClient; } }
 
 namespace Tizen { namespace App
old mode 100755 (executable)
new mode 100644 (file)
index 0bb75b5..8245989
@@ -112,6 +112,10 @@ _OSP_LOCAL_ extern const wchar_t TIZEN_OPERATION_MAIN[];
 _OSP_EXPORT_ extern const wchar_t TIZEN_OPERATION_PICK[];
 _OSP_LOCAL_ extern const char TIZEN_NOTIFICATION_DATA[];
 
+_OSP_EXPORT_ extern const char IPC_SERVER_NAME[];
+_OSP_EXPORT_ extern const char CONDITION_MANAGER_IPC_NAME[];
+_OSP_EXPORT_ extern const char PACKAGE_MANAGER_IPC_NAME[];
+
 } } // Tizen::App
 
 #endif // _FAPP_INTERNAL_TYPES_H_
similarity index 96%
rename from src/app/FApp_PackageManagerProxy.cpp
rename to src/app/package/FApp_PackageManagerProxy.cpp
index 4260ebf..493f23d 100644 (file)
@@ -37,6 +37,8 @@ using namespace Tizen::App::Package;
 namespace Tizen { namespace App
 {
 
+const char PACKAGE_MANAGER_IPC_NAME[] = "osp.app.ipcserver.packagemanager";
+
 _PackageManagerProxy::_PackageManagerProxy(void)
        : __pIpcClient(null)
 {
@@ -53,7 +55,7 @@ _PackageManagerProxy::Construct()
        __pIpcClient = new (std::nothrow) Tizen::Io::_IpcClient();
        SysTryReturnResult(NID_APP, __pIpcClient != null, E_OUT_OF_MEMORY, "_IpcClient creation failed.");
 
-       result r = __pIpcClient->Construct("osp.app.ipcserver.packagemanager");
+       result r = __pIpcClient->Construct(PACKAGE_MANAGER_IPC_NAME);
        SysTryReturn(NID_APP, !IsFailed(r), r, r, "_IpcClient constructing failed [%s].", GetErrorMessage(r));
 
        return E_SUCCESS;