Implements WatchBase
[platform/core/appfw/widget-viewer.git] / watch-holder / api / sharable_watch.cc
index 4a28adc..6730637 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <dlog.h>
 
 #include "watch.h"
 #include "sharable_watch.h"
 
 #include "../src/watch.hh"
 
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "WATCH_HOLDER"
 
 #ifndef C_EXPORT
 #define C_EXPORT extern "C" __attribute__((visibility("default")))
@@ -31,12 +37,14 @@ struct sharable_watch_s : public ISharableWatch {};
 C_EXPORT int sharable_watch_resume(sharable_watch_h watch) {
   ISharableWatch* w = reinterpret_cast<ISharableWatch*>(watch);
   w->Resume();
+  LOGI("resume");
   return 0;
 }
 
 C_EXPORT int sharable_watch_pause(sharable_watch_h watch) {
   ISharableWatch* w = reinterpret_cast<ISharableWatch*>(watch);
   w->Pause();
+  LOGI("resume");
   return 0;
 }
 
@@ -62,9 +70,10 @@ C_EXPORT int sharable_watch_get_extra(sharable_watch_h watch, bundle **extra) {
   return 0;
 }
 
-C_EXPORT int sharable_watch_get_current_image(sharable_watch_h watch, Evas_Object **image) {
+C_EXPORT int sharable_watch_get_current_image(
+    sharable_watch_h watch, Evas_Object **image) {
   ISharableWatch* w = reinterpret_cast<ISharableWatch*>(watch);
-  *image = w->GetCurrentImage();
+  *image = w->GetCurrentImageEvas();
 
   if (*image == nullptr)
     return WATCH_HOLDER_ERROR_INVALID_OPERATION;
@@ -87,4 +96,4 @@ C_EXPORT int sharable_watch_block_update(sharable_watch_h watch, bool enable) {
   ISharableWatch* w = reinterpret_cast<ISharableWatch*>(watch);
   w->BlockUpdate(enable);
   return 0;
-}
+}
\ No newline at end of file