You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.5 KiB

//
// SMS_SDK.h
// SMS_SDKDemo
//
// Created by 刘 靖煌 on 14-8-28.
// Copyright (c) 2014年 掌淘科技. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <SMS_SDK/SMSSDKResultHandlerDef.h>
#import <SMS_SDK/SMSSDKUserInfo.h>
/**
* @brief Core classv2.1.5
*/
@interface SMSSDK : NSObject
#pragma mark - 支持获取手机号码认证 Token (get the token to verify the phone number)
/**
* @brief Token
*
* @param handler (Results of the request)
*/
+ (void) getMobileAuthTokenWith:(SMSSDKMobileAuthTokenResultHandler)handler;
/**
* @brief
*
* @param phoneNum (The phone number)
* @param tokenInfo SDK返回的SMSSDKAuthToken Model
* @param completion (Results of the request)
*/
+ (void) verifyMobileWithPhone:(NSString *)phoneNum
token:(SMSSDKAuthToken *)tokenInfo
completion:(SMSSDKMobileVerifyResultHandler)completion;
#pragma mark - 支持获取验证码和提交验证码 (get the verification code and commit verifacation code)
/**
* @from v1.1.1
* @brief (Get verification code)
*
* @param method (The method of getting verificationCode)
* @param phoneNumber (The phone number)
* @param zone "+"(Area code)
* @param result (Results of the request)
*/
+ (void) getVerificationCodeByMethod:(SMSGetCodeMethod)method
phoneNumber:(NSString *)phoneNumber
zone:(NSString *)zone
result:(SMSGetCodeResultHandler)result __deprecated_msg("deprecated from v3.1.0");
/**
* @from v3.1.0
* @brief (Get verification code)
*
* @param method (The method of getting verificationCode)
* @param phoneNumber (The phone number)
* @param zone "+"(Area code)
* @param tmpCode id(template id)
* @param result (Results of the request)
*/
+ (void) getVerificationCodeByMethod:(SMSGetCodeMethod)method
phoneNumber:(NSString *)phoneNumber
zone:(NSString *)zone
template:(NSString *)tmpCode
result:(SMSGetCodeResultHandler)result;
/**
* @from v1.1.1
* @brief (Commit the verification code)
*
* @param code (Verification code)
* @param phoneNumber (The phone number)
* @param zone "+"(Area code)
* @param result (Results of the request)
*/
+ (void) commitVerificationCode:(NSString *)code
phoneNumber:(NSString *)phoneNumber
zone:(NSString *)zone
result:(SMSCommitCodeResultHandler)result;
/**
* @from v2.0.1
* @return SDK版本号(Return the version number of this SDK)
*/
+ (NSString *) sdkVersion;
/**
* @from v1.1.1
* @brief (Get the Area code of the country)
*
* @param result (Results of the request)
*/
+ (void) getCountryZone:(SMSGetZoneResultHandler)result;
@end