minor change
authorjungmin76.park <jungmin76.park@samsung.com>
Mon, 18 Mar 2013 04:12:01 +0000 (13:12 +0900)
committerjungmin76.park <jungmin76.park@samsung.com>
Mon, 18 Mar 2013 04:12:01 +0000 (13:12 +0900)
Change-Id: I792af6e7f30fc3d48e53cfd00af64cc9afaed363
Signed-off-by: jungmin76.park <jungmin76.park@samsung.com>
inc/FShell_AppWidgetManagerService.h
manifest.xml
src/FShell_AppWidgetContextBase.cpp
src/FShell_AppWidgetManagerService.cpp
src/FShell_AppWidgetManagerStub.cpp

index b64404d..e0743aa 100644 (file)
@@ -58,7 +58,7 @@ 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 OnLivePause(struct event_arg *arg, void* data);
+       static int OnAppWidgetPause(struct event_arg *arg, void* data);
        static int OnAppWidgetResume(struct event_arg *arg, void* data);
        static int OnAppWidgetClick(struct event_arg *arg, void* data);
        static int OnAppWidgetResize(struct event_arg *arg, void* data);
index e0267db..3b1da14 100644 (file)
@@ -19,9 +19,9 @@
             <Privilege>http://tizen.org/privilege/appmanager.launch</Privilege>
             <Privilege>http://tizen.org/privilege/application.kill</Privilege>
         </Privileges>
-        <ServiceApp Name="osp-livebox-service" Main="True">
+        <ServiceApp Name="osp-appwidget-service" Main="True">
             <DisplayNames>
-                <DisplayName Locale="eng-GB">tizen livebox service</DisplayName>
+                <DisplayName Locale="eng-GB">Tizen Appwidget Service</DisplayName>
             </DisplayNames>
             <Icons/>
             <DataControls/>
index edfe313..c952843 100644 (file)
@@ -85,15 +85,6 @@ using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 
 
-const String APPWIDGET_ON_ADD(L"AppWidget='event=add'");
-const String APPWIDGET_ON_REMOVE(L"AppWidget='event=remove'");
-const String APPWIDGET_ON_UPDATE(L"AppWidget='event=update'");
-const String APPWIDGET_ON_RESIZE(L"AppWidget='event=resize'");
-const String APPWIDGET_ON_TOUCH(L"AppWidget='event=touch'");
-const String APPWIDGET_POPUP_ON_CREATE(L"AppWidgetPopup='event=create'");
-const String APPWIDGET_POPUP_ON_DESTROY(L"AppWidgetPopup='event=destroy'");
-const String APPWIDGET_POPUP_ON_TOUCH(L"AppWidgetPopup='event=touch'");
-
 const String ARG_KEY_INSTANCE_ID = L"_InstanceId";
 const String ARG_KEY_PROVIDER_NAME = L"_ProviderName";
 const String ARG_KEY_USER_INFO = L"_UserInfo";
@@ -228,72 +219,6 @@ _AppWidgetRequestHelper::SendRequestToApp(const AppId& appId, const String& oper
        return Tizen::App::_AppControlManager::GetInstance()->LaunchPkg(msg, pAppId.get(), pOperation.get(), null, null, null, null);
 }
 
-/*result
-_AppWidgetRequestHelper::ExtractPackageIdAndExecutableName(AppId appId, AppId& outPackageId, String& outExecutableName)
-{
-       const int APP_ID_LEN = 10;
-
-       if (appId.GetLength() > APP_ID_LEN)
-       {
-               result r = appId.SubString(APP_ID_LEN + 1, appId.GetLength() - (APP_ID_LEN + 1), outExecutableName);
-               SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_ARG, "invalid AppId(%ls)", appId.GetPointer());
-
-               r = appId.SubString(0, APP_ID_LEN, outPackageId);
-               SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_ARG, "invalid AppId(%ls)", appId.GetPointer());
-
-               return E_SUCCESS;
-       }
-       return E_SYSTEM;
-}*/
-
-/*
-// helper for bundle
-result
-_AppWidgetRequestHelper::AddStrArrayToBundle(bundle* b, const char* key, const IList* pList)
-{
-       bundle* pb = b;
-       SysTryReturnResult(NID_APP, pb != NULL, E_INVALID_ARG, "Empty bundle.");
-
-       if (pList == null || pList->GetCount() == 0)
-       {
-               SysLog(NID_APP, "No element added for bundle.");
-               return E_SUCCESS;
-       }
-
-       int i = 0;
-       const int count = pList->GetCount();
-
-       const char** pSa = new (std::nothrow) const char*[count];
-       SysTryReturnResult(NID_APP, pSa != null, E_OUT_OF_MEMORY, "Memory allocation failure with cound %d.", count);
-
-       for (i = 0; i < count; i++)
-       {
-               pSa[i] = null;
-
-               const String* pStr = static_cast<const String*>(pList->GetAt(i));
-               if (pStr)
-               {
-                       pSa[i] = _StringConverter::CopyToCharArrayN(*pStr);
-               }
-       }
-
-       result r = E_SUCCESS;
-
-       int ret = bundle_add_str_array(pb, key, pSa, count);
-       SysTryReturnResult(NID_APP, ret >= 0, E_SYSTEM, "Bundle add failre with %d.", strerror(errno));
-
-//CATCH:
-       for (i = 0; i < count; i++)
-       {
-               delete[] pSa[i];
-       }
-
-       delete[] pSa;
-
-       return r;
-}
-*/
-
 } } } // Tizen::Shell::App {
 
 
index e5769a9..054680c 100644 (file)
@@ -320,7 +320,7 @@ int
 AppWidgetManagerService::OnAppWidgetPopupCreate(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, "packageName(%s), id(%s), x(%d), y(%d), width(%f), height(%f), priority(%d)", arg->pkgname, arg->id, arg->info.pd_create.x, arg->info.pd_create.y, arg->info.pd_create.w, arg->info.pd_create.h);
 
        _AppWidgetContext* pAppWidgetContext = AppWidgetManagerService::GetInstance()->Find(arg->pkgname, arg->id);
        SysTryReturnResult(NID_APP, pAppWidgetContext , E_SYSTEM, "[E_SYSTEM] pAppWidgetContext is null for appId(%s), instanceId(%s)", arg->pkgname, arg->id);
@@ -348,7 +348,7 @@ AppWidgetManagerService::OnAppWidgetPopupCreate(struct event_arg *arg, void* dat
 }
 
  int
- AppWidgetManagerService::OnLivePause(struct event_arg *arg, void* data)
+ AppWidgetManagerService::OnAppWidgetPause(struct event_arg *arg, void* data)
 {
         SysTryReturn(NID_APP, arg, 0, E_SUCCESS, "arg is null!");
 
@@ -424,9 +424,9 @@ AppWidgetManagerService::InitializeMasterDaemonEventReceiver(const char *pServic
 
     cbs.connected = AppWidgetConnected,
     cbs.disconnected = AppWidgetDisconnected,
-    cbs.pause = OnLivePause,
+    cbs.pause = OnAppWidgetPause,
     cbs.resume = OnAppWidgetResume,
-//    cbs.lb_pause = OnLivePause,
+//    cbs.lb_pause = OnAppWidgetPause,
 //    cbs.lb_resume = OnAppWidgetResume,
     cbs.lb_create = OnAppWidgetCreate,
     cbs.lb_destroy = OnAppWidgetDestroy,
@@ -538,6 +538,7 @@ AppWidgetManagerService::RequestSharedMemoryId(const Tizen::App::AppId& appId, c
 
        shmId = pAppWidgetContext->GetSharedMemId(width, height);
        SysTryReturnResult(NID_APP, pAppWidgetContext , shmId != -1, "[E_SYSTEM] failed to GetSharedMemId for (%ls) (%ls)", appId.GetPointer(), instanceId.GetPointer());
+
     return E_SUCCESS;
 }
 
index 61344ce..9a2f5c0 100644 (file)
@@ -190,6 +190,8 @@ _AppWidgetManagerStub::OnIpcRequestReceived(_IpcServer& server, const IPC::Messa
 {
        SysLog(NID_APP, "(appId:%ls, pid:%d, clientId:%d)\n", server.GetClientAppId().GetPointer(), server.GetClientProcessId(), server.GetClientId());
 
+       SysAssertf(__pIpcServer, "__pIpcServer is null!");
+
        IPC_BEGIN_MESSAGE_MAP(_AppWidgetManagerStub, message)
                IPC_MESSAGE_HANDLER_EX(AppWidgetManager_RequestUpdate, &server, OnRequestUpdate)
                IPC_MESSAGE_HANDLER_EX(AppWidgetManager_RequestUpdateInstance, &server, OnRequestUpdateInstance)