Files
mier_ios/Pods/BMKLocationKit/framework/BMKLocationKit.framework/Headers/BMKLocationAuth.h
2025-08-11 10:43:19 +08:00

70 lines
2.0 KiB
Objective-C
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// BMKLocationAuth.h
// LocationComponent
//
// Created by baidu on 2017/4/10.
// Copyright © 2017年 baidu. All rights reserved.
//
#ifndef BMKLocationAuth_h
#define BMKLocationAuth_h
///定位鉴权错误码
typedef NS_ENUM(NSInteger, BMKLocationAuthErrorCode) {
BMKLocationAuthErrorUnknown = -1, ///< 未知错误
BMKLocationAuthErrorSuccess = 0, ///< 鉴权成功
BMKLocationAuthErrorNetworkFailed = 1, ///< 因网络鉴权失败
BMKLocationAuthErrorFailed = 2, ///< KEY非法鉴权失败
};
///通知Delegate
@protocol BMKLocationAuthDelegate <NSObject>
@optional
/**
*@brief 返回授权验证错误
*@param iError 错误号 : 为0时验证通过具体参加BMKLocationAuthErrorCode
*/
- (void)onCheckPermissionState:(BMKLocationAuthErrorCode)iError;
@end
///BMKLocationAuth类。用于鉴权
@interface BMKLocationAuth : NSObject
///鉴权状态0成功 1网络错误 2授权失败
@property(nonatomic, readonly, assign) BMKLocationAuthErrorCode permisionState;
///是否同意隐私合规政策
@property(nonatomic, readonly, assign) BOOL isAgreePrivacy;
/**
* @brief 得到BMKLocationAuth的单例
*/
+ (BMKLocationAuth*)sharedInstance;
/**
*@brief 启动引擎
*@param key 申请的有效key
*@param delegate 回调是否鉴权成功
*/
-(void)checkPermisionWithKey:(NSString*)key authDelegate:(id<BMKLocationAuthDelegate>)delegate;
/**
*@brief 更新是否同意隐私合格政策需要在BMKLocationManager和BMKGeoFenceManager实例化之前调用否则实例化失败定位功能不可用。
* 在使用BMKLocationManager和BMKGeoFenceManager时请注意需要加判空处理。
* 隐私政策官网链接https://lbsyun.baidu.com/index.php?title=openprivacy
*
* note:隐私政策变更后需要重新初始化BMKLocationManager或BMKGeoFenceManager
*@param agreePrivacy 是否同意
*/
- (void)setAgreePrivacy:(BOOL)agreePrivacy;
@end
#endif /* BMKLocationAuth_h */