modify method names to give consitancy
authorjungmin76.park <jungmin76.park@samsung.com>
Mon, 15 Jul 2013 11:13:27 +0000 (20:13 +0900)
committerjungmin76.park <jungmin76.park@samsung.com>
Mon, 15 Jul 2013 11:13:27 +0000 (20:13 +0900)
Change-Id: I4e4a429e3e1673636f9b12ef86976e55a505467d
Signed-off-by: jungmin76.park <jungmin76.park@samsung.com>
inc/FShell_AppWidgetManagerService.h
src/FShell_AppWidgetContext.cpp
src/FShell_AppWidgetContextHelper.cpp
src/FShell_AppWidgetManagerService.cpp

index a734776..0af5429 100644 (file)
@@ -64,10 +64,10 @@ private:
        static int OnAppWidgetUpdate(struct event_arg *arg, void* data);
        static int OnAppWidgetPopupCreate(struct event_arg *arg, void* data);
        static int OnAppWidgetPopupDestroy(struct event_arg *arg, void* data);
-       static int OnAppWidgetPause(struct event_arg *arg, void* data);
-       static int OnAppWidgetResume(struct event_arg *pArg, void* pData);
-       static int OnAppWidgetPauseAll(struct event_arg *arg, void* data);
-       static int OnAppWidgetResumeAll(struct event_arg *pArg, void* pData);
+       static int OnAppWidgetBackground(struct event_arg *arg, void* data);
+       static int OnAppWidgetForeground(struct event_arg *pArg, void* pData);
+       static int OnAppWidgetBackgroundAll(struct event_arg *arg, void* data);
+       static int OnAppWidgetForegroundAll(struct event_arg *pArg, void* pData);
        static int OnAppWidgetClick(struct event_arg *arg, void* data);
        static int OnAppWidgetResize(struct event_arg *arg, void* data);
        static int OnAppWidgetPeriodChanged(struct event_arg *arg, void* data);
index 4e7495e..4fd06d1 100644 (file)
@@ -248,7 +248,7 @@ _AppWidgetContext::OnUpdate(const String& argument)
        AppWidgetManagerService* pMgrService = AppWidgetManagerService::GetInstance();
        SysTryReturnVoidResult(NID_SHELL, pMgrService, E_SYSTEM, "[E_SYSTEM] Failed to get an instance of AppWidgetManagerService.");
 
-       // Queueing the pointer of paused context.
+       // Queueing the pointer of background context.
        if (!this->IsForeground())
        {
                // Saving the data
@@ -258,7 +258,7 @@ _AppWidgetContext::OnUpdate(const String& argument)
                }
 
                __hasPendingRequest = true;
-               SysLog(NID_SHELL, "Update is requested but the %ls is paused.", (this->GetAppId()).GetPointer());
+               SysLog(NID_SHELL, "Update is requested but the %ls is background.", (this->GetAppId()).GetPointer());
        }
        else
        {
@@ -301,7 +301,7 @@ _AppWidgetContext::OnForeground(void)
 {
        if (IsForeground())
        {
-               SysLog(NID_SHELL, "%ls is already resumed.", (this->GetAppId()).GetPointer());
+               SysLog(NID_SHELL, "%ls is already foreground.", (this->GetAppId()).GetPointer());
                return;
        }
 
@@ -338,7 +338,7 @@ _AppWidgetContext::OnBackground(void)
 
        if (!IsForeground())
        {
-               SysLog(NID_SHELL, "%ls is already paused.", (this->GetAppId()).GetPointer());
+               SysLog(NID_SHELL, "%ls is already background.", (this->GetAppId()).GetPointer());
                return;
        }
        SetForeground(false);
@@ -403,7 +403,7 @@ _AppWidgetContext::SendRemoveRequest(void)
 result
 _AppWidgetContext::SendPendingEvent(void)
 {
-       SysTryReturnResult(NID_SHELL, __pPendingEventList->GetCount() > 0 , E_DATA_NOT_FOUND, "There is no pending event.");
+       TryReturnResult(__pPendingEventList->GetCount() > 0 , "There is no pending event.");
 
        PendingEvent* pEvent = null;
        __pPendingEventList->GetAt(0, pEvent);
@@ -671,6 +671,8 @@ _AppWidgetContext::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
 void
 _AppWidgetContext::OnDisconnected(void)
 {
+       SysSecureLog(NID_SHELL, "%ls, %ls", GetInstanceId().GetPointer(), GetProviderId().GetPointer());
+
        __isTouchAvailable = false;
        if (GetAppWidgetPopup())
        {
index b9ce833..4291477 100644 (file)
@@ -72,7 +72,7 @@ _AppWidgetRequestHelper::SendAppControlRequest(const AppId& appId, const String&
                        break;
                }
 
-               SysLog(NID_SHELL, "[%s] Failed to invoke LaunchPkg(%s), %dth retry.", GetErrorMessage(r), pOperation.get(), retry);
+               SysLogException(NID_SHELL, r, "[%s] Failed to invoke LaunchPkg(%s), %dth retry.", GetErrorMessage(r), pOperation.get(), retry);
                Tizen::Base::Runtime::Thread::Sleep(TRY_SLEEP_TIME);
        }
 
index b35982e..d480356 100644 (file)
@@ -236,11 +236,8 @@ AppWidgetManagerService::OnIpcClientDisconnected(const _IpcServer& server, int c
        {
 
                pAppWidgetContextEnum->GetValue(pContext);
-               SysSecureLog(NID_SHELL, "%ls, %ls, %ls", pContext->GetInstanceId().GetPointer(), pContext->GetProviderId().GetPointer(), appId.GetPointer());
-
                if (pContext->GetAppId() == appId)
                {
-                       SysLog(NID_SHELL, "client(%d) is unregistered.", clientId);
                        pContext->OnDisconnected();
                }
        }
@@ -425,7 +422,7 @@ AppWidgetManagerService::OnAppWidgetPopupCreate(struct event_arg *arg, void* dat
 }
 
 int
-AppWidgetManagerService::OnAppWidgetPause(struct event_arg *arg, void* data)
+AppWidgetManagerService::OnAppWidgetBackground(struct event_arg *arg, void* data)
 {
         SysTryReturn(NID_SHELL, arg, 0, E_SUCCESS, "arg is null!");
 
@@ -439,7 +436,7 @@ AppWidgetManagerService::OnAppWidgetPause(struct event_arg *arg, void* data)
 }
 
 int
-AppWidgetManagerService::OnAppWidgetPauseAll(struct event_arg *arg, void* data)
+AppWidgetManagerService::OnAppWidgetBackgroundAll(struct event_arg *arg, void* data)
 {
        unique_ptr< IMapEnumeratorT<String, _AppWidgetContext*> > pAppWidgetContextEnum((AppWidgetManagerService::GetInstance()->__appWidgetContextList).GetMapEnumeratorN());
        SysTryReturn(NID_SHELL, pAppWidgetContextEnum, -1, E_SYSTEM, "[E_SYSTEM]");
@@ -456,7 +453,7 @@ AppWidgetManagerService::OnAppWidgetPauseAll(struct event_arg *arg, void* data)
 }
 
 int
-AppWidgetManagerService::OnAppWidgetResume(struct event_arg *pArg, void* pData)
+AppWidgetManagerService::OnAppWidgetForeground(struct event_arg *pArg, void* pData)
 {
        SysTryReturn(NID_SHELL, pArg || pArg->id || pArg->pkgname, 0, E_SUCCESS, "pArg is null!");
 
@@ -469,7 +466,7 @@ AppWidgetManagerService::OnAppWidgetResume(struct event_arg *pArg, void* pData)
 }
 
 int
-AppWidgetManagerService::OnAppWidgetResumeAll(struct event_arg *pArg, void* pData)
+AppWidgetManagerService::OnAppWidgetForegroundAll(struct event_arg *pArg, void* pData)
 {
        unique_ptr< IMapEnumeratorT<String, _AppWidgetContext*> > pAppWidgetContextEnum((AppWidgetManagerService::GetInstance()->__appWidgetContextList).GetMapEnumeratorN());
        SysTryReturn(NID_SHELL, pAppWidgetContextEnum, -1, E_SYSTEM, "[E_SYSTEM]");
@@ -548,10 +545,10 @@ AppWidgetManagerService::InitializeCoreDaemonEventReceiver(const char *pCoreDaem
 
     cbs.connected = AppWidgetConnected,
     cbs.disconnected = AppWidgetDisconnected,
-    cbs.pause = OnAppWidgetPauseAll,
-    cbs.resume = OnAppWidgetResumeAll,
-    cbs.lb_pause = OnAppWidgetPause,
-    cbs.lb_resume = OnAppWidgetResume,
+    cbs.pause = OnAppWidgetBackgroundAll,
+    cbs.resume = OnAppWidgetForegroundAll,
+    cbs.lb_pause = OnAppWidgetBackground,
+    cbs.lb_resume = OnAppWidgetForeground,
     cbs.lb_create = OnAppWidgetCreate,
     cbs.lb_destroy = OnAppWidgetDestroy,
     cbs.update_content = OnAppWidgetUpdate,