Home
last modified time | relevance | path

Searched refs:eventListeners_ (Results 1 – 12 of 12) sorted by relevance

/base/security/security_guard/interfaces/inner_api/collector/src/
Dcollector_manager.cpp32 if (eventListeners_.find(subscriber) != eventListeners_.end()) { in Subscribe()
63 eventListeners_[subscriber] = callback; in Subscribe()
77 if (eventListeners_.find(subscriber) == eventListeners_.end()) { in Unsubscribe()
88 int32_t ret = proxy->Unsubscribe(eventListeners_[subscriber]); in Unsubscribe()
90 eventListeners_.erase(subscriber); in Unsubscribe()
112 eventListeners_.clear(); in HandleDecipient()
/base/notification/common_event_service/frameworks/core/src/
Dcommon_event.cpp167 auto eventListener = eventListeners_.find(subscriber); in SubscribeCommonEvent()
168 if (eventListener != eventListeners_.end()) { in SubscribeCommonEvent()
169 eventListeners_.erase(eventListener); in SubscribeCommonEvent()
196 auto eventListener = eventListeners_.find(subscriber); in UnSubscribeCommonEvent()
197 if (eventListener != eventListeners_.end()) { in UnSubscribeCommonEvent()
199 isProxyValid_, eventListeners_.size()); in UnSubscribeCommonEvent()
202 eventListeners_.erase(eventListener); in UnSubscribeCommonEvent()
386 auto eventListener = eventListeners_.find(subscriber); in CreateCommonEventListener()
387 if (eventListener != eventListeners_.end()) { in CreateCommonEventListener()
392 if (eventListeners_.size() == SUBSCRIBER_MAX_SIZE) { in CreateCommonEventListener()
[all …]
/base/account/os_account/frameworks/ohosaccount/native/src/
Dohos_account_kits_impl.cpp226 eventListeners_.erase(callback); in SubscribeDistributedAccountEvent()
247 auto eventListener = eventListeners_.find(callback); in UnsubscribeDistributedAccountEvent()
248 if (eventListener == eventListeners_.end()) { in UnsubscribeDistributedAccountEvent()
261 eventListeners_.erase(eventListener); in UnsubscribeDistributedAccountEvent()
277 auto eventListener = eventListeners_.find(callback); in CreateDistributedAccountEventService()
278 if (eventListener != eventListeners_.end()) { in CreateDistributedAccountEventService()
287 if (eventListeners_.size() == Constants::DISTRIBUTED_SUBSCRIBER_MAX_SIZE) { in CreateDistributedAccountEventService()
298 eventListeners_[callback] = listener; in CreateDistributedAccountEventService()
311 for (auto it = eventListeners_.begin(); it != eventListeners_.end(); ++it) { in RestoreSubscribe()
/base/account/os_account/services/accountmgr/test/unittest/app_account/
Dapp_account_test.cpp95 AppAccount::GetInstance().eventListeners_.clear(); in TearDown()
431 EXPECT_EQ(AppAccount::GetInstance().eventListeners_.size(), SUBSCRIBER_ZERO);
436 EXPECT_EQ(AppAccount::GetInstance().eventListeners_.size(), SUBSCRIBER_ONE);
441 EXPECT_EQ(AppAccount::GetInstance().eventListeners_.size(), SUBSCRIBER_ONE);
466 EXPECT_EQ(AppAccount::GetInstance().eventListeners_.size(), SUBSCRIBER_ZERO);
476 EXPECT_EQ(AppAccount::GetInstance().eventListeners_.size(), counter);
479 EXPECT_EQ(AppAccount::GetInstance().eventListeners_.size(), counter - 1);
/base/security/security_guard/interfaces/inner_api/collector/include/
Dcollector_manager.h39 …::shared_ptr<ICollectorSubscriber>, sptr<SecurityCollectorManagerCallbackService>> eventListeners_; variable
/base/account/os_account/frameworks/osaccount/core/src/
Dos_account.cpp573 eventListeners_.erase(subscriber); in SubscribeOsAccount()
602 auto eventListener = eventListeners_.find(subscriber); in UnsubscribeOsAccount()
603 if (eventListener != eventListeners_.end()) { in UnsubscribeOsAccount()
607 eventListeners_.erase(eventListener); in UnsubscribeOsAccount()
729 auto eventListener = eventListeners_.find(subscriber); in CreateOsAccountEventListener()
730 if (eventListener != eventListeners_.end()) { in CreateOsAccountEventListener()
735 if (eventListeners_.size() == Constants::SUBSCRIBER_MAX_SIZE) { in CreateOsAccountEventListener()
746 eventListeners_[subscriber] = listener; in CreateOsAccountEventListener()
/base/account/os_account/frameworks/appaccount/native/src/
Dapp_account.cpp621 eventListeners_.erase(subscriber); in SubscribeAppAccount()
644 auto eventListener = eventListeners_.find(subscriber); in UnsubscribeAppAccount()
645 if (eventListener != eventListeners_.end()) { in UnsubscribeAppAccount()
649 eventListeners_.erase(eventListener); in UnsubscribeAppAccount()
717 auto eventListener = eventListeners_.find(subscriber); in CreateAppAccountEventListener()
718 if (eventListener != eventListeners_.end()) { in CreateAppAccountEventListener()
723 if (eventListeners_.size() == Constants::APP_ACCOUNT_SUBSCRIBER_MAX_SIZE) { in CreateAppAccountEventListener()
734 eventListeners_[subscriber] = listener; in CreateAppAccountEventListener()
/base/notification/common_event_service/frameworks/core/include/
Dcommon_event.h231 std::map<std::shared_ptr<CommonEventSubscriber>, sptr<CommonEventListener>> eventListeners_; variable
/base/account/os_account/interfaces/innerkits/ohosaccount/native/include/
Dohos_account_kits_impl.h77 sptr<DistributedAccountEventService>> eventListeners_; variable
/base/account/os_account/frameworks/osaccount/core/include/
Dos_account.h119 std::map<std::shared_ptr<OsAccountSubscriber>, sptr<OsAccountEventListener>> eventListeners_; variable
/base/account/os_account/frameworks/appaccount/native/include/
Dapp_account.h125 std::map<std::shared_ptr<AppAccountSubscriber>, sptr<AppAccountEventListener>> eventListeners_; variable
/base/account/os_account/frameworks/appaccount/native/test/unittest/
Dapp_account_manager_test.cpp2071 … AppAccount::GetInstance().eventListeners_[appAccountSubscriberPtr] = appAccountEventListenerSptr;