IGeofenceCallback

概述

定义回调函数用于上报地理围栏服务是否可用、地理围栏事件、地理围栏操作结果等。

起始版本: 3.2

相关模块:HdiGeofence

汇总

Public 成员函数

名称 描述
ReportGeofenceAvailability ([in] boolean isAvailable) 上报地理围栏服务是否可用。
ReportGeofenceEvent ([in] int fenceIndex, [in] struct LocationInfo location, [in] enum GeofenceEvent event, [in] long timestamp) 用于上报地理围栏事件。
ReportGeofenceOperateResult ([in] int fenceIndex, [in] enum GeofenceOperateType type, [in] enum GeofenceOperateResult result) 上报围栏操作结果。

成员函数说明

ReportGeofenceAvailability()

IGeofenceCallback::ReportGeofenceAvailability ([in] boolean isAvailable)

描述

上报地理围栏服务是否可用。

起始版本: 3.2

参数:

名称 描述
isAvailable 表示地理围栏是否可用。

返回:

返回0表示成功,返回负数表示失败。

ReportGeofenceEvent()

IGeofenceCallback::ReportGeofenceEvent ([in] int fenceIndex, [in] struct LocationInfo location, [in] enum GeofenceEvent event, [in] long timestamp )

描述

用于上报地理围栏事件。

起始版本: 3.2

参数:

名称 描述
fenceIndex 表示地理围栏编号。
location 表示当前的位置,详情参考LocationInfo
event 表示当前发生的地理围栏事件,详情参考GeofenceEvent
timestamp 表示地理围栏事件发生的时刻。

返回:

返回0表示成功,返回负数表示失败。

ReportGeofenceOperateResult()

IGeofenceCallback::ReportGeofenceOperateResult ([in] int fenceIndex, [in] enum GeofenceOperateType type, [in] enum GeofenceOperateResult result )

描述

上报围栏操作结果。

起始版本: 3.2

参数:

名称 描述
fenceIndex 表示地理围栏编号。
type 表示地理围栏操作类型。详情参考GeofenceOperateType
result 表示地理围栏操作结果,详情参考GeofenceOperateResult

返回:

返回0表示成功,返回负数表示失败。