diff --git a/interfaces/native/include/sensor_agent.h b/interfaces/native/include/sensor_agent.h index ead362c940d06fbf0c0bbac8ae409765c13a1933..d7c609ee07bcf3bf7e63042e36fa7a33bcce626c 100755 --- a/interfaces/native/include/sensor_agent.h +++ b/interfaces/native/include/sensor_agent.h @@ -39,6 +39,7 @@ #define SENSOR_AGENT_H #include "sensor_agent_type.h" +#include "i_sensor_status_callback.h" #ifdef __cplusplus #if __cplusplus @@ -128,6 +129,14 @@ int32_t DeactivateSensor(int32_t sensorTypeId, const SensorUser *user); */ int32_t SetMode(int32_t sensorTypeId, const SensorUser *user, int32_t mode); +int32_t SuspendSensors(int32_t pid); + +int32_t ResumeSensors(int32_t pid); + +int32_t GetAppSensors(int32_t pid, AppSensorInfo **appSensorInfos, int32_t *count); + +int32_t RegisterCallback(OHOS::sptr callback); + #ifdef __cplusplus #if __cplusplus } diff --git a/interfaces/native/include/sensor_agent_type.h b/interfaces/native/include/sensor_agent_type.h index 37b0de0e57418519152160a8e4307367945e1d8f..72770bcbec881d723f4ba43694103ef1731d6b8c 100644 --- a/interfaces/native/include/sensor_agent_type.h +++ b/interfaces/native/include/sensor_agent_type.h @@ -395,6 +395,14 @@ typedef struct WearDetectionData { float value; } WearDetectionData; +typedef struct AppSensorInfo { + int32_t pid; /**< PID */ + int32_t sensorId; /**< Sensor ID */ + bool isActive; /**< Sensor status */ + int64_t samplingPeriodNs; /**< Sample period, in ns */ + int64_t maxReportDelayNs; /**< Maximum Report Delay, in ns */ +} AppSensorInfo; + #ifdef __cplusplus #if __cplusplus }