UnionInterface.h 3.09 KB
//
//  UnionInterface.h
//  PoolSdk
//
//  Created by winFan on 11/23/15.
//  Copyright (c) 2015 winFan. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "PoolCreateOrderInfo.h"
#import "PoolReportInfo.h"

@protocol UnionInterface
/**
 初始化SDK
 */

//[[PoolChecker getInstance] sendNotice:PoolSDKNotificationPay notiName:@"" statusCode:POOLSDK_NO_ERROR description:@"" extendData:order_id];

- (void)SDKinit:(UIViewController *) control;


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

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


- (void)SDKloginSDK:(UIViewController *) control;

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

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


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

/**
 退出接口
 */
- (void)SDKexitSDK;


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

- (void)destroySDK;


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

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

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

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


- (void)viewDidAppear;

/**
 提交数据
 */
- (void)SDKreport:(PoolReportInfo *) reportInfo;

/**
 进行支付
 */

- (void)SDKpayWithPaymentInfo:(PoolCreateOrderInfo *)payInfo;
- (void)receiveCreateOrder: (NSNotification *)notification;

/**
 *充值统计参数
 *accountId	账号ID,必填项, 和登陆、注册使用的accountId保持一致即可。
 *orderId	订单Id,必填项,请保证该值的全局唯一,系统会使用订单Id进行付费订单排重。
 *currencyAmount	货币金额,单位为元,支持小数
 *currencyType	货币类型
 *payType	支付类型(渠道)
 */
-(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