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; 19 20interface OHOS.Sensors.ISensorService { 21 void EnableSensor([in] int sensorId, [in] long samplingPeriodNs, [in] long maxReportDelayNs); 22 void DisableSensor([in] int sensorId); 23 void GetSensorList([out] Sensor[] sensorList); 24 void TransferDataChannel([in] FileDescriptor sendFd, [in] IRemoteObject sensorClient); 25 void DestroySensorChannel([in] IRemoteObject sensorClient); 26 void SuspendSensors([in] int pid); 27 void ResumeSensors([in] int pid); 28 void GetActiveInfoList([in] int pid, [out] ActiveInfo[] activeInfoList); 29 void CreateSocketChannel([in] IRemoteObject sensorClient, [out] FileDescriptor clientFd); 30 void DestroySocketChannel([in] IRemoteObject sensorClient); 31 void EnableActiveInfoCB(); 32 void DisableActiveInfoCB(); 33 void ResetSensors(); 34 }