Add block update feature 10/226610/11
authorhyunho <hhstark.kang@samsung.com>
Wed, 4 Mar 2020 06:34:20 +0000 (15:34 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Thu, 5 Mar 2020 03:24:25 +0000 (03:24 +0000)
Change-Id: If33ac471caa3dac9a7c4db8b869e600f4a0af186
Signed-off-by: hyunho <hhstark.kang@samsung.com>
watch-holder/api/watch.cc
watch-holder/api/watch.h
watch-holder/src/watch.cc
watch-holder/src/watch.hh

index 06d8fea..945a478 100644 (file)
@@ -168,3 +168,13 @@ C_EXPORT int watch_get_extra(watch_h watch, bundle **extra) {
 
   return WATCH_HOLDER_ERROR_NONE;
 }
+
+C_EXPORT int watch_set_block_update(watch_h watch, bool enable) {
+  Watch* w = reinterpret_cast<Watch*>(watch);
+  if (w == nullptr)
+    return WATCH_HOLDER_ERROR_INVALID_PARAMETER;
+
+  w->BlockUpdate(enable);
+
+  return WATCH_HOLDER_ERROR_NONE;
+}
\ No newline at end of file
index 505035e..d840a11 100644 (file)
@@ -58,6 +58,8 @@ int watch_is_bound(watch_h watch, bool *bound);
 
 int watch_cancel_touch(watch_h watch);
 
+int watch_block_update(watch_h watch, bool enable);
+
 
 #ifdef __cplusplus
 }
index 0ed3f94..8d450eb 100644 (file)
@@ -73,6 +73,10 @@ int Watch::Terminate() {
   return aul_terminate_pid(pid_);
 }
 
+void Watch::BlockUpdate(bool enable) {
+  RemoteSurface::SetBlock(enable);
+}
+
 void Watch::OnAuxMsg(void *data, Evas_Object *o, void *ev_info) {
        Watch* wa = (Watch*)data;
        Elm_Win_Aux_Message *msg = (Elm_Win_Aux_Message *)ev_info;
index 6173e8d..9dd9b9f 100644 (file)
@@ -61,6 +61,7 @@ class EXPORT_API Watch : private screen_connector::RemoteSurfaceEvas,
   int GetRid() const ;
   tizen_base::Bundle GetExtra() override;
   bool IsFaulted() override;
+  void BlockUpdate(bool enable);
 
  private:
   void OnEvasAdded(const std::string& appId, const std::string& instId,