#include <FBaseInteger.h>
#include <FBaseColArrayList.h>
#include <FBaseColHashMap.h>
+#include <FBaseByteBuffer.h>
#include <FBaseUtilStringTokenizer.h>
-
#include <FBaseSysLog.h>
+
#include <FBase_StringConverter.h>
#include "FApp_MapDataControlImpl.h"
static const char OSP_V_REQUEST_TYPE_MAP_UPDATE[] = "map_update";
static const char OSP_V_REQUEST_TYPE_MAP_DELETE[] = "map_delete";
static const char OSP_V_VERSION_2_1_0_3[] = "ver_2.1.0.3";
+
static const char BUNDLE_KEY_PREFIX_AUL[] = "__AUL_";
static const char BUNDLE_KEY_PREFIX_SERVICE[] = "__APP_SVC_";
static const char BUNDLE_KEY_PREFIX_OSP[] = "__OSP_";
static const char BUNDLE_KEY_PREFIX_UG[] = "__UG_";
+
+static const char OSP_K_SUBMODE_CALLEE[] = "__OSP_SUB_CALLEE__";
+static const char OSP_K_SERVICE_CALLEE[] = "__OSP_SERVICE_CALLEE__";
+
const char TIZEN_NOTIFICATION_DATA[] = "http://tizen.org/appcontrol/data/notification";
const wchar_t LEGACY_OPERATION_MAIN[] = L"osp.operation.MAIN";
bundle*
_AppArg::GetBundleFromSvc(void* svc)
{
- struct DummyS
- {
- int dummy1;
- int dummy2;
- bundle* pData;
- };
+ bundle* pBundle = NULL;
+ int ret = service_to_bundle(static_cast<service_h>(svc), &pBundle);
- DummyS* pDummy = static_cast<DummyS*>(svc);
-
- if (pDummy && pDummy->pData)
- {
- return pDummy->pData;
- }
-
- return NULL;
+ return (ret == SERVICE_ERROR_NONE) ? pBundle : NULL;
}
_AppArg::IsSubMode(bundle* pBundle)
{
const char* p = appsvc_get_data(pBundle, OSP_K_SUBMODE_CALLEE);
- if (p && (strncmp(p, "1", sizeof(char)) == 0))
- {
- return true;
- }
+ return (p && (strncmp(p, "1", sizeof(char)) == 0));
+}
- return false;
+
+void
+_AppArg::UpdateServiceApp(bundle* pBundle)
+{
+ appsvc_add_data(pBundle, OSP_K_SERVICE_CALLEE, "1");
+}
+
+
+bool
+_AppArg::IsServiceApp(bundle* pBundle)
+{
+ const char* p = appsvc_get_data(pBundle, OSP_K_SERVICE_CALLEE);
+ return (p && (strncmp(p, "1", sizeof(char)) == 0));
}