Home
last modified time | relevance | path

Searched refs:cbType (Results 1 – 22 of 22) sorted by relevance

/foundation/ability/dmsfwk/services/dtbabilitymgr/src/continuation_manager/
Dnotifier_info.cpp20 sptr<IRemoteObject> NotifierInfo::GetNotifier(const std::string& cbType) const in GetNotifier()
22 auto iter = notifierMap_.find(cbType); in GetNotifier()
29 void NotifierInfo::SetNotifier(const std::string& cbType, const sptr<IRemoteObject>& notifier) in SetNotifier() argument
31 notifierMap_[cbType] = notifier; in SetNotifier()
34 void NotifierInfo::DeleteNotifier(const std::string& cbType) in DeleteNotifier() argument
36 auto iter = notifierMap_.find(cbType); in DeleteNotifier()
61 const std::string& cbType) in RemoveDeathRecipient() argument
63 if (cbType.empty()) { in RemoveDeathRecipient()
69 auto it = notifierMap_.find(cbType); in RemoveDeathRecipient()
/foundation/ability/dmsfwk/services/dtbabilitymgr/include/continuation_manager/
Dnotifier_info.h38 sptr<IRemoteObject> GetNotifier(const std::string& cbType) const;
39 void SetNotifier(const std::string& cbType, const sptr<IRemoteObject>& notifier);
40 void DeleteNotifier(const std::string& cbType);
44 const std::string& cbType = std::string());
/foundation/ability/dmsfwk/services/dtbabilitymgr/test/unittest/
Ddistributed_ability_manager_stub_test.cpp120 std::string cbType = ""; variable
121 data.WriteString(cbType);
140 std::string cbType = "mockType"; variable
141 data.WriteString(cbType);
160 std::string cbType = ""; variable
161 data.WriteString(cbType);
180 std::string cbType = "12345"; variable
181 data.WriteString(cbType);
/foundation/ability/dmsfwk/services/dtbabilitymgr/src/
Ddistributed_ability_manager_stub.cpp127 std::string cbType; in RegisterDeviceSelectionCallbackInner() local
128 PARCEL_READ_HELPER(data, String, cbType); in RegisterDeviceSelectionCallbackInner()
129 if (cbType.empty()) { in RegisterDeviceSelectionCallbackInner()
138 int32_t result = RegisterDeviceSelectionCallback(token, cbType, notifier); in RegisterDeviceSelectionCallbackInner()
149 std::string cbType; in UnregisterDeviceSelectionCallbackInner() local
150 PARCEL_READ_HELPER(data, String, cbType); in UnregisterDeviceSelectionCallbackInner()
151 if (cbType.empty()) { in UnregisterDeviceSelectionCallbackInner()
155 int32_t result = UnregisterDeviceSelectionCallback(token, cbType); in UnregisterDeviceSelectionCallbackInner()
Ddistributed_ability_manager_client.cpp70 …utedAbilityManagerClient::RegisterDeviceSelectionCallback(int32_t token, const std::string& cbType, in RegisterDeviceSelectionCallback() argument
79 return continuationMgrProxy->RegisterDeviceSelectionCallback(token, cbType, notifier); in RegisterDeviceSelectionCallback()
82 …edAbilityManagerClient::UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) in UnregisterDeviceSelectionCallback() argument
90 return continuationMgrProxy->UnregisterDeviceSelectionCallback(token, cbType); in UnregisterDeviceSelectionCallback()
Ddistributed_ability_manager_proxy.cpp83 int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) in RegisterDeviceSelectionCallback() argument
86 if (cbType.empty()) { in RegisterDeviceSelectionCallback()
105 PARCEL_WRITE_HELPER(data, String, cbType); in RegisterDeviceSelectionCallback()
112 …tedAbilityManagerProxy::UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) in UnregisterDeviceSelectionCallback() argument
115 if (cbType.empty()) { in UnregisterDeviceSelectionCallback()
129 PARCEL_WRITE_HELPER(data, String, cbType); in UnregisterDeviceSelectionCallback()
Ddistributed_ability_manager_service.cpp208 int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) in RegisterDeviceSelectionCallback() argument
211 if (cbType != EVENT_CONNECT && cbType != EVENT_DISCONNECT) { in RegisterDeviceSelectionCallback()
212 HILOGE("type: %{public}s not support!", cbType.c_str()); in RegisterDeviceSelectionCallback()
219 if (IsNotifierRegisteredLocked(token, cbType)) { in RegisterDeviceSelectionCallback()
229 iter->second->SetNotifier(cbType, notifier); in RegisterDeviceSelectionCallback()
232 notifierInfo->SetNotifier(cbType, notifier); in RegisterDeviceSelectionCallback()
241 …dAbilityManagerService::UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) in UnregisterDeviceSelectionCallback() argument
244 if (cbType != EVENT_CONNECT && cbType != EVENT_DISCONNECT) { in UnregisterDeviceSelectionCallback()
245 HILOGE("type: %{public}s not support!", cbType.c_str()); in UnregisterDeviceSelectionCallback()
252 if (!IsNotifierRegisteredLocked(token, cbType)) { in UnregisterDeviceSelectionCallback()
[all …]
/foundation/ability/dmsfwk/interfaces/kits/napi/continuation_manager/
Djs_device_selection_listener.cpp41 void JsDeviceSelectionListener::AddCallback(const std::string& cbType, NativeValue* jsListenerObj) in AddCallback() argument
52 jsCallBackMap_[cbType] = std::move(callbackRef); in AddCallback()
54 cbType.c_str(), static_cast<uint32_t>(jsCallBackMap_.size())); in AddCallback()
57 void JsDeviceSelectionListener::RemoveCallback(const std::string& cbType) in RemoveCallback() argument
61 jsCallBackMap_.erase(cbType); in RemoveCallback()
63 cbType.c_str(), static_cast<uint32_t>(jsCallBackMap_.size())); in RemoveCallback()
Djs_continuation_manager.cpp314 NativeCallbackInfo &info, std::string &cbType, int32_t &token, NativeValue** jsListenerObj) in OnRegisterDeviceSelectionCallbackParameterCheck() argument
319 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnRegisterDeviceSelectionCallbackParameterCheck()
322 if (cbType != EVENT_CONNECT && cbType != EVENT_DISCONNECT) { in OnRegisterDeviceSelectionCallbackParameterCheck()
339 std::string cbType; in OnRegisterDeviceSelectionCallback() local
343 …std::string errInfo = OnRegisterDeviceSelectionCallbackParameterCheck(engine, info, cbType, token,… in OnRegisterDeviceSelectionCallback()
345 … errInfo = [this, &engine, &info, &cbType, &token, &jsListenerObj, &errCode]() -> std::string { in OnRegisterDeviceSelectionCallback()
347 if (IsCallbackRegistered(token, cbType)) { in OnRegisterDeviceSelectionCallback()
360 token, cbType, deviceSelectionListener); in OnRegisterDeviceSelectionCallback()
362 deviceSelectionListener->AddCallback(cbType, jsListenerObj); in OnRegisterDeviceSelectionCallback()
364 jsCbMap_[token][cbType] = std::move(callbackPair); // move assignment in OnRegisterDeviceSelectionCallback()
[all …]
Djs_device_selection_listener.h35 void AddCallback(const std::string& cbType, NativeValue* jsListenerObj);
36 void RemoveCallback(const std::string& cbType);
Djs_continuation_manager.h66 bool IsCallbackRegistered(int32_t token, const std::string& cbType);
76 NativeCallbackInfo &info, std::string &cbType, int32_t &token, NativeValue** jsListenerObj);
/foundation/ability/dmsfwk/interfaces/innerkits/common/include/
Ddistributed_ability_manager_client.h33 … int32_t token, const std::string& cbType, const sptr<DeviceSelectionNotifierStub>& notifier);
34 int32_t UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType);
Ddistributed_ability_manager_proxy.h34 int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) override;
35 int32_t UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) override;
/foundation/ability/dmsfwk/services/dtbabilitymgr/include/
Ddistributed_ability_manager_interface.h39 int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) = 0;
40 virtual int32_t UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) = 0;
Ddistributed_ability_manager_service.h44 int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) override;
45 int32_t UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) override;
65 bool IsNotifierRegisteredLocked(int32_t token, const std::string& cbType);
/foundation/window/window_manager/window_scene/interfaces/kits/napi/scene_session_manager/
Djs_root_scene_session.cpp82 std::string cbType; in OnRegisterCallback() local
83 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnRegisterCallback()
96 if (IsCallbackRegistered(cbType, value)) { in OnRegisterCallback()
112 jsCbMap_[cbType] = callbackRef; in OnRegisterCallback()
113 WLOGFI("[NAPI]Register end, type = %{public}s", cbType.c_str()); in OnRegisterCallback()
Djs_scene_session.cpp580 std::string cbType; in OnRegisterCallback() local
581 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnRegisterCallback()
594 if (!IsCallbackTypeSupported(cbType)) { in OnRegisterCallback()
595 WLOGFE("[NAPI]callback type is not supported, type = %{public}s", cbType.c_str()); in OnRegisterCallback()
598 if (IsCallbackRegistered(cbType, value)) { in OnRegisterCallback()
599 WLOGFE("[NAPI]callback is registered, type = %{public}s", cbType.c_str()); in OnRegisterCallback()
612 jsCbMap_[cbType] = callbackRef; in OnRegisterCallback()
613 (this->*listenerFunc_[cbType])(); in OnRegisterCallback()
614 WLOGFI("[NAPI]Register end, type = %{public}s", cbType.c_str()); in OnRegisterCallback()
Djs_scene_session_manager.cpp378 std::string cbType; in OnRegisterCallback() local
379 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnRegisterCallback()
392 if (IsCallbackRegistered(cbType, value)) { in OnRegisterCallback()
396 (this->*listenerFunc_[cbType])(); in OnRegisterCallback()
399 jsCbMap_[cbType] = callbackRef; in OnRegisterCallback()
400 WLOGFI("[NAPI]Register end, type = %{public}s", cbType.c_str()); in OnRegisterCallback()
/foundation/window/window_manager/interfaces/kits/napi/display_runtime/
Djs_display_manager.cpp358 std::string cbType; in OnRegisterDisplayManagerCallback() local
359 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnRegisterDisplayManagerCallback()
376 …DmErrorCode ret = DM_JS_TO_ERROR_CODE_MAP.at(RegisterDisplayListenerWithType(engine, cbType, value… in OnRegisterDisplayManagerCallback()
393 std::string cbType; in OnUnregisterDisplayManagerCallback() local
394 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnUnregisterDisplayManagerCallback()
402 ret = DM_JS_TO_ERROR_CODE_MAP.at(UnregisterAllDisplayListenerWithType(cbType)); in OnUnregisterDisplayManagerCallback()
406 ret = DM_JS_TO_ERROR_CODE_MAP.at(UnregisterAllDisplayListenerWithType(cbType)); in OnUnregisterDisplayManagerCallback()
408 ret = DM_JS_TO_ERROR_CODE_MAP.at(UnRegisterDisplayListenerWithType(cbType, value)); in OnUnregisterDisplayManagerCallback()
/foundation/window/window_manager/interfaces/kits/napi/window_runtime/window_manager_napi/
Djs_window_manager.cpp678 std::string cbType; in OnRegisterWindowManagerCallback() local
679 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnRegisterWindowManagerCallback()
691 …WmErrorCode ret = registerManager_->RegisterListener(nullptr, cbType, CaseType::CASE_WINDOW_MANAGE… in OnRegisterWindowManagerCallback()
696 WLOGI("Register end, type = %{public}s", cbType.c_str()); in OnRegisterWindowManagerCallback()
708 std::string cbType; in OnUnregisterWindowManagerCallback() local
709 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnUnregisterWindowManagerCallback()
718 … ret = registerManager_->UnregisterListener(nullptr, cbType, CaseType::CASE_WINDOW_MANAGER, value); in OnUnregisterWindowManagerCallback()
722 …ret = registerManager_->UnregisterListener(nullptr, cbType, CaseType::CASE_WINDOW_MANAGER, nullptr… in OnUnregisterWindowManagerCallback()
724 … ret = registerManager_->UnregisterListener(nullptr, cbType, CaseType::CASE_WINDOW_MANAGER, value); in OnUnregisterWindowManagerCallback()
731 WLOGI("Unregister end, type = %{public}s", cbType.c_str()); in OnUnregisterWindowManagerCallback()
/foundation/window/window_manager/interfaces/kits/napi/screen_runtime/napi/
Djs_screen_manager.cpp287 std::string cbType; in OnRegisterScreenManagerCallback() local
288 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnRegisterScreenManagerCallback()
305 DmErrorCode ret = RegisterScreenListenerWithType(engine, cbType, value); in OnRegisterScreenManagerCallback()
321 std::string cbType; in OnUnregisterScreenManagerCallback() local
322 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnUnregisterScreenManagerCallback()
329 UnregisterAllScreenListenerWithType(cbType); in OnUnregisterScreenManagerCallback()
333 DmErrorCode ret = UnregisterAllScreenListenerWithType(cbType); in OnUnregisterScreenManagerCallback()
339 DmErrorCode ret = UnRegisterScreenListenerWithType(cbType, value); in OnUnregisterScreenManagerCallback()
/foundation/window/window_manager/interfaces/kits/napi/window_runtime/window_napi/
Djs_window.cpp1326 std::string cbType; in OnRegisterWindowCallback() local
1327 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnRegisterWindowCallback()
1338 …WmErrorCode ret = registerManager_->RegisterListener(windowToken_, cbType, CaseType::CASE_WINDOW, … in OnRegisterWindowCallback()
1344 windowToken_->GetWindowId(), windowToken_->GetWindowName().c_str(), cbType.c_str()); in OnRegisterWindowCallback()
1360 std::string cbType; in OnUnregisterWindowCallback() local
1361 if (!ConvertFromJsValue(engine, info.argv[0], cbType)) { in OnUnregisterWindowCallback()
1370 … ret = registerManager_->UnregisterListener(windowToken_, cbType, CaseType::CASE_WINDOW, value); in OnUnregisterWindowCallback()
1374 … ret = registerManager_->UnregisterListener(windowToken_, cbType, CaseType::CASE_WINDOW, nullptr); in OnUnregisterWindowCallback()
1376 … ret = registerManager_->UnregisterListener(windowToken_, cbType, CaseType::CASE_WINDOW, value); in OnUnregisterWindowCallback()
1385 windowToken_->GetWindowId(), windowToken_->GetWindowName().c_str(), cbType.c_str()); in OnUnregisterWindowCallback()