/ohos5.0/foundation/ability/ability_runtime/frameworks/cj/ffi/app/errormanager/ |
H A D | cj_error_manager_ffi.cpp | 42 int32_t observerId = g_serialNumber; in FfiOHOSErrorManagerOn() local 55 g_observer->AddObserverObject(observerId, observer); in FfiOHOSErrorManagerOn() 58 ret.data = observerId; in FfiOHOSErrorManagerOn() 62 int FfiOHOSErrorManagerOff(char* offType, int observerId) in FfiOHOSErrorManagerOff() argument 66 TAG_LOGI(AAFwkTag::APPKIT, "unregister errorObserver called, observer:%{public}d", observerId); in FfiOHOSErrorManagerOff() 73 if (g_observer == nullptr || !g_observer->RemoveObserverObject(observerId)) { in FfiOHOSErrorManagerOff()
|
H A D | cj_error_observer.cpp | 89 void ErrorObserver::AddObserverObject(const int32_t observerId, CErrorObserver observer) in AddObserverObject() argument 98 observerObjectMap_.emplace(observerId, mObserver); in AddObserverObject() 107 bool ErrorObserver::RemoveObserverObject(const int32_t observerId) in RemoveObserverObject() argument 110 result = (observerObjectMap_.erase(observerId) == 1); in RemoveObserverObject()
|
H A D | cj_error_observer.h | 32 void AddObserverObject(const int32_t observerId, CErrorObserver observer); 33 bool RemoveObserverObject(const int32_t observerId);
|
H A D | cj_error_manager_ffi.h | 25 int FfiOHOSErrorManagerOff(char* offType, int observerId);
|
/ohos5.0/foundation/ability/ability_runtime/frameworks/js/napi/app/error_manager/ |
H A D | js_error_observer.cpp | 77 void JsErrorObserver::AddJsObserverObject(const int32_t observerId, napi_value jsObserverObject, bo… in AddJsObserverObject() argument 83 observerId, std::shared_ptr<NativeReference>(reinterpret_cast<NativeReference*>(ref))); in AddJsObserverObject() 86 observerId, std::shared_ptr<NativeReference>(reinterpret_cast<NativeReference*>(ref))); in AddJsObserverObject() 90 bool JsErrorObserver::RemoveJsObserverObject(const int32_t observerId, bool isSync) in RemoveJsObserverObject() argument 94 result = (jsObserverObjectMapSync_.erase(observerId) == 1); in RemoveJsObserverObject() 96 result = (jsObserverObjectMap_.erase(observerId) == 1); in RemoveJsObserverObject()
|
H A D | js_error_manager.cpp | 244 int32_t observerId = serialNumber_; in OnOnOld() local 257 observer_->AddJsObserverObject(observerId, argv[INDEX_ONE]); in OnOnOld() 258 return CreateJsValue(env, observerId); in OnOnOld() 298 int32_t observerId = serialNumber_; in OnOnNew() local 311 return CreateJsValue(env, observerId); in OnOnNew() 343 int32_t observerId = -1; in OnOffOld() local 348 napi_get_value_int32(env, argv[INDEX_ONE], &observerId); in OnOffOld() 360 [&observer = observer_, observerId]( in OnOffOld() 363 if (observerId == -1) { in OnOffOld() 423 int32_t observerId = -1; in OnOffNew() local [all …]
|
H A D | js_error_observer.h | 33 …void AddJsObserverObject(const int32_t observerId, napi_value jsObserverObject, bool isSync = fals… 34 bool RemoveJsObserverObject(const int32_t observerId, bool isSync = false);
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-ability-kit/ |
H A D | js-apis-app-ability-errorManager.md | 70 let observerId = -1; 73 observerId = errorManager.on('error', observer); 83 off(type: 'error', observerId: number, callback: AsyncCallback\<void>): void 96 | observerId | number | 是 | 由on方法返回的观察器的index值。 | 114 let observerId = 100; 123 errorManager.off('error', observerId, unregisterErrorObserverCallback); 133 off(type: 'error', observerId: number): Promise\<void> 146 | observerId | number | 是 | 由on方法返回的观察器的index值。 | 169 let observerId = 100; 172 errorManager.off('error', observerId)
|
H A D | js-apis-application-appManager-sys.md | 68 unregisterApplicationStateObserver(observerId: number, callback: AsyncCallback\<void>): void 82 | observerId | number | 是 | 表示观察者的编号代码。 | 91 let observerId = 100; 98 …appManager.unregisterApplicationStateObserver(observerId, unregisterApplicationStateObserverCallba… 103 unregisterApplicationStateObserver(observerId: number): Promise\<void> 117 | observerId | number | 是 | 表示观察者的编号代码。 | 131 let observerId = 100; 133 appManager.unregisterApplicationStateObserver(observerId)
|
H A D | js-apis-app-ability-appManager.md | 409 const observerId = appManager.on('applicationState', applicationStateObserver); 410 console.log(`[appManager] observerCode: ${observerId}`); 485 const observerId = appManager.on('applicationState', applicationStateObserver, bundleNameList); 486 console.log(`[appManager] observerCode: ${observerId}`); 496 off(type: 'applicationState', observerId: number): Promise\<void> 509 | observerId | number | 是 | 表示观测器的编号代码。 | 533 let observerId = 0; 562 observerId = appManager.on('applicationState', applicationStateObserver, bundleNameList); 571 appManager.off('applicationState', observerId).then((data) => {
|
H A D | js-apis-inner-application-appStateData.md | 63 const observerId = appManager.on('applicationState', applicationStateObserver); 64 console.log(`[appManager] observerCode: ${observerId}`);
|
/ohos5.0/foundation/ability/ability_runtime/frameworks/js/napi/app/app_manager/ |
H A D | js_app_state_observer.h | 46 void AddJsObserverObject(const int32_t observerId, napi_value jsObserverObject); 47 bool RemoveJsObserverObject(const int32_t observerId); 48 bool FindObserverByObserverId(const int32_t observerId);
|
H A D | js_app_state_observer.cpp | 224 void JSAppStateObserver::AddJsObserverObject(const int32_t observerId, napi_value jsObserverObject) in AddJsObserverObject() argument 229 …jsObserverObjectMap_.emplace(observerId, std::shared_ptr<NativeReference>(reinterpret_cast<NativeR… in AddJsObserverObject() 232 bool JSAppStateObserver::RemoveJsObserverObject(const int32_t observerId) in RemoveJsObserverObject() argument 235 bool result = (jsObserverObjectMap_.erase(observerId) == 1); in RemoveJsObserverObject() 239 bool JSAppStateObserver::FindObserverByObserverId(const int32_t observerId) in FindObserverByObserverId() argument 241 auto item = jsObserverObjectMap_.find(observerId); in FindObserverByObserverId()
|
H A D | js_app_manager.cpp | 142 int64_t observerId = serialNumber; in OnRegisterApplicationStateObserver() local 143 observer_->AddJsObserverObject(observerId, argv[INDEX_ZERO]); in OnRegisterApplicationStateObserver() 149 return CreateJsValue(env, observerId); in OnRegisterApplicationStateObserver() 160 int64_t observerId = -1; in OnUnregisterApplicationStateObserver() local 168 napi_get_value_int64(env, argv[INDEX_ZERO], &observerId); in OnUnregisterApplicationStateObserver() 169 bool isExist = observer_->FindObserverByObserverId(observerId); in OnUnregisterApplicationStateObserver() 172 … TAG_LOGD(AAFwkTag::APPMGR, "observer exist:%{public}d", static_cast<int32_t>(observerId)); in OnUnregisterApplicationStateObserver() 174 … TAG_LOGD(AAFwkTag::APPMGR, "observer not exist:%{public}d", static_cast<int32_t>(observerId)); in OnUnregisterApplicationStateObserver() 180 [appManager = appManager_, observer = observer_, observerId, errCode]( in OnUnregisterApplicationStateObserver() 192 if (ret == 0 && observer->RemoveJsObserverObject(observerId)) { in OnUnregisterApplicationStateObserver()
|
/ohos5.0/foundation/ability/ability_runtime/frameworks/js/napi/app/js_app_manager/ |
H A D | js_app_state_observer.h | 46 void AddJsObserverObject(const int32_t observerId, napi_value jsObserverObject); 47 bool RemoveJsObserverObject(const int32_t observerId); 48 bool FindObserverByObserverId(const int32_t observerId);
|
H A D | js_app_state_observer.cpp | 338 void JSAppStateObserver::AddJsObserverObject(const int32_t observerId, napi_value jsObserverObject) in AddJsObserverObject() argument 342 …jsObserverObjectMap_.emplace(observerId, std::shared_ptr<NativeReference>(reinterpret_cast<NativeR… in AddJsObserverObject() 345 bool JSAppStateObserver::RemoveJsObserverObject(const int32_t observerId) in RemoveJsObserverObject() argument 347 bool result = (jsObserverObjectMap_.erase(observerId) == 1); in RemoveJsObserverObject() 351 bool JSAppStateObserver::FindObserverByObserverId(const int32_t observerId) in FindObserverByObserverId() argument 353 auto item = jsObserverObjectMap_.find(observerId); in FindObserverByObserverId()
|
H A D | js_app_manager.cpp | 305 int64_t observerId = serialNumber_; in OnOnOld() local 312 return CreateJsValue(env, observerId); in OnOnOld() 348 int32_t observerId = serialNumber_; in OnOnNew() local 355 return CreateJsValue(env, observerId); in OnOnNew() 505 int64_t observerId, napi_env env, NapiAsyncTask *task) in OnOffOldInner() argument 536 int64_t observerId = -1; in OnOffOld() local 537 napi_get_value_int64(env, argv[INDEX_ONE], &observerId); in OnOffOld() 543 if (!observer_->FindObserverByObserverId(observerId)) { in OnOffOld() 575 int32_t observerId = -1; in OnOffNew() local 576 if (!ConvertFromJsValue(env, argv[INDEX_ONE], observerId)) { in OnOffNew() [all …]
|
/ohos5.0/docs/en/application-dev/reference/apis-ability-kit/ |
H A D | js-apis-app-ability-errorManager.md | 70 let observerId = -1; 73 observerId = errorManager.on('error', observer); 83 off(type: 'error', observerId: number, callback: AsyncCallback\<void>): void 96 | observerId | number | Yes| Index of the observer returned by **on()**.| 114 let observerId = 100; 123 errorManager.off('error', observerId, unregisterErrorObserverCallback); 133 off(type: 'error', observerId: number): Promise\<void> 146 | observerId | number | Yes| Index of the observer returned by **on()**.| 169 let observerId = 100; 172 errorManager.off('error', observerId)
|
H A D | js-apis-application-appManager-sys.md | 68 unregisterApplicationStateObserver(observerId: number, callback: AsyncCallback\<void>): void 82 | observerId | number | Yes| Numeric code of the observer.| 91 let observerId = 100; 98 …appManager.unregisterApplicationStateObserver(observerId, unregisterApplicationStateObserverCallba… 103 unregisterApplicationStateObserver(observerId: number): Promise\<void> 117 | observerId | number | Yes| Numeric code of the observer.| 131 let observerId = 100; 133 appManager.unregisterApplicationStateObserver(observerId)
|
H A D | js-apis-inner-application-appStateData.md | 63 const observerId = appManager.on('applicationState', applicationStateObserver); 64 console.log(`[appManager] observerCode: ${observerId}`);
|
H A D | js-apis-app-ability-appManager.md | 409 const observerId = appManager.on('applicationState', applicationStateObserver); 410 console.log(`[appManager] observerCode: ${observerId}`); 485 const observerId = appManager.on('applicationState', applicationStateObserver, bundleNameList); 486 console.log(`[appManager] observerCode: ${observerId}`); 496 off(type: 'applicationState', observerId: number): Promise\<void> 509 | observerId | number | Yes| Digital code of the observer.| 533 let observerId = 0; 562 observerId = appManager.on('applicationState', applicationStateObserver, bundleNameList); 571 appManager.off('applicationState', observerId).then((data) => {
|
/ohos5.0/docs/zh-cn/release-notes/changelogs/OpenHarmony_3.2.8.3/ |
H A D | changelogs-ability.md | 293 …Manager | **function** unregisterApplicationStateObserver(observerId: **number**, cal… 294 …Manager | **function** unregisterApplicationStateObserver(observerId: **number**): Pr… 297 …pManager | **function** off(**type**: "applicationState", observerId: **number**, cal… 298 …pManager | **function** off(**type**: "applicationState", observerId: **number**): Pr… 300 … | errorManager | **function** unregisterErrorObserver(observerId: **number**, cal… 301 … | errorManager | **function** unregisterErrorObserver(observerId: **number**): Pr… 303 … | errorManager | **function** off(**type**: "error", observerId: **number**, cal… 304 … | errorManager | **function** off(**type**: "error", observerId: **number**): Pr…
|
/ohos5.0/docs/zh-cn/application-dev/dfx/ |
H A D | errormanager-guidelines.md | 18 | off(type: "error", observerId: number, callback: AsyncCallback\<void\>): void | 以callback的形式解除注册… 19 | off(type: "error", observerId: number): Promise\<void\> | 以Promise的形式解除注册监听,传入的number为之前注册监听时返回的序…
|
/ohos5.0/docs/en/release-notes/changelogs/OpenHarmony_3.2.8.3/ |
H A D | changelogs-ability.md | 308 …Manager | **function** unregisterApplicationStateObserver(observerId: **number**, cal… 309 …Manager | **function** unregisterApplicationStateObserver(observerId: **number**): Pr… 312 …pManager | **function** off(**type**: "applicationState", observerId: **number**, cal… 313 …pManager | **function** off(**type**: "applicationState", observerId: **number**): Pr… 315 … | errorManager | **function** unregisterErrorObserver(observerId: **number**, cal… 316 … | errorManager | **function** unregisterErrorObserver(observerId: **number**): Pr… 318 … | errorManager | **function** off(**type**: "error", observerId: **number**, cal… 319 … | errorManager | **function** off(**type**: "error", observerId: **number**): Pr…
|
/ohos5.0/docs/en/application-dev/dfx/ |
H A D | errormanager-guidelines.md | 16 | off(type: "error", observerId: number, callback: AsyncCallback\<void\>): void | Unregisters an o… 17 | off(type: "error", observerId: number): Promise\<void\> | Unregisters an observer in promise mode…
|