/**
* This method retrieves the app code.
- *
- * @return A constant reference to a string containing the app code.
+ *
+ * @return A constant reference to a string containing the app code.
*/
const String& GetAppCode() const;
/**
* This method retrieves the app id.
- *
- * @return A constant reference to a string containing the app id.
+ *
+ * @return A constant reference to a string containing the app id.
*/
const String& GetAppId() const;
/**
+ * This method retrieves the request app id.
+ *
+ * @return A constant reference to a string containing the request app id.
+ */
+ const String& GetRequestAppId() const;
+
+ /**
* This is a static method which returns the singleton's instance.
*
* @return A static reference to the instance of this singleton class.
*
* @param sAppId A constant reference to a string containing the app id.
*
+ * @param sRequestAppId A constant reference to a string containing the request app id.
+ *
* @return A Boolean indicating the result of initialization,
* <code>true</code> on success, <code>false</code> on failure. Note
* that if the object already exists and has been initialized,
* further attempts to call this methods fail (the return value is
* <code>false</code>.
*/
- bool Initialize(const String& sAppCode, const String& sAppId);
+ bool Initialize(const String& sAppCode, const String& sAppId, const String& sRequestAppId = "");
/**
* This method queries initialisation status.
static const String ILLEGAL_URL;
/**
+ * This constant represents an App ID.
+ */
+ String RequestAppId;
+
+ /**
* This is the default constructor.
*/
BaseQuery();
-libheremaps-engine.so.1.0.6_12
\ No newline at end of file
+libheremaps-engine.so.1.0.6_13
\ No newline at end of file
-libheremaps-engine.so.1.0.6_12
\ No newline at end of file
+libheremaps-engine.so.1.0.6_13
\ No newline at end of file
-libheremaps-engine.so.1.0.6_12
\ No newline at end of file
+libheremaps-engine.so.1.0.6_13
\ No newline at end of file
-libheremaps-engine.so.1.0.6_12
\ No newline at end of file
+libheremaps-engine.so.1.0.6_13
\ No newline at end of file
return HERE_ERROR_INVALID_PARAMETER;
String strKey(szKey);
- String strAppId, strAppCode;
+ String strAppId, strAppCode, strRequestAppId = "";
size_t nCodeStart;
nCodeStart = strKey.find("/");
strAppId = strKey.substr(0, nCodeStart);
strAppCode = strKey.substr(nCodeStart+1, std::string::npos);
- if(!ApplicationContext::GetInstance().Initialize(strAppCode, strAppId))
+ if (ApplicationContext::GetInstance().GetRequestAppId().length() < 1) {
+ char *strAppId = NULL;
+ pid_t nProcessId = getpid();
+
+ app_manager_get_app_id(nProcessId, &strAppId);
+ if (strAppId != NULL) {
+ MAPS_LOGE("RequestAppId is %s", strAppId);
+ strRequestAppId.append(strAppId);
+ g_free(strAppId);
+ }
+ } else
+ strRequestAppId = ApplicationContext::GetInstance().GetRequestAppId();
+
+ if(!ApplicationContext::GetInstance().Initialize(strAppCode, strAppId, strRequestAppId))
return HERE_ERROR_INVALID_OPERATION;
//MAPS_LOGD("[success] credential setted to 'XXXXX/XXXXX'");