From: hyunho Date: Mon, 3 Feb 2020 09:25:09 +0000 (+0900) Subject: Implement NotifyChangedEvent X-Git-Tag: submit/tizen/20200209.233938~2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45b4950c3f60033cc1d23dee4203a1f0e94da27b;p=platform%2Fcore%2Fappfw%2Fwidget-viewer.git Implement NotifyChangedEvent Signed-off-by: hyunho --- diff --git a/watch-holder/src/common.hh b/watch-holder/src/common.hh index 3955fc2..3d70a68 100644 --- a/watch-holder/src/common.hh +++ b/watch-holder/src/common.hh @@ -22,4 +22,7 @@ #endif #define EXPORT_API __attribute__((visibility("default"))) +#define NOTIFY_CHANGED_EVENT_END_POINT "watch_holder,changed" +#define NOTIFY_CHANGED_EVENT_APPID "watch_holder,changed,appid" + #endif // __WATCH_HOLDER_COMMON_HH__ diff --git a/watch-holder/src/watch.cc b/watch-holder/src/watch.cc index bfd95b5..2a6da1c 100644 --- a/watch-holder/src/watch.cc +++ b/watch-holder/src/watch.cc @@ -16,6 +16,7 @@ #include #include +#include #include "watch.hh" @@ -105,4 +106,15 @@ void Watch::OnEvasChanged(const std::string& appId, const std::string& instId, listener_->OnUpdated(*this); } +int Watch::NotifyChangedEvent() { + tizen_base::Bundle b; + b.Add(NOTIFY_CHANGED_EVENT_APPID, appid_); + int ret = aul_app_com_send(NOTIFY_CHANGED_EVENT_END_POINT, b.GetHandle()); + if (ret != 0) { + LOGE("Fail to send noti (%d)", ret); + return -1; + } + return 0; +} + } // namspace watch_holder diff --git a/watch-holder/src/watch.hh b/watch-holder/src/watch.hh index 8bf2464..53aa4ae 100644 --- a/watch-holder/src/watch.hh +++ b/watch-holder/src/watch.hh @@ -43,7 +43,7 @@ class EXPORT_API Watch : private screen_connector::RemoteSurfaceEvas { void Bind(Evas_Object* win); void Unbind(); Evas_Object* GetCurrentImage() const ; - void NotifyChangedEvent(); + int NotifyChangedEvent(); bool IsBound(); std::string GetAppId(); int GetPid() const ;