IGeofenceInterface
概述
定义接口用于添加围栏,删除围栏,设置围栏回调函数等。
起始版本: 3.2
相关模块:HdiGeofence
汇总
Public 成员函数
名称 | 描述 |
---|---|
SetGeofenceCallback ([in] IGeofenceCallback callbackObj) | 设置地理围栏回调函数。 |
AddGnssGeofence ([in] struct GeofenceInfo fence, [in] enum GeofenceEvent monitorEvent) | 添加一个地理围栏。 |
DeleteGnssGeofence ([in] int fenceIndex) | 删除一个地理围栏。 |
成员函数说明
AddGnssGeofence()
IGeofenceInterface::AddGnssGeofence ([in] struct GeofenceInfo fence, [in] enum GeofenceEvent monitorEvent )
描述
添加一个地理围栏。
起始版本: 3.2
参数:
名称 | 描述 |
---|---|
fence | 表示地理围栏的参数。详情参考GeofenceInfo。 |
monitorEvent | 表示APP想要监控的地理围栏事件。详情参考GeofenceEvent。 |
返回:
返回0表示成功,返回负数表示失败。
DeleteGnssGeofence()
IGeofenceInterface::DeleteGnssGeofence ([in] int fenceIndex)
描述
删除一个地理围栏。
起始版本: 3.2
参数:
名称 | 描述 |
---|---|
fenceIndex | 表示地理围栏的编号。 |
返回:
返回0表示成功,返回负数表示失败。
SetGeofenceCallback()
IGeofenceInterface::SetGeofenceCallback ([in] IGeofenceCallback callbackObj)
描述
设置地理围栏回调函数。
起始版本: 3.2
参数:
名称 | 描述 |
---|---|
callback | 表示地理围栏的回调函数,GNSS驱动使用此回调上报地理围栏服务可用性, 上报地理围栏事件,上报地理围栏操作结果。详情参考IGeofenceCallback。 |
返回:
返回0表示成功,返回负数表示失败。