//
//  LMFunc.h
//  TW_LemonSDK
//
//  Created by Jiao Yang on 13-10-16.
//  Copyright (c) 2013年 syt. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface LMFunc : NSObject

typedef enum {
    NETWORK_TYPE_NONE= 0,
    NETWORK_TYPE_WIFI= 1,
    NETWORK_TYPE_3G = 2,
    NETWORK_TYPE_2G = 3,
    NETWORK_TYPE_4G = 4
}NETWORK_TYPE;

//md5算法
+(NSString*)md5sum:(NSString*)strSrc;

//HMAC-SHA1
+ (NSString *)hmac_sha1:(NSString *)key text:(NSString *)text;

//IAP票据格式编码
+ (NSString *)encodeTransaction:(const uint8_t *)input length:(NSInteger)length;

//获取mac地址
+ (NSString *)macaddress;

//判断用户的网络状态
+ (BOOL)networkState;

//返回用户当前的网络环境
//+ (NSString*)currntNetworkType;

+ (int)networkEnvironment;

//判断用户的网络环境
//+(int)networkEnvironment;

//获取用户的IP地址
+ (NSString *)getIPAddress;

+ (NSString *)urlEncode:(NSString *)encodeString;

//获取快速登陆设备号Name
+ (NSString *)getDeviceName;

+(NSString *)getUserAgentString;

+ (BOOL)isJailBreak;

//获取本地plist文件路径
+ (NSString *)getTheNativePlistFilePath:(NSString *)bundelName plistFileName:(NSString *)fileName;

//判断客户端版本是否需要更新
+ (BOOL)determineWhetherToUpdate:(NSString *)serverVersion locationVersion:(NSString *)locationVersion;

+ (void)showWithSvpStatus:(NSString *)status;
@end
