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);
<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/>
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";
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 {
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);
}
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!");
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,
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;
}
{
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)