/ohos5.0/docs/zh-cn/release-notes/api-diff/v3.2-beta4/ |
H A D | js-apidiff-sensor.md | 76 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| 77 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| 78 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| 79 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| 80 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| 81 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| 82 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| 83 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| 84 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| 85 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:sensor|@ohos.sensor.d.ts| [all …]
|
/ohos5.0/docs/zh-cn/release-notes/api-diff/monthly-202210/ |
H A D | js-apidiff-sensor.md | 27 |新增|NA|方法名 or 属性名:once<br>函数:function once(type: SensorId.AMBIENT_LIGHT, callback: Callback<LightRe… 30 |新增|NA|方法名 or 属性名:once<br>函数:function once(type: SensorId.GRAVITY, callback: Callback<GravityRespon… 33 |新增|NA|方法名 or 属性名:once<br>函数:function once(type: SensorId.HALL, callback: Callback<HallResponse>): … 35 |新增|NA|方法名 or 属性名:once<br>函数:function once(type: SensorId.HUMIDITY, callback: Callback<HumidityResp… 90 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:ohos.sensor.SensorId.BAROMET… 91 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:ohos.sensor.SensorId.GRAVITY… 92 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:ohos.sensor.SensorId.GYROSCO… 94 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:ohos.sensor.SensorId.HALL … 95 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:ohos.sensor.SensorId.HUMIDIT… 99 |废弃版本有变化|方法名 or 属性名:once<br>废弃版本:N/A|方法名 or 属性名:once<br>废弃版本:9<br>代替接口:ohos.sensor.SensorId.PEDOMET… [all …]
|
/ohos5.0/docs/en/release-notes/api-diff/v3.2-beta4/ |
H A D | js-apidiff-sensor.md | 25 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.ACCELEROMET… 27 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.AMBIENT_LIG… 29 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.BAROMETER, … 30 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.GRAVITY, ca… 31 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.GYROSCOPE, … 33 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.HALL, callb… 34 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.HEART_RATE,… 35 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.HUMIDITY, c… 39 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.ORIENTATION… 40 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.PEDOMETER, … [all …]
|
/ohos5.0/docs/en/release-notes/api-diff/monthly-202210/ |
H A D | js-apidiff-sensor.md | 25 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.ACCELEROMET… 27 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.AMBIENT_LIG… 29 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.BAROMETER, … 30 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.GRAVITY, ca… 31 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.GYROSCOPE, … 33 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.HALL, callb… 34 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.HEART_RATE,… 35 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.HUMIDITY, c… 39 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.ORIENTATION… 40 |Added|NA|Method or attribute name: once<br>Function name: function once(type: SensorId.PEDOMETER, … [all …]
|
/ohos5.0/docs/zh-cn/application-dev/basic-services/common-event/ |
H A D | itc-with-emitter.md | 20 | once | 订阅事件 | 订阅事件一次。 | 36 订阅事件使用on(持续订阅)或者once(单次订阅)接口进行订阅,设置要订阅的事件以及接收到事件后的回调函数。 51 // 注意:once订阅只接收一次事件,on订阅则一直接收直到取消订阅为止。 52 emitter.once(event, () => { 53 console.info('once callback'); 68 emitter.once(event, (eventData : emitter.EventData) => {
|
/ohos5.0/commonlibrary/c_utils/base/test/unittest/common/ |
H A D | utils_timer_test.cpp | 157 bool StartTimer(int milliseconds, bool once); 177 bool A::StartTimer(int milliseconds, bool once) in StartTimer() argument 328 static void TimerRegisterMechanism(Utils::Timer& timer, bool once) in TimerRegisterMechanism() argument 331 timer.Register(TimeOutCallback1, interval, once); in TimerRegisterMechanism() 332 timer.Register(TimeOutCallback1, interval, !once); in TimerRegisterMechanism() 333 timer.Register(TimeOutCallback1, interval, once); in TimerRegisterMechanism() 334 timer.Register(TimeOutCallback1, interval, !once); in TimerRegisterMechanism() 347 bool once = true; variable 348 TimerRegisterMechanism(timer, once); 364 bool once = false; variable [all …]
|
/ohos5.0/commonlibrary/c_utils/base/src/ |
H A D | timer.cpp | 82 uint32_t Timer::Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once) in Register() argument 86 int timerFd = once ? INVALID_TIMER_FD : GetTimerFd(interval); in Register() 88 uint32_t ret = DoRegister([this](int fd) { this->OnTimer(fd); }, interval, once, timerFd); in Register() 105 entry->once = once; in Register() 130 if ((*itor)->once) { in Unregister() 156 uint32_t Timer::DoRegister(const TimerListCallback& callback, uint32_t interval, bool once, int &ti… in DoRegister() argument 159 uint32_t ret = reactor_->ScheduleTimer(cb, interval, timerFd, once); in DoRegister() 197 if (!ptr->once) { in OnTimer() 232 if (!ptr->once) { in GetTimerFd()
|
/ohos5.0/docs/zh-cn/release-notes/api-diff/v3.1-Release/ |
H A D | js-apidiff-sensor.md | 111 …once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: Callback\<AccelerometerResponse>): v…
|
/ohos5.0/docs/en/release-notes/api-diff/v3.1-Release/ |
H A D | js-apidiff-sensor.md | 111 …once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: Callback\<AccelerometerResponse>): v…
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-basic-services-kit/ |
H A D | js-apis-emitter.md | 114 ## emitter.once 116 once(event: InnerEvent, callback: Callback\<EventData\>): void 139 emitter.once(innerEvent, () => { 140 console.info('once callback'); 144 ## emitter.once<sup>11+</sup> 146 once(eventId: string, callback: Callback\<EventData\>): void 165 emitter.once("eventId", () => { 166 console.info('once callback'); 170 ## emitter.once<sup>12+</sup> 172 once<T\>(eventId: string, callback: Callback\<GenericEventData<T\>\>): void [all …]
|
/ohos5.0/base/notification/eventhandler/frameworks/cj/src/ |
H A D | emitter.cpp | 102 void UpdateOnceFlag(CallbackInfo *callbackInfo, bool once) in UpdateOnceFlag() argument 104 if (!once) { in UpdateOnceFlag() 105 if (callbackInfo->once) { in UpdateOnceFlag() 107 callbackInfo->once = false; in UpdateOnceFlag() 112 if (callbackInfo->once) { in UpdateOnceFlag() 116 callbackInfo->once = true; in UpdateOnceFlag() 130 int32_t OnOrOnce(InnerEvent::EventId eventId, CallbackImpl **callbackImpl, bool once) in OnOrOnce() argument 137 UpdateOnceFlag(callbackInfo, once); in OnOrOnce() 150 callbackInfo->once = once; in OnOrOnce() 284 if (callbackInfo->once || callbackInfo->isDeleted) { in ProcessCallback()
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-sensor-service-kit/ |
H A D | js-apis-sensor.md | 1009 ## sensor.once<sup>9+</sup> 1255 sensor.once(sensor.SensorId.GRAVITY, (data: sensor.GravityResponse) => { 1361 once(type: SensorId.HALL, callback: Callback<HallResponse>): void 1390 sensor.once(sensor.SensorId.HALL, (data: sensor.HallResponse) => { 1391 console.info('Succeeded in invoking once. Status: ' + data.status); 1691 console.info('Succeeded in invoking once. Step count: ' + data.steps); 5374 ## sensor.once<sup>(deprecated)</sup> 5654 console.info('Succeeded in invoking once. Steps: ' + data.steps); 5848 > 从API version 9 开始不再维护,建议使用[sensor.once.HALL](#hall9-1)<sup>9+</sup>代替。 5865 console.info('Succeeded in invoking once. Status: ' + data.status); [all …]
|
/ohos5.0/docs/en/application-dev/basic-services/common-event/ |
H A D | itc-with-emitter.md | 20 | once | Event subscription| Subscribes to an event once.| 21 | emit | Event publishing| Publishes an event once.| 36 …Use **on()** for continuous subscription or **once()** for one-time subscription. Set the events t… 51 …// Note that the event is received only once using once(), while the event is received until the s… 52 emitter.once(event, () => { 53 console.info('once callback'); 68 emitter.once(event, (eventData : emitter.EventData) => {
|
/ohos5.0/docs/zh-cn/release-notes/api-diff/v3.2-Release/ |
H A D | js-apidiff-sensor.md | 24 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.ACCELEROMETER, callback: Callback\<Acceler… 26 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.AMBIENT_LIGHT, callback: Callback\<LightRe… 28 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.BAROMETER, callback: Callback\<BarometerRe… 29 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.GRAVITY, callback: Callback\<GravityRespon… 30 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.GYROSCOPE, callback: Callback\<GyroscopeRe… 32 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.HALL, callback: Callback\<HallResponse>): … 33 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.HEART_RATE, callback: Callback\<HeartRateR… 34 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.HUMIDITY, callback: Callback\<HumidityResp… 38 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.ORIENTATION, callback: Callback\<Orientati… 39 |新增|NA|类名:sensor;<br>方法or属性:function once(type: SensorId.PEDOMETER, callback: Callback\<PedometerRe… [all …]
|
/ohos5.0/base/startup/init/test/moduletest/ |
H A D | init_test.cfg | 28 "once" : 1 34 "once" : 1 40 "once" : 1 46 "once" : 1
|
/ohos5.0/docs/zh-cn/application-dev/device/sensor/ |
H A D | sensor-guidelines.md | 16 | sensor.once(sensorId, callback:AsyncCallback<Response>): void | 获取一次传感器数据变化。 | 53 4. 注册监听。可以通过on()和once()两种接口监听传感器的调用结果。 65 通过once()接口,实现对传感器的一次监听。 68 sensor.once(sensor.SensorId.ACCELEROMETER, (data: sensor.AccelerometerResponse) => {
|
/ohos5.0/foundation/communication/wifi/wifi/utils/src/ |
H A D | wifi_timer.cpp | 39 …iTimer::Register(const TimerCallback &callback, uint32_t &outTimerId, uint32_t interval, bool once) in Register() argument 85 …iTimer::Register(const TimerCallback &callback, uint32_t &outTimerId, uint32_t interval, bool once) in Register() argument 92 uint32_t ret = timer_->Register(callback, interval, once); in Register()
|
/ohos5.0/docs/en/application-dev/reference/apis-sensor-service-kit/ |
H A D | js-apis-sensor.md | 1009 ## sensor.once<sup>9+</sup> 1148 Obtains data of the temperature sensor once. 1188 Obtains data of the barometer sensor once. 1228 Obtains data of the gravity sensor once. 1403 Obtains data of the heart rate sensor once. 1446 Obtains data of the humidity sensor once. 1660 Obtains data of the pedometer sensor once. 1703 Obtains data of the pedometer sensor once. 1746 Obtains data of the proximity sensor once. 5374 ## sensor.once<sup>(deprecated)</sup> [all …]
|
/ohos5.0/commonlibrary/c_utils/base/include/ |
H A D | timer.h | 106 uint32_t Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once = false); 119 …virtual uint32_t DoRegister(const TimerListCallback& callback, uint32_t interval, bool once, int &… 131 bool once; member
|
/ohos5.0/docs/en/release-notes/api-diff/v3.2-Release/ |
H A D | js-apidiff-sensor.md | 24 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.ACCELEROMET… 26 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.AMBIENT_LIG… 28 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.BAROMETER, … 29 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.GRAVITY, ca… 30 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.GYROSCOPE, … 32 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.HALL, callb… 33 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.HEART_RATE,… 34 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.HUMIDITY, c… 38 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.ORIENTATION… 39 |Added|NA|Class name: sensor;<br>Method or attribute name: function once(type: SensorId.PEDOMETER, … [all …]
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-multimodalawareness-kit/ |
H A D | js-apis-stationary.md | 89 ## stationary.once('still' | 'relativeStill') 91 once(activity: ActivityType, callback: Callback<ActivityResponse>): void 107 stationary.once('still', (data) => {
|
/ohos5.0/docs/zh-cn/release-notes/api-diff/v3.1-beta/ |
H A D | js-apidiff-v3.1-beta.md | 203 | 事件通知-emitter | once(event: InnerEvent, callback: Callback\<EventData>): void | 新增 | 单次订阅某个事件以及接收事… 406 | 泛Sensor服务-sensor | once(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: AsyncCallback\<Gravi… 407 | 泛Sensor服务-sensor | once(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: AsyncCallback\<Gyr… 411 | 泛Sensor服务-sensor | once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: AsyncCallback\<Ped… 415 | 泛Sensor服务-sensor | once(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: AsyncCallback\<Pro… 416 | 泛Sensor服务-sensor | once(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: AsyncCallback\<Humi… 417 | 泛Sensor服务-sensor | once(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: AsyncCallback\<Bar… 418 | 泛Sensor服务-sensor | once(type: SensorType.SENSOR_TYPE_ID_HALL, callback: AsyncCallback\<HallResp… 419 | 泛Sensor服务-sensor | once(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: AsyncCallback\… 420 | 泛Sensor服务-sensor | once(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: AsyncCallback\<O… [all …]
|
/ohos5.0/commonlibrary/c_utils/base/test/fuzztest/timer_fuzzer/ |
H A D | timer_fuzzer.cpp | 41 bool once = dataProvider->ConsumeBool(); in __anon70cc5f930102() local 42 uint32_t timerId = timer.Register(TimeOutCallback, interval, once); in __anon70cc5f930102() 44 …egister, interval = %{public}d, once = %{public}d, timerId = %{public}d", interval, once, timerId); in __anon70cc5f930102()
|
/ohos5.0/base/notification/eventhandler/frameworks/napi/src/ |
H A D | events_emitter.cpp | 81 if (callbackInner->once) { in ProcessCallback() 195 static void UpdateOnceFlag(std::shared_ptr<AsyncCallbackInfo>callbackInfo, bool once) in UpdateOnceFlag() argument 197 if (!once) { in UpdateOnceFlag() 198 if (callbackInfo->once) { in UpdateOnceFlag() 200 callbackInfo->once = false; in UpdateOnceFlag() 205 if (callbackInfo->once) { in UpdateOnceFlag() 209 callbackInfo->once = true; in UpdateOnceFlag() 341 napi_value OnOrOnce(napi_env env, napi_callback_info cbinfo, bool once) in OnOrOnce() argument 370 UpdateOnceFlag(callbackInfo, once); in OnOrOnce() 381 callbackInfo->once = once; in OnOrOnce()
|
/ohos5.0/foundation/multimedia/camera_framework/services/camera_service/src/ |
H A D | camera_timer.cpp | 36 uint32_t CameraTimer::Register(const TimerCallback& callback, uint32_t interval, bool once) in Register() argument 40 uint32_t timerId = timer_->Register(callback, interval, once); in Register()
|