static const wchar_t CALENDAR_ITEM_TYPE[] = L"http://tizen.org/appcontrol/data/social/item_type";
static const wchar_t CALENDAR_RESULT_TYPE[] = L"http://tizen.org/appcontrol/data/social/result_type";
static const wchar_t CALENDAR_ITEM_ID[] = L"http://tizen.org/appcontrol/data/social/item_id";
+static const wchar_t CALENDAR_SELECTION_MODE[] = L"http://tizen.org/appcontrol/data/selection_mode";
result _OSP_EXPORT_ StartAppControl(int req, const String&, const String&, const String*, const String*, const IMap*);
{"osp.appcontrol.provider.calendar", "osp.appcontrol.operation.pick"},
{"tizen.calendar", "http://tizen.org/appcontrol/operation/pick"},
{"tizen.calendar", "http://tizen.org/appcontrol/operation/social/pick"},
+ {"tizen.todo", "http://tizen.org/appcontrol/operation/social/pick"},
};
static const char __allowedAppControlViewTable[][2][96] =
{"osp.appcontrol.CALENDAR", "osp.appcontrol.operation.VIEW"},
{"osp.appcontrol.provider.calendar", "osp.appcontrol.operation.view"},
{"tizen.calendar", "http://tizen.org/appcontrol/operation/social/view"},
+ {"tizen.todo", "http://tizen.org/appcontrol/operation/social/view"},
};
static const char __allowedAppControlEditTable[][2][96] =
static const char __allowedAppControlVcsViewTable[][2][96] =
{
{"tizen.calendar", "http://tizen.org/appcontrol/operation/view"},
+ {"tizen.todo", "http://tizen.org/appcontrol/operation/view"},
};
result
__req = req;
- const bool isCalendarVcsView = _AppControlManager::IsAllowedAppControl(__allowedAppControlVcsViewTable, 1, aId, oId);
- const bool isCalendarView = _AppControlManager::IsAllowedAppControl(__allowedAppControlViewTable, 3, aId, oId);
- const bool isCalendarPick = _AppControlManager::IsAllowedAppControl(__allowedAppControlPickTable, 4, aId, oId);
+ const bool isCalendarVcsView = _AppControlManager::IsAllowedAppControl(__allowedAppControlVcsViewTable, 2, aId, oId);
+ const bool isCalendarView = _AppControlManager::IsAllowedAppControl(__allowedAppControlViewTable, 4, aId, oId);
+ const bool isCalendarPick = _AppControlManager::IsAllowedAppControl(__allowedAppControlPickTable, 5, aId, oId);
const bool isCalendarEdit = _AppControlManager::IsAllowedAppControl(__allowedAppControlEditTable, 1, aId, oId);
SysTryReturnResult(NID_APP, isCalendarPick || isCalendarEdit || isCalendarView || isCalendarVcsView, E_SYSTEM, "Invalid AppControl entry for (%ls, %ls).", aId.GetPointer(), oId.GetPointer());
AppSvcResFn pCb = NULL;
+ String providerAppId;
String package;
String operation;
String uri;
#endif
pCb = OnAppControlResultTizen;
+ providerAppId = L"tizen.calendar_list";
operation = L"http://tizen.org/appcontrol/operation/social/pick";
- msg.AddData(CALENDAR_ITEM_TYPE, L"event");
+ const String& tmpItemType = msg.GetValue(L"itemType");
+ if (!tmpItemType.IsEmpty())
+ {
+ msg.AddData(CALENDAR_ITEM_TYPE, tmpItemType);
+ }
+ else if (aId == L"tizen.todo")
+ {
+ msg.AddData(CALENDAR_ITEM_TYPE, L"todo");
+ }
+ else
+ {
+ msg.AddData(CALENDAR_ITEM_TYPE, L"event");
+ }
- const String& tmp = msg.GetValue(L"itemType");
- if (!tmp.IsEmpty())
+ const String& tmpSelMode = msg.GetValue(L"selectionMode");
+ if (!tmpSelMode.IsEmpty())
{
- msg.AddData(CALENDAR_RESULT_TYPE, tmp);
+ msg.AddData(CALENDAR_SELECTION_MODE, tmpSelMode);
}
+
+ const String& tmpResultType = msg.GetValue(CALENDAR_RESULT_TYPE);
+ if (tmpResultType.IsEmpty())
+ {
+ msg.AddData(CALENDAR_RESULT_TYPE, L"vcs");
+ }
+
}
else if (isCalendarEdit)
{
hasOutput = true;
pCb = OnAppControlResultTizen;
+ providerAppId = L"tizen.calendar_edit";
operation = L"http://tizen.org/appcontrol/operation/social/edit";
msg.AddData(CALENDAR_ITEM_TYPE, L"event");
}
}
+ providerAppId = L"tizen.calendar_detail";
+
if (pActualUri)
{
SysLog(NID_APP, "Calendar AppControl : VIEW operation (vcs).");
operation = L"http://tizen.org/appcontrol/operation/social/view";
- msg.AddData(CALENDAR_ITEM_TYPE, L"event");
+ const String& tmpItemType = msg.GetValue(L"viewType");
+ if (!tmpItemType.IsEmpty())
+ {
+ msg.AddData(CALENDAR_ITEM_TYPE, tmpItemType);
+ }
+ else if (aId == L"tizen.todo")
+ {
+ msg.AddData(CALENDAR_ITEM_TYPE, L"todo");
+ }
+ else
+ {
+ msg.AddData(CALENDAR_ITEM_TYPE, L"event");
+ }
- const String& tmp = msg.GetValue(L"eventId");
- if (!tmp.IsEmpty())
+ const String& tmpEventId = msg.GetValue(L"eventId");
+ const String& tmpTodoId = msg.GetValue(L"todoId");
+ if (!tmpEventId.IsEmpty())
{
- msg.AddData(CALENDAR_ITEM_ID, tmp);
+ msg.AddData(CALENDAR_ITEM_ID, tmpEventId);
+ }
+ else if (!tmpTodoId.IsEmpty())
+ {
+ msg.AddData(CALENDAR_ITEM_ID, tmpTodoId);
}
}
}
- else
- {
- operation = oId;
- }
- package = _AppControlManager::GetAliasAppId(aId);
- SysLog(NID_APP, "Actual packageId is %ls.", package.GetPointer());
+ package = _AppControlManager::GetAliasAppId(providerAppId);
+ SysLog(NID_APP, "Actual app is %ls.", package.GetPointer());
__req = req;
__processId = _AppControlManager::GetInstance()->Launch(msg, package, operation, pActualUri, pMime, pCb, 0);
- SysTryReturnResult(NID_APP, __processId >= 0, E_SYSTEM, "StartAppControl: Launching Calendar AppControl is failed.");
+ r = GetLastResult();
+ SysTryReturnResult(NID_APP, __processId >= 0, r, "StartAppControl: Launching Calendar AppControl is failed.");
SysLog(NID_APP, "StartAppControl: Launching Calendar AppControl succeeded");
return E_SUCCESS;
+#if 0
CATCH:
if (hasOutput)
__req = -1;
return r;
+#endif
}
result