//
|
// TianQingSDK.h
|
// TianQingSDK
|
//
|
// Created by lllll-xy on 18/1/30.
|
// Copyright © 2018年 lllll-xy. All rights reserved.
|
//
|
|
#import <Foundation/Foundation.h>
|
#import "TianQingHeader.h"
|
|
typedef enum
|
{
|
TianQingInitErrorCodeNone = 0, //初始化成功
|
TianQingInitErrorCodeNet = 1, //网络异常
|
TianQingInitErrorCodeConig = 2, //appid配置错误
|
TianQingInitErrorCodeUpdating = 3 //游戏更新中
|
}TianQingInitErrorCode;
|
|
typedef enum
|
{
|
TianQingSuccess = 0, //成功
|
TianQingFail = 1, //失败
|
|
}TianQingStatus;
|
|
typedef void (^TianQingInitErrorCodeBlock)(TianQingInitErrorCode result);
|
typedef void (^TianQingStatusBlock)(TianQingStatus result);
|
|
@interface TianQingSDK : NSObject
|
|
@property (strong,nonatomic,readonly)NSString *APPID;
|
@property (assign,nonatomic)BOOL show;
|
|
+ (TianQingSDK *)defaultTianQing;
|
|
/*
|
@brief SDK回调事件设置接口
|
@param delegate 回调时间的观察者,建议使用全局变量作为参数
|
*/
|
+ (void)setDelegate:(id<TianQingDelegate>)delegate;
|
|
/*
|
@brief SDK应用初始化函数,异步函数,result 0表示成功,1表示网络异常,2表示appid、secret错误
|
@param appid 申请的APPID
|
*/
|
- (void)TianQingSDKInitWithAPPID:(NSString *)appid Completion:(TianQingInitErrorCodeBlock)completion;
|
|
- (void)TianQingUploadLoacationWithLatitude:(NSString*)latitude longitude:(NSString*)longitude Completion:(TianQingStatusBlock)completion;
|
|
- (void)tool:(NSString *)LLSerialNumber andWithLLItemID:(NSString *)LLItemID andWithLLItemP:(NSInteger)LLItemP andWithLLReserved:(NSString *)LLReserved andWithLLDesc:(NSString *)LLDesc;
|
|
- (void)TianQingUserInfo:(NSDictionary *)info;
|
|
- (void)setInfo:(id)info;
|
|
/*
|
@breif 调用登录, 登录结果会以通知形式返回,若登录成功,将自动退出登录页面
|
@param view 当前view 可填nil
|
@return 返回00进入sdk登录界面, 非0表示sdk登录环境异常
|
*/
|
- (int)TianQingLoginInView:(UIView *)view;
|
|
/*
|
@brief 判断是否已登录并且有效
|
*/
|
- (BOOL)isLogined;
|
|
/*
|
@brief 注销,同步方法
|
*/
|
- (void)LLLogout;
|
|
@end
|