/foundation/ability/dmsfwk/services/dtbabilitymgr/src/continuation_manager/ |
H A D | notifier_info.cpp | 20 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 D | notifier_info.h | 38 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 D | js_systemload.cpp | 108 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 D | distributed_ability_manager_stub.cpp | 127 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 D | distributed_ability_manager_client.cpp | 70 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 D | distributed_ability_manager_proxy.cpp | 83 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 D | distributed_ability_manager_service.cpp | 131 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 D | js_device_selection_listener.cpp | 41 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 D | js_continuation_manager.cpp | 336 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 D | js_device_selection_listener.h | 35 void AddCallback(const std::string& cbType, napi_value jsListenerObj); 36 void RemoveCallback(const std::string& cbType);
|
H A D | js_continuation_manager.h | 76 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 D | distributed_ability_manager_stub_test.cpp | 130 * @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 D | distributed_ability_manager_client.h | 33 int32_t token, const std::string& cbType, const sptr<DeviceSelectionNotifierStub>& notifier); 34 int32_t UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType);
|
H A D | distributed_ability_manager_proxy.h | 34 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 D | distributed_ability_manager_interface.h | 39 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 D | distributed_ability_manager_service.h | 44 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 D | js_root_scene_session.cpp | 97 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 D | js_pip_controller.cpp | 325 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 D | notifier_mgr.cpp | 137 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 D | js_systemload.h | 73 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 D | js_display.cpp | 246 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 D | js_display_manager.cpp | 569 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 D | js_pip_manager.cpp | 243 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 D | js_window_manager.cpp | 794 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 D | js_extension_window.cpp | 718 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...] |