summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjongmun.woo <jongmun.woo@samsung.com>2016-05-10 21:59:35 +0900
committerjongmun.woo <jongmun.woo@samsung.com>2016-05-11 12:24:20 +0900
commit9dfcf6e816377867ce522763e4acce5d701760b1 (patch)
tree8dee36822b3a420ba3c9a2c93f49b95bd05180fb
parent37cdfcb62a9271d5c06ae113c3c9b944548581a4 (diff)
downloadmaps-plugin-here-accepted/tizen/mobile/20160512.050841.tar.gz
maps-plugin-here-accepted/tizen/mobile/20160512.050841.tar.bz2
maps-plugin-here-accepted/tizen/mobile/20160512.050841.zip
Signed-off-by: jongmun.woo <jongmun.woo@samsung.com> Change-Id: I5fff8caa9a7b8626bdde0f4f5191887f98aec827
-rwxr-xr-xinc/engine/common/ApplicationContext.h19
-rwxr-xr-xinc/engine/common/BaseQuery.h5
l---------lib/aarch64/libheremaps-engine.so.12
-rw-r--r--[-rwxr-xr-x]lib/aarch64/libheremaps-engine.so.1.0.6_13 (renamed from lib/aarch64/libheremaps-engine.so.1.0.6_12)bin15682328 -> 15689504 bytes
l---------lib/arm/libheremaps-engine.so.12
-rw-r--r--[-rwxr-xr-x]lib/arm/libheremaps-engine.so.1.0.6_13 (renamed from lib/arm/libheremaps-engine.so.1.0.6_12)bin12532312 -> 12537244 bytes
l---------lib/i586/libheremaps-engine.so.12
-rw-r--r--[-rwxr-xr-x]lib/i586/libheremaps-engine.so.1.0.6_13 (renamed from lib/i586/libheremaps-engine.so.1.0.6_12)bin12710476 -> 12716312 bytes
l---------lib/x86_64/libheremaps-engine.so.12
-rw-r--r--[-rwxr-xr-x]lib/x86_64/libheremaps-engine.so.1.0.6_13 (renamed from lib/x86_64/libheremaps-engine.so.1.0.6_12)bin15494488 -> 15500808 bytes
-rw-r--r--src/here_manager.cpp17
11 files changed, 38 insertions, 11 deletions
diff --git a/inc/engine/common/ApplicationContext.h b/inc/engine/common/ApplicationContext.h
index d19dd95..4f4fa6b 100755
--- a/inc/engine/common/ApplicationContext.h
+++ b/inc/engine/common/ApplicationContext.h
@@ -58,19 +58,26 @@ public:
/**
* 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.
@@ -84,13 +91,15 @@ public:
*
* @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.
diff --git a/inc/engine/common/BaseQuery.h b/inc/engine/common/BaseQuery.h
index 3123bd7..3e50987 100755
--- a/inc/engine/common/BaseQuery.h
+++ b/inc/engine/common/BaseQuery.h
@@ -62,6 +62,11 @@ protected:
static const String ILLEGAL_URL;
/**
+ * This constant represents an App ID.
+ */
+ String RequestAppId;
+
+ /**
* This is the default constructor.
*/
BaseQuery();
diff --git a/lib/aarch64/libheremaps-engine.so.1 b/lib/aarch64/libheremaps-engine.so.1
index 0f3e16b..87c6e3c 120000
--- a/lib/aarch64/libheremaps-engine.so.1
+++ b/lib/aarch64/libheremaps-engine.so.1
@@ -1 +1 @@
-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
diff --git a/lib/aarch64/libheremaps-engine.so.1.0.6_12 b/lib/aarch64/libheremaps-engine.so.1.0.6_13
index e34a904..c50cc19 100755..100644
--- a/lib/aarch64/libheremaps-engine.so.1.0.6_12
+++ b/lib/aarch64/libheremaps-engine.so.1.0.6_13
Binary files differ
diff --git a/lib/arm/libheremaps-engine.so.1 b/lib/arm/libheremaps-engine.so.1
index 0f3e16b..87c6e3c 120000
--- a/lib/arm/libheremaps-engine.so.1
+++ b/lib/arm/libheremaps-engine.so.1
@@ -1 +1 @@
-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
diff --git a/lib/arm/libheremaps-engine.so.1.0.6_12 b/lib/arm/libheremaps-engine.so.1.0.6_13
index 2f011ed..7329a8a 100755..100644
--- a/lib/arm/libheremaps-engine.so.1.0.6_12
+++ b/lib/arm/libheremaps-engine.so.1.0.6_13
Binary files differ
diff --git a/lib/i586/libheremaps-engine.so.1 b/lib/i586/libheremaps-engine.so.1
index 0f3e16b..87c6e3c 120000
--- a/lib/i586/libheremaps-engine.so.1
+++ b/lib/i586/libheremaps-engine.so.1
@@ -1 +1 @@
-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
diff --git a/lib/i586/libheremaps-engine.so.1.0.6_12 b/lib/i586/libheremaps-engine.so.1.0.6_13
index 1d587a9..135a916 100755..100644
--- a/lib/i586/libheremaps-engine.so.1.0.6_12
+++ b/lib/i586/libheremaps-engine.so.1.0.6_13
Binary files differ
diff --git a/lib/x86_64/libheremaps-engine.so.1 b/lib/x86_64/libheremaps-engine.so.1
index 0f3e16b..87c6e3c 120000
--- a/lib/x86_64/libheremaps-engine.so.1
+++ b/lib/x86_64/libheremaps-engine.so.1
@@ -1 +1 @@
-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
diff --git a/lib/x86_64/libheremaps-engine.so.1.0.6_12 b/lib/x86_64/libheremaps-engine.so.1.0.6_13
index 9eef082..4d4c694 100755..100644
--- a/lib/x86_64/libheremaps-engine.so.1.0.6_12
+++ b/lib/x86_64/libheremaps-engine.so.1.0.6_13
Binary files differ
diff --git a/src/here_manager.cpp b/src/here_manager.cpp
index e99dd78..02e06d8 100644
--- a/src/here_manager.cpp
+++ b/src/here_manager.cpp
@@ -261,7 +261,7 @@ here_error_e HereManager::SetCredentials(const char *szKey)
return HERE_ERROR_INVALID_PARAMETER;
String strKey(szKey);
- String strAppId, strAppCode;
+ String strAppId, strAppCode, strRequestAppId = "";
size_t nCodeStart;
nCodeStart = strKey.find("/");
@@ -275,7 +275,20 @@ here_error_e HereManager::SetCredentials(const char *szKey)
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'");