#include <adaptor-impl.h>
// EXTERNAL INCLUDES
-#ifdef OVER_TIZEN_SDK_2_2
-#include <app.h>
+#include <app_common.h>
+#ifdef APPCORE_WATCH_AVAILABLE
+#include <screen_connector_provider.h>
+#include <ecore-wl-render-surface.h>
#endif
namespace Dali
void Adaptor::GetDataStoragePath( std::string& path)
{
- path = "";
-#ifdef OVER_TIZEN_SDK_2_2
+#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
+}
+
+void Adaptor::SurfaceInitialized()
+{
+#ifdef APPCORE_WATCH_AVAILABLE
+ if ( !mUseRemoteSurface )
+ {
+ return;
+ }
+ char *appId;
+ app_get_id(&appId);
+
+ Ecore_Wl_Window* ecoreWlWindow = AnyCast<Ecore_Wl_Window*>( mNativeWindow );
+ screen_connector_provider_remote_enable(appId, ecore_wl_window_surface_get(ecoreWlWindow));
#endif
}