Home
last modified time | relevance | path

Searched refs:commonEventListener (Results 1 – 25 of 39) sorted by relevance

12

/base/notification/common_event_service/frameworks/core/test/unittest/
Dcommon_event_listener_test.cpp57 CommonEventListener commonEventListener(commonEventSubscriber);
58 commonEventListener.runner_ = nullptr;
59 EXPECT_EQ(OHOS::ERR_INVALID_OPERATION, commonEventListener.Init());
71 CommonEventListener commonEventListener(commonEventSubscriber);
72 commonEventListener.runner_ = OHOS::AppExecFwk::EventRunner::Create("CesFwkListener");
73commonEventListener.handler_ = std::make_shared< OHOS::AppExecFwk::EventHandler>(commonEventListen…
74 EXPECT_EQ(OHOS::ERR_OK, commonEventListener.Init());
86 CommonEventListener commonEventListener(commonEventSubscriber);
87 commonEventListener.runner_ = OHOS::AppExecFwk::EventRunner::Create("CesFwkListener");
88 commonEventListener.handler_ = nullptr;
[all …]
Dcommon_event_proxy_test.cpp165 OHOS::sptr<OHOS::IRemoteObject> commonEventListener = new OHOS::MockIRemoteObject(); variable
173 int result = commonEventProxy.PublishCommonEvent(data, publishInfo, commonEventListener, useId);
190 OHOS::sptr<OHOS::IRemoteObject> commonEventListener = new OHOS::MockIRemoteObject(); variable
201 … bool result = commonEventProxy.PublishCommonEvent(data, publishInfo, commonEventListener, useId);
218 OHOS::sptr<OHOS::IRemoteObject> commonEventListener = new OHOS::MockIRemoteObject(); variable
229 … bool result = commonEventProxy.PublishCommonEvent(data, publishInfo, commonEventListener, useId);
246 OHOS::sptr<OHOS::IRemoteObject> commonEventListener = new OHOS::MockIRemoteObject(); variable
257 … bool result = commonEventProxy.PublishCommonEvent(data, publishInfo, commonEventListener, useId);
274 OHOS::sptr<OHOS::IRemoteObject> commonEventListener = new OHOS::MockIRemoteObject(); variable
302 OHOS::sptr<OHOS::IRemoteObject> commonEventListener = new OHOS::MockIRemoteObject(); variable
[all …]
/base/notification/common_event_service/services/test/moduletest/common_event_services_module_test/
Dcommon_event_services_module_test.cpp123 sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); variable
126 subscribeInfo, commonEventListener), ERR_OK);
143 sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); variable
146 subscribeInfo, commonEventListener), ERR_OK);
163 sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); variable
166 subscribeInfo, commonEventListener), ERR_OK);
221 sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); variable
224 subscribeInfo, commonEventListener), ERR_OK);
242 sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); variable
245 subscribeInfo, commonEventListener), ERR_OK);
[all …]
/base/notification/common_event_service/test/benchmarktest/common_event_service_test/
Dcommon_event_manager_service_test.cpp75 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); in BENCHMARK_F() local
79 subscribeInfo, commonEventListener); in BENCHMARK_F()
99 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); in BENCHMARK_F() local
103 subscribeInfo, commonEventListener); in BENCHMARK_F()
123 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); in BENCHMARK_F() local
127 subscribeInfo, commonEventListener); in BENCHMARK_F()
147 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); in BENCHMARK_F() local
151 commonEventListener); in BENCHMARK_F()
178 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberPtr); in BENCHMARK_F() local
182 commonEventData, publishInfo, commonEventListener, UNDEFINED_USER); in BENCHMARK_F()
[all …]
/base/notification/common_event_service/services/test/unittest/
Dcommon_event_freeze_unit_test.cpp92 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
97 subscribeInfoPtr, commonEventListener, curTime, eventRecordInfo_);
124 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
129 subscribeInfoPtr, commonEventListener, curTime, eventRecordInfo_);
156 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
161 subscribeInfoPtr, commonEventListener, curTime, eventRecordInfo_);
170 eventSubscriberRecord->commonEventListener = commonEventListener;
206 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
211 subscribeInfoPtr, commonEventListener, curTime, eventRecordInfo_);
220 eventSubscriberRecord->commonEventListener = commonEventListener;
[all …]
Dcommon_event_unsubscribe_unit_test.cpp101 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
102 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
138 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
139 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
182 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
187 EXPECT_EQ(OHOS::ERR_OK, commonEventSubscriberManager.RemoveSubscriber(commonEventListener));
205 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
206 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
228 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
229 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
Dcommon_event_freeze_test.cpp58 OHOS::sptr<OHOS::IRemoteObject> commonEventListener; variable
72 OHOS::sptr<OHOS::IRemoteObject> &commonEventListener);
74 …ared_ptr<CommonEventSubscriber> &subscriber, OHOS::sptr<OHOS::IRemoteObject> &commonEventListener);
118 …ion<void()> asyncProcessFunc = std::bind(&SubscriberTest::AsyncProcess, this, commonEventListener); in ProcessSubscriberTestCase1()
128 void AsyncProcess(OHOS::sptr<OHOS::IRemoteObject> commonEventListener) in AsyncProcess() argument
130 …EXPECT_TRUE(CommonEventFreezeTest::FinishReceiver(commonEventListener, CHANGECODE, CHANGEDATA, fal… in AsyncProcess()
183 void AsyncProcess(OHOS::sptr<OHOS::IRemoteObject> commonEventListener) in AsyncProcess() argument
185 …EXPECT_TRUE(CommonEventFreezeTest::FinishReceiver(commonEventListener, CHANGECODE2, CHANGEDATA2, f… in AsyncProcess()
242 void AsyncProcess(OHOS::sptr<OHOS::IRemoteObject> commonEventListener) in AsyncProcess() argument
244 …EXPECT_TRUE(CommonEventFreezeTest::FinishReceiver(commonEventListener, CHANGECODE2, CHANGEDATA2, f… in AsyncProcess()
[all …]
Dcommon_event_subscribe_unit_test.cpp82 const OHOS::sptr<OHOS::IRemoteObject> &commonEventListener, const int32_t &userId) in PublishCommonEvent() argument
88 …ommonEventSubscribeInfo &subscribeInfo, const OHOS::sptr<OHOS::IRemoteObject> &commonEventListener) in SubscribeCommonEvent() argument
93 … virtual int32_t UnsubscribeCommonEvent(const OHOS::sptr<OHOS::IRemoteObject> &commonEventListener) in UnsubscribeCommonEvent() argument
636 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
637 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
662 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
663 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
713 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
714 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
724 subscribeInfoPtr, commonEventListener, curTime, eventRecordInfo);
[all …]
Dcommon_event_publish_ordered_event_unit_test.cpp148 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
159 …data, publishInfo, commonEventListener, curTime, PID, SYSTEM_UID, tokenID, UNDEFINED_USER, "bundle…
200 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
208 …data, publishInfo, commonEventListener, curTime, PID, SYSTEM_UID, tokenID, UNDEFINED_USER, "bundle…
248 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
249 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
297 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
298 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
589 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
599 …data, publishInfo, commonEventListener, curTime, PID, SYSTEM_UID, tokenID, UNDEFINED_USER, "bundle…
[all …]
/base/notification/common_event_service/frameworks/core/src/
Dcommon_event.cpp39 sptr<IRemoteObject> commonEventListener = nullptr; in PublishCommonEvent() local
40 if (!PublishParameterCheck(data, publishInfo, subscriber, commonEventListener)) { in PublishCommonEvent()
46 data, publishInfo, commonEventListener, UNDEFINED_USER) == ERR_OK ? true : false; in PublishCommonEvent()
54 sptr<IRemoteObject> commonEventListener = nullptr; in PublishCommonEventAsUser() local
55 if (!PublishParameterCheck(data, publishInfo, subscriber, commonEventListener)) { in PublishCommonEventAsUser()
60 return commonEventProxy_->PublishCommonEvent(data, publishInfo, commonEventListener, userId); in PublishCommonEventAsUser()
68 sptr<IRemoteObject> commonEventListener = nullptr; in PublishCommonEvent() local
69 if (!PublishParameterCheck(data, publishInfo, subscriber, commonEventListener)) { in PublishCommonEvent()
74 …return commonEventProxy_->PublishCommonEvent(data, publishInfo, commonEventListener, uid, callerTo… in PublishCommonEvent()
84 sptr<IRemoteObject> commonEventListener = nullptr; in PublishCommonEventAsUser() local
[all …]
Dcommon_event_stub.cpp43 sptr<IRemoteObject> commonEventListener = nullptr; in OnRemoteRequest() local
46 commonEventListener = data.ReadRemoteObject(); in OnRemoteRequest()
57 int32_t ret = PublishCommonEvent(*event, *publishinfo, commonEventListener, userId); in OnRemoteRequest()
67 sptr<IRemoteObject> commonEventListener = nullptr; in OnRemoteRequest() local
70 commonEventListener = data.ReadRemoteObject(); in OnRemoteRequest()
83 …bool ret = PublishCommonEvent(*event, *publishinfo, commonEventListener, uid, callerToken, userId); in OnRemoteRequest()
101 sptr<IRemoteObject> commonEventListener = data.ReadRemoteObject(); in OnRemoteRequest() local
102 if (commonEventListener == nullptr) { in OnRemoteRequest()
106 int32_t ret = SubscribeCommonEvent(*subscribeInfo, commonEventListener); in OnRemoteRequest()
119 sptr<IRemoteObject> commonEventListener = data.ReadRemoteObject(); in OnRemoteRequest() local
[all …]
Dcommon_event_proxy.cpp38 const sptr<IRemoteObject> &commonEventListener, const int32_t &userId) in PublishCommonEvent() argument
60 if (commonEventListener) { in PublishCommonEvent()
65 if (!data.WriteRemoteObject(commonEventListener)) { in PublishCommonEvent()
92 const sptr<IRemoteObject> &commonEventListener, const uid_t &uid, const int32_t &callerToken, in PublishCommonEvent() argument
115 if (commonEventListener) { in PublishCommonEvent()
120 if (!data.WriteRemoteObject(commonEventListener)) { in PublishCommonEvent()
156 const CommonEventSubscribeInfo &subscribeInfo, const sptr<IRemoteObject> &commonEventListener) in SubscribeCommonEvent() argument
173 if (commonEventListener != nullptr) { in SubscribeCommonEvent()
178 if (!data.WriteRemoteObject(commonEventListener)) { in SubscribeCommonEvent()
200 int32_t CommonEventProxy::UnsubscribeCommonEvent(const sptr<IRemoteObject> &commonEventListener) in UnsubscribeCommonEvent() argument
[all …]
/base/notification/common_event_service/services/include/
Dcommon_event_subscriber_manager.h30 sptr<IRemoteObject> commonEventListener; member
38 commonEventListener(nullptr), in EventSubscriberRecord()
44 if (commonEventListener == nullptr) {
49 if (other.commonEventListener == nullptr) {
53 return commonEventListener < other.commonEventListener;
98 const sptr<IRemoteObject> &commonEventListener, const struct tm &recordTime,
107 int RemoveSubscriber(const sptr<IRemoteObject> &commonEventListener);
123 …red_ptr<EventSubscriberRecord> GetSubscriberRecord(const sptr<IRemoteObject> &commonEventListener);
188 int RemoveSubscriberRecordLocked(const sptr<IRemoteObject> &commonEventListener);
Dcommon_event_manager_service.h44 const sptr<IRemoteObject> &commonEventListener, const int32_t &userId) override;
58 … const sptr<IRemoteObject> &commonEventListener, const uid_t &uid, const int32_t &callerToken,
69 … CommonEventSubscribeInfo &subscribeInfo, const sptr<IRemoteObject> &commonEventListener) override;
77 int32_t UnsubscribeCommonEvent(const sptr<IRemoteObject> &commonEventListener) override;
159 const sptr<IRemoteObject> &commonEventListener, const pid_t &pid, const uid_t &uid,
Dinner_common_event_manager.h55 …const sptr<IRemoteObject> &commonEventListener, const struct tm &recordTime, const pid_t &pid, con…
72 …const sptr<IRemoteObject> &commonEventListener, const struct tm &recordTime, const pid_t &pid, con…
81 bool UnsubscribeCommonEvent(const sptr<IRemoteObject> &commonEventListener);
166 void SendUnSubscribeHiSysEvent(const sptr<IRemoteObject> &commonEventListener);
/base/notification/common_event_service/test/fuzztest/commoneventmanagerservice_fuzzer/
Dcommoneventmanagerservice_fuzzer.cpp50 sptr<IRemoteObject> commonEventListener = nullptr; in DoSomethingInterestingWithMyAPI() local
51 …agerService.PublishCommonEvent(commonEventData, commonEventPublishInfo, commonEventListener, code); in DoSomethingInterestingWithMyAPI()
53 commonEventData, commonEventPublishInfo, commonEventListener, code, code, code); in DoSomethingInterestingWithMyAPI()
58 commonEventManagerService.SubscribeCommonEvent(subscribeInfo, commonEventListener); in DoSomethingInterestingWithMyAPI()
59 commonEventManagerService.UnsubscribeCommonEvent(commonEventListener); in DoSomethingInterestingWithMyAPI()
65 commonEventManagerService.FinishReceiver(commonEventListener, code, stringData, enabled); in DoSomethingInterestingWithMyAPI()
/base/notification/common_event_service/services/test/unittest/common_event_manager_service_branch_test/
Dcommon_event_manager_service_branch_test.cpp81 sptr<IRemoteObject> commonEventListener = nullptr; in HWTEST_F() local
85 …EXPECT_EQ(true, comm->PublishCommonEvent(event, publishinfo, commonEventListener, uid, callerToken… in HWTEST_F()
104 sptr<IRemoteObject> commonEventListener = nullptr; in HWTEST_F() local
106 …FICATION_CES_COMMON_PARAM_INVALID, comm->SubscribeCommonEvent(subscribeInfo, commonEventListener)); in HWTEST_F()
124 sptr<IRemoteObject> commonEventListener = nullptr; in HWTEST_F() local
126 … ERR_NOTIFICATION_CES_COMMON_PARAM_INVALID, comm->UnsubscribeCommonEvent(commonEventListener)); in HWTEST_F()
167 sptr<IRemoteObject> commonEventListener = nullptr; in HWTEST_F() local
172 comm->PublishCommonEvent(event, publishinfo, commonEventListener, userId)); in HWTEST_F()
198 sptr<IRemoteObject> commonEventListener = nullptr; in HWTEST_F() local
201 comm->PublishCommonEvent(event, publishinfo, commonEventListener, userId)); in HWTEST_F()
[all …]
/base/notification/common_event_service/frameworks/core/include/
Dicommon_event.h41 const sptr<IRemoteObject> &commonEventListener, const int32_t &userId) = 0;
55 … const sptr<IRemoteObject> &commonEventListener, const uid_t &uid, const int32_t &callerToken,
66 …const CommonEventSubscribeInfo &subscribeInfo, const sptr<IRemoteObject> &commonEventListener) = 0;
74 virtual int32_t UnsubscribeCommonEvent(const sptr<IRemoteObject> &commonEventListener) = 0;
Dcommon_event_proxy.h46 const sptr<IRemoteObject> &commonEventListener, const int32_t &userId) override;
60 … const sptr<IRemoteObject> &commonEventListener, const uid_t &uid, const int32_t &callerToken,
71 … CommonEventSubscribeInfo &subscribeInfo, const sptr<IRemoteObject> &commonEventListener) override;
79 int32_t UnsubscribeCommonEvent(const sptr<IRemoteObject> &commonEventListener) override;
Dcommon_event_stub.h54 const sptr<IRemoteObject> &commonEventListener, const int32_t &userId) override;
68 … const sptr<IRemoteObject> &commonEventListener, const uid_t &uid, const int32_t &callerToken,
79 … CommonEventSubscribeInfo &subscribeInfo, const sptr<IRemoteObject> &commonEventListener) override;
87 int32_t UnsubscribeCommonEvent(const sptr<IRemoteObject> &commonEventListener) override;
/base/notification/common_event_service/frameworks/native/test/unittest/
Dcommon_event_unsubscribe_test.cpp74 const OHOS::sptr<IRemoteObject> &commonEventListener, const int32_t &userId) in PublishCommonEvent() argument
80 …onst CommonEventSubscribeInfo &subscribeInfo, const OHOS::sptr<IRemoteObject> &commonEventListener) in SubscribeCommonEvent() argument
85 virtual int32_t UnsubscribeCommonEvent(const OHOS::sptr<IRemoteObject> &commonEventListener) in UnsubscribeCommonEvent() argument
208 sptr<IRemoteObject> commonEventListener = new CommonEventListener(subscriber); variable
210 EXPECT_EQ(true, innerCommonEventManager->UnsubscribeCommonEvent(commonEventListener));
226 sptr<IRemoteObject> commonEventListener = new CommonEventListener(subscriber); variable
228 …ayedSingleton<CommonEventSubscriberManager>::GetInstance()->RemoveSubscriber(commonEventListener));
291 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriberTest); variable
294 …ayedSingleton<CommonEventSubscriberManager>::GetInstance()->RemoveSubscriber(commonEventListener));
Dcommon_event_subscribe_test.cpp98 const OHOS::sptr<IRemoteObject> &commonEventListener, const int32_t &userId) in PublishCommonEvent() argument
104 …onst CommonEventSubscribeInfo &subscribeInfo, const OHOS::sptr<IRemoteObject> &commonEventListener) in SubscribeCommonEvent() argument
109 virtual int32_t UnsubscribeCommonEvent(const OHOS::sptr<IRemoteObject> &commonEventListener) in UnsubscribeCommonEvent() argument
330 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
332 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerPtr(commonEventListener);
393 OHOS::sptr<CommonEventListener> commonEventListener = new CommonEventListener(subscriber); variable
395 OHOS::sptr<OHOS::IRemoteObject> commonEventListenerSp(commonEventListener);
424 CommonEventListener commonEventListener(subscriber);
425 commonEventListener.runner_ = nullptr;
427 bool result = commonEventListener.IsReady();
[all …]
/base/notification/common_event_service/services/src/
Dcommon_event_subscriber_manager.cpp39 const SubscribeInfoPtr &eventSubscribeInfo, const sptr<IRemoteObject> &commonEventListener, in InsertSubscriber() argument
50 if (commonEventListener == nullptr) { in InsertSubscriber()
68 record->commonEventListener = commonEventListener; in InsertSubscriber()
73 commonEventListener->AddDeathRecipient(death_); in InsertSubscriber()
83 int CommonEventSubscriberManager::RemoveSubscriber(const sptr<IRemoteObject> &commonEventListener) in RemoveSubscriber() argument
88 if (commonEventListener == nullptr) { in RemoveSubscriber()
93 int res = RemoveSubscriberRecordLocked(commonEventListener); in RemoveSubscriber()
96 commonEventListener->RemoveDeathRecipient(death_); in RemoveSubscriber()
114 const sptr<IRemoteObject> &commonEventListener) in GetSubscriberRecord() argument
119 if (commonEventListener == (*it)->commonEventListener) { in GetSubscriberRecord()
[all …]
Dcommon_event_manager_service.cpp86 const CommonEventPublishInfo &publishinfo, const sptr<IRemoteObject> &commonEventListener, in PublishCommonEvent() argument
106 commonEventListener, in PublishCommonEvent()
114 …const CommonEventPublishInfo &publishinfo, const sptr<IRemoteObject> &commonEventListener, const u… in PublishCommonEvent() argument
130 …event, publishinfo, commonEventListener, UNDEFINED_PID, uid, callerToken, userId) == ERR_OK ? true… in PublishCommonEvent()
134 …const CommonEventPublishInfo &publishinfo, const sptr<IRemoteObject> &commonEventListener, const p… in PublishCommonEventDetailed() argument
164 commonEventListener, in PublishCommonEventDetailed()
184 commonEventListener, in PublishCommonEventDetailed()
202 const CommonEventSubscribeInfo &subscribeInfo, const sptr<IRemoteObject> &commonEventListener) in SubscribeCommonEvent() argument
225 commonEventListener, in SubscribeCommonEvent()
237 commonEventListener, in SubscribeCommonEvent()
[all …]
/base/notification/common_event_service/test/fuzztest/commoneventstub_fuzzer/
Dcommoneventstub_fuzzer.cpp53 sptr<IRemoteObject> commonEventListener = nullptr; in DoSomethingInterestingWithMyAPI() local
54 …commonEventStub.PublishCommonEvent(commonEventData, commonEventPublishInfo, commonEventListener, c… in DoSomethingInterestingWithMyAPI()
60 commonEventStub.SubscribeCommonEvent(subscribeInfo, commonEventListener); in DoSomethingInterestingWithMyAPI()
62 commonEventStub.UnsubscribeCommonEvent(commonEventListener); in DoSomethingInterestingWithMyAPI()
71 commonEventStub.FinishReceiver(commonEventListener, code, stringData, enabled); in DoSomethingInterestingWithMyAPI()

12