Home
last modified time | relevance | path

Searched refs:cbType (Results 1 - 25 of 31) sorted by relevance

12

/foundation/ability/dmsfwk/services/dtbabilitymgr/src/continuation_manager/
H A 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()
63 if (cbType.empty()) { in RemoveDeathRecipient()
69 auto it = notifierMap_.find(cbType); in RemoveDeathRecipient()
60 RemoveDeathRecipient(const sptr<IRemoteObject::DeathRecipient>& notifierDeathRecipient, const std::string& cbType) RemoveDeathRecipient() argument
/foundation/ability/dmsfwk/services/dtbabilitymgr/include/continuation_manager/
H A 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/resourceschedule/resource_schedule_service/ressched/interfaces/kits/js/napi/src/
H A Djs_systemload.cpp108 std::string cbType; in RegisterSystemloadCallback() local
111 if (!CheckCallbackParam(env, info, cbType, &jsCallback)) { in RegisterSystemloadCallback()
121 if (jsCallBackMap_.find(cbType) == jsCallBackMap_.end()) { in RegisterSystemloadCallback()
122 jsCallBackMap_[cbType] = std::list<CallBackPair>(); in RegisterSystemloadCallback()
124 auto& callbackList = jsCallBackMap_[cbType]; in RegisterSystemloadCallback()
151 std::string cbType; in UnRegisterSystemloadCallback() local
154 if (!CheckCallbackParam(env, info, cbType, &jsCallback)) { in UnRegisterSystemloadCallback()
160 if (jsCallBackMap_.find(cbType) == jsCallBackMap_.end()) { in UnRegisterSystemloadCallback()
161 RESSCHED_LOGE("unRegister cbType has not registered"); in UnRegisterSystemloadCallback()
164 auto& callbackList = jsCallBackMap_[cbType]; in UnRegisterSystemloadCallback()
259 CheckCallbackParam(napi_env env, napi_callback_info info, std::string &cbType, napi_value *jsCallback) CheckCallbackParam() argument
[all...]
/foundation/ability/dmsfwk/services/dtbabilitymgr/src/
H A 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()
130 HILOGE("cbType unmarshalling failed!"); 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()
152 HILOGE("cbType unmarshalling failed!"); in UnregisterDeviceSelectionCallbackInner()
155 int32_t result = UnregisterDeviceSelectionCallback(token, cbType); in UnregisterDeviceSelectionCallbackInner()
[all...]
H A Ddistributed_ability_manager_client.cpp70 int32_t DistributedAbilityManagerClient::RegisterDeviceSelectionCallback(int32_t token, const std::string& cbType, in RegisterDeviceSelectionCallback() argument
79 return continuationMgrProxy->RegisterDeviceSelectionCallback(token, cbType, notifier); in RegisterDeviceSelectionCallback()
82 int32_t DistributedAbilityManagerClient::UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) in UnregisterDeviceSelectionCallback() argument
90 return continuationMgrProxy->UnregisterDeviceSelectionCallback(token, cbType); in UnregisterDeviceSelectionCallback()
H A Ddistributed_ability_manager_proxy.cpp83 int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) in RegisterDeviceSelectionCallback()
86 if (cbType.empty()) { in RegisterDeviceSelectionCallback()
87 HILOGE("RegisterDeviceSelectionCallback cbType is empty"); in RegisterDeviceSelectionCallback()
105 PARCEL_WRITE_HELPER(data, String, cbType); in RegisterDeviceSelectionCallback()
112 int32_t DistributedAbilityManagerProxy::UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) in UnregisterDeviceSelectionCallback() argument
115 if (cbType.empty()) { in UnregisterDeviceSelectionCallback()
116 HILOGE("UnregisterDeviceSelectionCallback cbType is empty"); in UnregisterDeviceSelectionCallback()
129 PARCEL_WRITE_HELPER(data, String, cbType); in UnregisterDeviceSelectionCallback()
82 RegisterDeviceSelectionCallback( int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) RegisterDeviceSelectionCallback() argument
H A Ddistributed_ability_manager_service.cpp131 info += "cbType: "; in DumpNotifierLocked()
213 int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) in RegisterDeviceSelectionCallback()
216 if (cbType != EVENT_CONNECT && cbType != EVENT_DISCONNECT) { in RegisterDeviceSelectionCallback()
217 HILOGE("type: %{public}s not support!", cbType.c_str()); in RegisterDeviceSelectionCallback()
224 if (IsNotifierRegisteredLocked(token, cbType)) { in RegisterDeviceSelectionCallback()
234 iter->second->SetNotifier(cbType, notifier); in RegisterDeviceSelectionCallback()
237 notifierInfo->SetNotifier(cbType, notifier); in RegisterDeviceSelectionCallback()
246 int32_t DistributedAbilityManagerService::UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) in UnregisterDeviceSelectionCallback() argument
249 if (cbType ! in UnregisterDeviceSelectionCallback()
212 RegisterDeviceSelectionCallback( int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) RegisterDeviceSelectionCallback() argument
569 IsNotifierRegisteredLocked(int32_t token, const std::string& cbType) IsNotifierRegisteredLocked() argument
[all...]
/foundation/ability/dmsfwk/interfaces/kits/napi/continuation_manager/
H A Djs_device_selection_listener.cpp41 void JsDeviceSelectionListener::AddCallback(const std::string& cbType, napi_value jsListenerObj) in AddCallback() argument
53 jsCallBackMap_[cbType] = std::move(callbackRef); in AddCallback()
54 HILOGD("jsCallBackMap_ cbType: %{public}s, size: %{public}u!", in AddCallback()
55 cbType.c_str(), static_cast<uint32_t>(jsCallBackMap_.size())); in AddCallback()
58 void JsDeviceSelectionListener::RemoveCallback(const std::string& cbType) in RemoveCallback() argument
62 jsCallBackMap_.erase(cbType); in RemoveCallback()
63 HILOGD("jsCallBackMap_ cbType: %{public}s, size: %{public}u!", in RemoveCallback()
64 cbType.c_str(), static_cast<uint32_t>(jsCallBackMap_.size())); in RemoveCallback()
H A Djs_continuation_manager.cpp336 napi_callback_info info, std::string &cbType, int32_t &token, napi_value *jsListenerObj) in OnRegisterDeviceSelectionCallbackParameterCheck()
344 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnRegisterDeviceSelectionCallbackParameterCheck()
347 if (cbType != EVENT_CONNECT && cbType != EVENT_DISCONNECT) { in OnRegisterDeviceSelectionCallbackParameterCheck()
364 std::string cbType; in OnRegisterDeviceSelectionCallback() local
368 std::string errInfo = OnRegisterDeviceSelectionCallbackParameterCheck(env, info, cbType, token, &jsListenerObj); in OnRegisterDeviceSelectionCallback()
370 errInfo = [this, &env, &info, &cbType, &token, &jsListenerObj, &errCode]() -> std::string { in OnRegisterDeviceSelectionCallback()
372 if (IsCallbackRegistered(token, cbType)) { in OnRegisterDeviceSelectionCallback()
387 token, cbType, deviceSelectionListener); in OnRegisterDeviceSelectionCallback()
389 deviceSelectionListener->AddCallback(cbType, jsListenerOb in OnRegisterDeviceSelectionCallback()
335 OnRegisterDeviceSelectionCallbackParameterCheck(napi_env env, napi_callback_info info, std::string &cbType, int32_t &token, napi_value *jsListenerObj) OnRegisterDeviceSelectionCallbackParameterCheck() argument
412 std::string cbType; OnUnregisterDeviceSelectionCallback() local
788 IsCallbackRegistered(int32_t token, const std::string& cbType) IsCallbackRegistered() argument
[all...]
H A Djs_device_selection_listener.h35 void AddCallback(const std::string& cbType, napi_value jsListenerObj);
36 void RemoveCallback(const std::string& cbType);
H A Djs_continuation_manager.h76 bool IsCallbackRegistered(int32_t token, const std::string& cbType);
86 napi_callback_info info, std::string &cbType, int32_t &token, napi_value *jsListenerObj);
/foundation/ability/dmsfwk/services/dtbabilitymgr/test/unittest/
H A Ddistributed_ability_manager_stub_test.cpp130 * @tc.desc: test RegisterDeviceSelectionCallbackInner with cbType is empty
142 std::string cbType = ""; in HWTEST_F() local
143 data.WriteString(cbType); in HWTEST_F()
163 std::string cbType = "mockType"; in HWTEST_F() local
164 data.WriteString(cbType); in HWTEST_F()
172 * @tc.desc: test UnregisterDeviceSelectionCallbackInner with cbType is empty
184 std::string cbType = ""; in HWTEST_F() local
185 data.WriteString(cbType); in HWTEST_F()
193 * @tc.desc: test UnregisterDeviceSelectionCallbackInner with cbType is empty
205 std::string cbType in HWTEST_F() local
[all...]
/foundation/ability/dmsfwk/interfaces/innerkits/common/include/
H A 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);
H A 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/
H A 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;
H A 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/
H A Djs_root_scene_session.cpp97 std::string cbType; in OnRegisterCallback() local
98 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnRegisterCallback()
111 if (IsCallbackRegistered(env, cbType, value)) { in OnRegisterCallback()
130 HITRACE_METER_FMT(HITRACE_TAG_WINDOW_MANAGER, "JsRootSceneSession set jsCbMap[%s]", cbType.c_str()); in OnRegisterCallback()
132 jsCbMap_[cbType] = callbackRef; in OnRegisterCallback()
134 WLOGFD("[NAPI] end, type = %{public}s", cbType.c_str()); in OnRegisterCallback()
/foundation/window/window_manager/interfaces/kits/napi/picture_in_picture_napi/
H A Djs_pip_controller.cpp325 std::string cbType = ""; in OnRegisterCallback() local
326 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnRegisterCallback()
335 WmErrorCode ret = RegisterListenerWithType(env, cbType, value); in OnRegisterCallback()
470 std::string cbType = ""; in OnUnregisterCallback() local
471 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnUnregisterCallback()
476 UnRegisterListenerWithType(env, cbType, nullptr); in OnUnregisterCallback()
481 UnRegisterListenerWithType(env, cbType, value); in OnUnregisterCallback()
/foundation/resourceschedule/resource_schedule_service/ressched/services/resschedmgr/resschedfwk/src/
H A Dnotifier_mgr.cpp137 auto cbType = static_cast<ResType::DeviceStatus>(type); in OnDeviceLevelChanged() local
138 if (g_DeviceStatusType.count(cbType) == 0) { in OnDeviceLevelChanged()
/foundation/resourceschedule/resource_schedule_service/ressched/interfaces/kits/js/napi/include/
H A Djs_systemload.h73 bool CheckCallbackParam(napi_env env, napi_callback_info info, std::string &cbType, napi_value *jsCallback);
/foundation/window/window_manager/interfaces/kits/napi/display_runtime/
H A Djs_display.cpp246 std::string cbType; in OnRegisterDisplayManagerCallback() local
247 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnRegisterDisplayManagerCallback()
267 DmErrorCode ret = DM_JS_TO_ERROR_CODE_MAP.at(RegisterDisplayListenerWithType(env, cbType, value)); in OnRegisterDisplayManagerCallback()
320 std::string cbType; in OnUnregisterDisplayManagerCallback() local
321 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnUnregisterDisplayManagerCallback()
330 ret = DM_JS_TO_ERROR_CODE_MAP.at(UnregisterAllDisplayListenerWithType(cbType)); in OnUnregisterDisplayManagerCallback()
334 ret = DM_JS_TO_ERROR_CODE_MAP.at(UnregisterAllDisplayListenerWithType(cbType)); in OnUnregisterDisplayManagerCallback()
336 ret = DM_JS_TO_ERROR_CODE_MAP.at(UnRegisterDisplayListenerWithType(env, cbType, value)); in OnUnregisterDisplayManagerCallback()
H A Djs_display_manager.cpp569 std::string cbType; in OnRegisterDisplayManagerCallback() local
570 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnRegisterDisplayManagerCallback()
590 DmErrorCode ret = DM_JS_TO_ERROR_CODE_MAP.at(RegisterDisplayListenerWithType(env, cbType, value)); in OnRegisterDisplayManagerCallback()
616 std::string cbType; in OnUnregisterDisplayManagerCallback() local
617 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnUnregisterDisplayManagerCallback()
626 ret = DM_JS_TO_ERROR_CODE_MAP.at(UnregisterAllDisplayListenerWithType(cbType)); in OnUnregisterDisplayManagerCallback()
630 ret = DM_JS_TO_ERROR_CODE_MAP.at(UnregisterAllDisplayListenerWithType(cbType)); in OnUnregisterDisplayManagerCallback()
632 ret = DM_JS_TO_ERROR_CODE_MAP.at(UnRegisterDisplayListenerWithType(env, cbType, value)); in OnUnregisterDisplayManagerCallback()
/foundation/window/window_manager/interfaces/kits/napi/picture_in_picture_napi/inner/
H A Djs_pip_manager.cpp243 std::string cbType; in OnRegisterCallback() local
244 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnRegisterCallback()
245 TLOGE(WmsLogTag::WMS_PIP, "Failed to convert param to cbType"); in OnRegisterCallback()
258 TLOGI(WmsLogTag::WMS_PIP, "Register type %{public}s success!", cbType.c_str()); in OnRegisterCallback()
/foundation/window/window_manager/interfaces/kits/napi/window_runtime/window_manager_napi/
H A Djs_window_manager.cpp794 std::string cbType; in OnRegisterWindowManagerCallback() local
795 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnRegisterWindowManagerCallback()
807 WmErrorCode ret = registerManager_->RegisterListener(nullptr, cbType, CaseType::CASE_WINDOW_MANAGER, env, value); in OnRegisterWindowManagerCallback()
812 WLOGI("Register end, type = %{public}s", cbType.c_str()); in OnRegisterWindowManagerCallback()
827 std::string cbType; in OnUnregisterWindowManagerCallback() local
828 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnUnregisterWindowManagerCallback()
837 ret = registerManager_->UnregisterListener(nullptr, cbType, CaseType::CASE_WINDOW_MANAGER, env, value); in OnUnregisterWindowManagerCallback()
841 ret = registerManager_->UnregisterListener(nullptr, cbType, CaseType::CASE_WINDOW_MANAGER, env, nullptr); in OnUnregisterWindowManagerCallback()
843 ret = registerManager_->UnregisterListener(nullptr, cbType, CaseType::CASE_WINDOW_MANAGER, env, value); in OnUnregisterWindowManagerCallback()
850 WLOGI("Unregister end, type = %{public}s", cbType in OnUnregisterWindowManagerCallback()
[all...]
/foundation/window/window_manager/interfaces/kits/napi/extension_window/
H A Djs_extension_window.cpp718 std::string cbType; in OnRegisterExtensionWindowCallback() local
719 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnRegisterExtensionWindowCallback()
728 WmErrorCode ret = extensionRegisterManager_->RegisterListener(windowImpl, cbType, CaseType::CASE_WINDOW, in OnRegisterExtensionWindowCallback()
735 windowImpl->GetWindowId(), windowImpl->GetWindowName().c_str(), cbType.c_str()); in OnRegisterExtensionWindowCallback()
753 std::string cbType; in OnUnRegisterExtensionWindowCallback() local
754 if (!ConvertFromJsValue(env, argv[0], cbType)) { in OnUnRegisterExtensionWindowCallback()
762 ret = extensionRegisterManager_->UnregisterListener(windowImpl, cbType, CaseType::CASE_WINDOW, env, value); in OnUnRegisterExtensionWindowCallback()
766 ret = extensionRegisterManager_->UnregisterListener(windowImpl, cbType, CaseType::CASE_WINDOW, in OnUnRegisterExtensionWindowCallback()
769 ret = extensionRegisterManager_->UnregisterListener(windowImpl, cbType, CaseType::CASE_WINDOW, env, value); in OnUnRegisterExtensionWindowCallback()
777 windowImpl->GetWindowId(), windowImpl->GetWindowName().c_str(), cbType in OnUnRegisterExtensionWindowCallback()
[all...]

Completed in 19 milliseconds

12