//
//  LMDelegate.h
//  LemonSDK
//
//  Created by Mac on 13-7-31.
//  Copyright (c) 2013年 Syt. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "LMEntity.h"
#import <KakaoGame/KakaoGame.h>

@protocol LMDelegate <NSObject>

@optional

//SDK初始化回调
- (void)lemonSDKInitCallBack:(int)code msg:(NSString *)msg;

//SDK登陆系统回调，实现LMDelegate协议，并实现loginPopupCallBack方法
/*!
 登陆系统接口回调
 
 loginSystemOperation == login
 
 code                    描述
 0                 登录成功
 100                 账户名或密码没有填写
 102                 用户名不存在
 103                 密码错误
 108                 禁止登陆
 109                 非法操作
 
 
 loginSystemOperation == regist
 
 code               描述
 0                     注册成功
 100                 账户名或密码没有填写
 101                 两次密码输入不一致
 200                 用户名必须为6-50个英文字母或数字
 2031                用户名已经被注册
 204                 注册失败
 221                 非法操作
 222                 注册过于频繁， 请过一个小时候再试
 
 loginSystemOperation == autoRegist
 
 code                   描述
 221                 非法操作
 
 loginSystemOperation == bind
 
 code                    描述
 0                 绑定成功
 100                 账户名或密码没有填写
 101                 两次密码输入不一致
 109                 非法操作
 200                 用户名必须为6-50个英文字母或数字
 201                 密码必须为6-20个英文字母或数字
 2031                用户名已经被注册
 
 */

- (void)loginPopupCallBack:(NSString *)loginSystemOperation Code:(int)code msg:(NSString *)msg entity:(LMEntity *)entity;

//调用登陆，实现LMDelegate协议，并实现loginCallBack方法.
- (void)loginCallBack:(int)code msg:(NSString*)msg entity:(LMEntity *)entity;

//调用注册，实现LMDelegate协议，并实现registCallBack方法.
- (void)registCallBack:(int)code msg:(NSString*)msg entity:(LMEntity *)entity;

//调用快速登录，实现LMDelegate协议，并实现autoRegistCallBack方法
- (void)autoRegistCallBack:(int)code msg:(NSString*)msg entity:(LMEntity *)entity;

//帐号绑定，实现LMDelegate协议，并实现bindCallBack方法
- (void)bindCallBack:(int)code msg:(NSString*)msg entity:(LMEntity *)entity;


//注销账号回调
- (void)cancellationOfTheCurrentAccountCallBack:(NSString *)msg;

//获取5ROCKS购买项ID回调
-(void)getFiveRocksProductIdCallBack:(NSString *)productId;

//登出kakao账号回调
- (void)logoutKakaoCallBack:(int)code msg:(NSString *)msg;

//删除kakao用户回调
- (void)deleteLogoutKakaoCallBack:(int)code msg:(NSString *)msg;

//获取游戏内好友列表回调
- (void)getGameFriendListCallBack:(int)code msg:(NSString *)msg friends:(NSArray *)friends;

//获取kakao朋友列表回调
- (void)getkakaoFriendCallBack:(int)code msg:(NSString *)msg friends:(NSArray *)friends;

//获取需要邀请的kakao朋友列表回调
- (void)getkakaoInvitableCallBack:(int)code msg:(NSString *)msg friends:(NSArray *)friends __attribute__((deprecated("已废弃,请使用新版邀请kakao好友回调接口", "getkakaoInvitableCallBack:(int)code msg:(NSString *)msg nickName:(NSString *)nickName uuid:(NSString *)uuid")));

//获取需要邀请的kakao朋友回调
- (void)getkakaoInvitableCallBack:(int)code msg:(NSString *)msg nickName:(NSString *)nickName uuid:(NSString *)uuid;

//获取邀请回调
- (void)sendTemplateMessageCallBack:(int)code msg:(NSString *)msg friends:(KGKakaoProfile *)friends;

//获取kakao受邀好友数量回调
-(void)getKakaoInvitationCountCallBack:(int)code count:(int)count;

//获取是否通知kakao消息
- (void)getMessageSettingCallBack:(int)code msg:(NSString *)msg isAllowedMessage:(BOOL)isAllowedMessage;

//获取绑定回调
-(void)bindKakaoCallBack:(int)code msg:(NSString *)msg;

//视频播放完成回调
- (void)videoFinishCallBack;

- (void)sendRewardRequstCallBack:(int)code msg:(NSString *)msg;


//用户同意协议回调
- (void)agreeProtocolCallBack;

- (void)kakaoMemberKeyCallBack:(NSString *)key;

#pragma mark - IAP Callback
//IAP充值，实现LMDelegate协议，并实现purchaseCallBack方法
- (void)purchaseCallBack:(int)code msg:(NSString*)msg;

//IAP失败回调
/*! IAP失败回调
 
 code               描述
 1             无效订单
 2             重复订单
 3             非此用户订单
 800             设备不支持内购
 801             从苹果服务器刷新商品列表失败
 802             所选商品还不支持购买
 
 */
-(void)failedPurchaseCallBack:(int)code msg:(NSString*)msg;

-(void)gameCenterUploadScoreFinish;

-(void)gameCenterUploadScoreFailWithLeaderboardIdentifier:(NSString *)leaderboardIdentifier andScore:(int64_t)score;

-(void)gameCenterUploadAchievementFinish;

-(void)gameCenterUploadAchievementFailWithAchievement:(NSString *)achievement andPercentComplete:(double)percentComplete;

-(void)gameCenterOpenViewController;

-(void)gameCenterCloseViewController;

@required
//接口调用后网络请求失败回调
- (void)networkRequestFailedCallBack;

@end
