change IpcService to run on seperated thread
authorjungmin76.park <jungmin76.park@samsung.com>
Thu, 24 Jan 2013 11:37:39 +0000 (20:37 +0900)
committerjungmin76.park <jungmin76.park@samsung.com>
Thu, 24 Jan 2013 11:37:39 +0000 (20:37 +0900)
Change-Id: I4fae818f7938bf87d3bb1638fd1cd831dccb4ffb
Signed-off-by: jungmin76.park <jungmin76.park@samsung.com>
src/FShell_LiveboxBase.cpp
src/FShell_LiveboxManagerService.cpp
src/FShell_LiveboxManagerStub.cpp

index f8d6916..9db8092 100644 (file)
@@ -212,34 +212,10 @@ _LiveboxRequestHelper::SendRequestToApp(const AppId& appId, const String& operat
 {
        SysLog(NID_APP, "appId(%ls), operation(%ls), arg count(%d)", appId.GetPointer(), operation.GetPointer(), pArgs->GetCount() );
 
-/*     std::unique_ptr<IMapEnumerator> pMapEnum(pArgs->GetMapEnumeratorN());
-       SysTryReturnResult(NID_APP, pMapEnum.get(), E_SYSTEM, "failed to get GetMapEnumeratorN");
-
-       while( pMapEnum->MoveNext() == E_SUCCESS)
-       {
-               const String* pKey = dynamic_cast<const String*>(pMapEnum->GetKey());
-               const String* pValue = dynamic_cast<const String*>(pMapEnum->GetValue());
-
-               if( pKey == null)
-               {
-                       SysLog(NID_APP, "key is null");
-                       continue;
-               }
-               if( pValue == null)
-               {
-                       SysLog(NID_APP, "pValue is null");
-                       continue;
-               }
-
-               SysLog(NID_APP, "key(%ls), value(%ls)", pKey->GetPointer(), pValue->GetPointer() );
-
-       }*/
-
        _AppMessageImpl msg;
-
        msg.AddData(OSP_K_APPCONTROL_INTERNAL_OPERATION, L"livebox");
-       //      AddStrArrayToBundle(msg.GetBundle(), OSP_K_ARG, pArgs);
        Tizen::App::_AppArg::AddStrMap(msg.GetBundle(), pArgs);
+
        std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId) );
        std::unique_ptr<char[]> pOperation(_StringConverter::CopyToCharArrayN(operation) );
 
index 224c8d8..8f2625b 100644 (file)
@@ -139,7 +139,7 @@ LiveboxManagerService::Find(const String& appId, const String& instanceId) const
        {
                _Livebox* pLivebox = null;
                __liveboxes.GetAt(i, pLivebox);
-               SysLog(NID_APP, "%ls", pLivebox->__instanceId.GetPointer());
+//             SysLog(NID_APP, "%ls", pLivebox->__instanceId.GetPointer());
 
                if ( pLivebox->__instanceId == instanceId )
                {
@@ -278,7 +278,6 @@ LiveboxManagerService::OnLiveboxUpdate(struct event_arg *arg, void* data)
                pLivebox->OnUpdate();
        }
 
-       SysLog(NID_APP, "Exit");
        return 0;
 }
 
@@ -323,13 +322,11 @@ LiveboxManagerService::OnLiveboxPopupCreate(struct event_arg *arg, void* data)
        SysTryReturn (NID_APP, arg->type == event_arg::EVENT_PD_CREATE, -EPERM, E_SUCCESS, "invalid argument from master");
        SysLog(NID_APP, "packageName(%s), id(%s), width(%d), height(%d), priority(%d)", arg->pkgname, arg->id);
 
-       SysLog(NID_APP, "Enter");
        _Livebox* pLivebox = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
        SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
        pLivebox->OnPopupCreated(arg->info.pd_create.w, arg->info.pd_create.h);
 
-       SysLog(NID_APP, "Exit");
     return 0;
 }
 
@@ -352,14 +349,13 @@ LiveboxManagerService::OnLiveboxPopupCreate(struct event_arg *arg, void* data)
  int
  LiveboxManagerService::OnLivePause(struct event_arg *arg, void* data)
 {
-        SysTryReturn(NID_APP, arg || arg->id || arg->pkgname, 0, E_SUCCESS, "arg is null!");
-        SysLog(NID_APP, "packageName(%s), id(%s)", arg->pkgname, arg->id);
+        SysTryReturn(NID_APP, arg, 0, E_SUCCESS, "arg is null!");
 
         _Livebox* pLivebox = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
         SysTryReturnResult(NID_APP, pLivebox , 0, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
+        SysLog(NID_APP, "packageName(%s), id(%s)", arg->pkgname, arg->id);
         pLivebox->OnBackground();
-
     return 0;
 }
 
@@ -367,11 +363,11 @@ int
 LiveboxManagerService::OnLiveboxResume(struct event_arg *arg, void* data)
 {
        SysTryReturn(NID_APP, arg || arg->id || arg->pkgname, 0, E_SUCCESS, "arg is null!");
-       SysLog(NID_APP, "packageName(%s), id(%s)", arg->pkgname, arg->id);
 
        _Livebox* pLivebox = LiveboxManagerService::GetInstance()->Find(arg->pkgname, arg->id);
        SysTryReturnResult(NID_APP, pLivebox , E_SYSTEM, "[E_SYSTEM] pLivebox is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
 
+       SysLog(NID_APP, "packageName(%s), id(%s)", arg->pkgname, arg->id);
        pLivebox->OnForeground();
     return 0;
 }
index 761a932..4ead778 100644 (file)
@@ -65,7 +65,7 @@ _LiveboxManagerStub::StartIpcServer(void)
        __pIpcServer = new (std::nothrow) _IpcServer();
        SysTryReturn(NID_APP, __pIpcServer != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Not enough memory.");
 
-       result r = __pIpcServer->Construct( IPC_SERVER_NAME, *this);
+       result r = __pIpcServer->Construct( IPC_SERVER_NAME, *this, false);
        SysTryCatch(NID_APP, !IsFailed(r), , r, "[%s] Failed to create IPC server(%s)", GetErrorMessage(r), "osp.app.ipcserver.appmanager");
        SysLog(NID_APP, "Exit.");