PoolSdk.h 3.86 KB
//
//  PoolSdk.h
//  PoolSdk
//
//  Created by winFan on 11/23/15.
//  Copyright (c) 2015 winFan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PoolSdk2.h"
#import <UIKit/UIKit.h>

@interface PoolSdk : NSObject
/**
 *  当前SDK的版本
 */
@property(nonatomic, strong, readonly)NSString *sdkVersion;

/**
 *  用于设置url types schemes 默认为工程名
 */
@property(nonatomic, strong)NSString *urlSchemes;

@property BOOL isApplePaying;
/**
 获取SDK实例对象
 */
+ (PoolSdk *)shareSDK;

/**
 初始化SDK
 */
- (void)initSDK:(UIViewController *) control;


-(void)viewDidAppear;

- (void)setViewController:(UIViewController *)viewController;

/**
 登录SDK
 */
- (void)loginSDK;

- (void)loginSDK:(UIViewController *)viewController;

/**
 进行支付
 */
- (void)payWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;


/**
 *是否含有用户中心接口
 **/
- (BOOL)hasUserCenter;

/**
 用户中心
 */
- (void)gotoUserCenter;

/**
 report
 */
- (void)reportSDK:(PoolReportInfo *)reportInfo;

/**
 *是否含有注销接口
 */
- (BOOL)hasLogout;

/**
 注销
 */
- (void)logoutSDK;

/**
 *是否含有切换账号接口
 **/
- (BOOL)hasSwitchAccount;

/**
 *切换账号
 **/
- (void)switchAccount;


/**
 *是否含有退出接口
 **/
- (BOOL)hasExit;

/**
 退出
 */
- (void)exitSDK;

/**
 *SDK销毁操作(游戏退出时调用)
 */
- (void)destroySDK;

/**
 显示/隐藏浮标
 */
//- (void)showFloatIcon:(BOOL)bFlag;


/**
 // called in - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
 */

/**
 应用 appid
 */

/**
 应用支持的方向 默认为 EDreamSDKOrientationLandscape
 */
@property(nonatomic, assign)ESDKOrientation sdkOrientation;

/**
 浮标是否已经显示,默认为NO
 */
@property(nonatomic, assign)BOOL bShowedFloat;


/**
 serverId
 */
@property(nonatomic, assign)int serverId;

/**
 获取gamechannelid
 */
-(NSString *) getGameChannelId;

/**
 获取Custom
 */
- (NSString *) getCustomValue;

/**
 获取ChannelParameter1
 */
- (NSString *) getChannelParameter1;

/**
 获取ChannelParameter2
 */
- (NSString *) getChannelParameter2;


/**
 *充值统计参数
 *accountId	账号ID,必填项, 和登陆、注册使用的accountId保持一致即可。
 *orderId	订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
 *currencyAmount	货币金额,单位为元,支持小数
 *currencyType	货币类型
 *payType	支付类型(渠道)
 *custom    自定义扩展参数
 */
-(void)paymentSuccess:(NSString*)accountId orderId:(NSString*)orderId currencyAmount:(double)amount currencyType:(NSString*)currencyType payType:(NSString*)payType custom:(NSArray*)customArray;


- (void)handleOpenurl:(NSURL *)url;

- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;

//推送
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ;
//推送
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;


- (void)applicationDidEnterBackground:(UIApplication *)application;

- (void)applicationDidBecomeActive:(UIApplication *)application;

- (void)applicationWillEnterForeground:(UIApplication *)application;

- (void)applicationWillResignActive:(UIApplication *)application;

-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options;

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;

@end