From: jungmin76.park Date: Mon, 15 Jul 2013 11:13:27 +0000 (+0900) Subject: modify method names to give consitancy X-Git-Tag: accepted/tizen/20130912.081830~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a0740cd55a0a8595f2ad1afac8fb96d93bc222c;p=platform%2Fframework%2Fnative%2Fappwidget-service.git modify method names to give consitancy Change-Id: I4e4a429e3e1673636f9b12ef86976e55a505467d Signed-off-by: jungmin76.park --- diff --git a/inc/FShell_AppWidgetManagerService.h b/inc/FShell_AppWidgetManagerService.h index a734776..0af5429 100644 --- a/inc/FShell_AppWidgetManagerService.h +++ b/inc/FShell_AppWidgetManagerService.h @@ -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); diff --git a/src/FShell_AppWidgetContext.cpp b/src/FShell_AppWidgetContext.cpp index 4e7495e..4fd06d1 100644 --- a/src/FShell_AppWidgetContext.cpp +++ b/src/FShell_AppWidgetContext.cpp @@ -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()) { diff --git a/src/FShell_AppWidgetContextHelper.cpp b/src/FShell_AppWidgetContextHelper.cpp index b9ce833..4291477 100644 --- a/src/FShell_AppWidgetContextHelper.cpp +++ b/src/FShell_AppWidgetContextHelper.cpp @@ -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); } diff --git a/src/FShell_AppWidgetManagerService.cpp b/src/FShell_AppWidgetManagerService.cpp index b35982e..d480356 100644 --- a/src/FShell_AppWidgetManagerService.cpp +++ b/src/FShell_AppWidgetManagerService.cpp @@ -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 > 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 > 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,