• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16sequenceable active_info..OHOS.Sensors.ActiveInfo;
17sequenceable OHOS.IRemoteObject;
18sequenceable sensor..OHOS.Sensors.Sensor;
19sequenceable sensor..OHOS.Sensors.SensorDescriptionIPC;
20
21interface OHOS.Sensors.ISensorService {
22    void EnableSensor([in] struct SensorDescriptionIPC sensorDesc, [in] long samplingPeriodNs, [in] long maxReportDelayNs);
23    void DisableSensor([in] struct SensorDescriptionIPC sensorDesc);
24    void GetSensorList([out] Sensor[] sensorList);
25    void GetSensorListByDevice([in] int deviceId, [out] Sensor[] singleDevSensors);
26    void TransferDataChannel([in] FileDescriptor sendFd, [in] IRemoteObject sensorClient);
27    void DestroySensorChannel([in] IRemoteObject sensorClient);
28    void SuspendSensors([in] int pid);
29    void ResumeSensors([in] int pid);
30    void GetActiveInfoList([in] int pid, [out] ActiveInfo[] activeInfoList);
31    void CreateSocketChannel([in] IRemoteObject sensorClient, [out] FileDescriptorSan clientFd);
32    void DestroySocketChannel([in] IRemoteObject sensorClient);
33    void EnableActiveInfoCB();
34    void DisableActiveInfoCB();
35    void ResetSensors();
36    void SetDeviceStatus([in] unsigned int deviceStatus);
37    void TransferClientRemoteObject([in] IRemoteObject sensorClient);
38    void DestroyClientRemoteObject([in] IRemoteObject sensorClient);
39 }