From: hyunho Date: Wed, 20 Mar 2019 02:45:52 +0000 (+0900) Subject: Update notification-ex event callback siganture X-Git-Tag: submit/tizen/20190326.074206~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F27%2F201827%2F1;p=platform%2Fcore%2Fappfw%2Fdata-provider-master.git Update notification-ex event callback siganture Change-Id: Ibebfaedfb4257d988c1eacf6f048fd4bae4df9e3 Signed-off-by: hyunho --- diff --git a/src/notification_ex_service.cc b/src/notification_ex_service.cc index 121fd9d..c1ae959 100644 --- a/src/notification_ex_service.cc +++ b/src/notification_ex_service.cc @@ -31,6 +31,7 @@ #include #include #include +#include #include "debug.h" #include "notification_ex_service.h" @@ -44,11 +45,11 @@ class DPMFacade { : reporter_(move(reporter)), manager_(move(manager)) { } - void DelegateReporterEvent(const EventInfo& info, shared_ptr item) { + void DelegateReporterEvent(const IEventInfo& info, shared_ptr item) { reporter_->SendEvent(info, item); } - void DelegateManagerEvent(const EventInfo& info, shared_ptr noti) { + void DelegateManagerEvent(const IEventInfo& info, shared_ptr noti) { manager_->SendEvent(info, noti); } @@ -60,7 +61,7 @@ static DPMFacade* facade_; class DPMReporter : public Reporter { protected: - void OnEvent(const EventInfo& info, + void OnEvent(const IEventInfo& info, list> noti_list) override { LOGI("Event received (%d) !!", (int)info.GetEventType()); for (auto& i : noti_list) { @@ -71,8 +72,9 @@ class DPMReporter : public Reporter { } } - list> OnRequestEvent(const EventInfo& info) override { + list> OnRequestEvent(const IEventInfo& info) override { DBG("Get report !!! %s", info.GetItemId().c_str()); + DBG("Get !!! uid(%d)", (int)(((const IEventInfoInternal&)info).GetUid())); list> ret { make_shared(info.GetItemId().c_str(), "title") }; @@ -88,7 +90,7 @@ class DPMReporter : public Reporter { class DPMManager : public Manager { protected: - void OnAdd(const EventInfo& info, + void OnAdd(const IEventInfo& info, list> addedItem) override { DBG("Add !!!"); //TODO: store it to DB @@ -96,19 +98,19 @@ class DPMManager : public Manager { facade_->DelegateReporterEvent(info, i); } - void OnUpdate(const EventInfo& info, + void OnUpdate(const IEventInfo& info, shared_ptr updatedItem) override { DBG("Update !!!"); facade_->DelegateReporterEvent(info, updatedItem); } - void OnDelete(const EventInfo& info, + void OnDelete(const IEventInfo& info, shared_ptr deletedItem) override { DBG("Delete !!!"); facade_->DelegateReporterEvent(info, deletedItem); } - list> OnRequestEvent(const EventInfo& info) override { + list> OnRequestEvent(const IEventInfo& info) override { DBG("Get !!! %s", info.GetItemId().c_str()); //TODO: Get it from DB list> ret {