using namespace watch_holder;
-struct watch_s : public Watch {};
+struct watch_s : public WatchBase {};
C_EXPORT int watch_resume(watch_h watch) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_pause(watch_h watch) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_terminate(watch_h watch) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_bind(watch_h watch, Evas_Object *win) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
- w->Bind(win);
+ ((Watch*)w)->Bind(win);
return WATCH_HOLDER_ERROR_NONE;
}
C_EXPORT int watch_unbind(watch_h watch) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_get_appid(watch_h watch, char **appid) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_get_pid(watch_h watch, int *pid) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_get_current_image(watch_h watch, Evas_Object **image) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr || image == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
- *image = w->GetCurrentImage();
+ *image = ((Watch*)w)->GetCurrentImageEvas();
if (*image == nullptr)
return WATCH_HOLDER_ERROR_INVALID_OPERATION;
}
C_EXPORT int watch_notify_changed_event(watch_h watch) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_get_rid(watch_h watch, int *rid) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr || rid == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_is_faulted(watch_h watch, bool *faulted) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr || faulted == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_is_bound(watch_h watch, bool *bound) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr || bound == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_cancel_touch(watch_h watch) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_get_extra(watch_h watch, bundle **extra) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr || extra == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
}
C_EXPORT int watch_block_update(watch_h watch, bool enable) {
- Watch* w = reinterpret_cast<Watch*>(watch);
+ WatchBase* w = reinterpret_cast<WatchBase*>(watch);
if (w == nullptr)
return WATCH_HOLDER_ERROR_INVALID_PARAMETER;