Merge "Add ivi profile" into devel/master
[platform/core/uifw/dali-adaptor.git] / adaptors / tizen / adaptor-impl-tizen.cpp
index 89dcdfe..b4a56eb 100644 (file)
@@ -19,7 +19,7 @@
 #include <adaptor-impl.h>
 
 // EXTERNAL INCLUDES
-#ifdef OVER_TIZEN_SDK_2_2
+#ifdef  USE_APPFW
 #include <app.h>
 #endif
 
@@ -34,9 +34,34 @@ namespace Adaptor
 
 void Adaptor::GetDataStoragePath( std::string& path)
 {
-  path = "";
-#ifdef OVER_TIZEN_SDK_2_2
-  path = app_get_data_path();
+#ifdef USE_APPFW
+  char *pathInt = app_get_data_path();
+  if ( pathInt )
+  {
+    path = pathInt;
+    free( pathInt );
+  }
+  else
+  {
+    path = "";
+  }
+#endif
+
+}
+
+void Adaptor::GetAppId( std::string& appId )
+{
+#ifdef USE_APPFW
+  char *id;
+  app_get_id(&id);
+  if ( id )
+  {
+    appId = id;
+  }
+  else
+  {
+    appId = "";
+  }
 #endif
 }