//
//  Constants.h
//  Macalline
//
//  Created by JianjiYuan on 14-12-1.
//  Copyright (c) 2014年 JianjiYuan. All rights reserved.
//

#ifndef Macalline_Constants_h
#define Macalline_Constants_h

//打印信息
#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define DLog(...)
#endif

#define kIOSVersion7Later  (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000)

//FMDB
#define FMDBQuickCheck(SomeBool) { if (!(SomeBool)) { NSLog(@"Failure on line %d", __LINE__); abort(); } }

//#define DATABASE_PATH [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]stringByAppendingString:@"/TaiZhouTobacco_7s.sqlite"]
//123
//NotificationEndEdit
#define kNotificationEndEdit  @"NotificationEndEdit"

//TextShowInProgress
#define kTextShowInProgress  @"数据加载中"

//RequestFailedMessage
#define kRequestFailedMessage  @"请求数据失败，请稍后重试"

#define kServerAddress  @"ServerAddress"
#define kServerPort     @"ServerPort"

#define kHistoryUserList     @"HistoryUserList"
#define kDictAutoLoginInfo   @"DictAutoLoginInfo"

#define kUserName       @"UserName"
#define kPassword       @"Password"
#define kPasswordMD5    @"PasswordMD5"
#define kAutoLogin      @"AutoLogin"

#define kLocalNotifyShakeEnable         @"LocalNotifyShakeEnable"
#define kLocalNotifySoundEnable         @"LocalNotifySoundEnable"
#define kLocalNotifyRecievedContent     @"LocalNotifyRecievedContent"
#define kAPNFetchPayloadMsg             @"APNFetchPayloadMsg"

#define kShouldReQueryCountInit         @"ShouldReQueryCountInit"
#define kShouldRequestDataWhenBack      @"kShouldRequestDataWhenBack"

#define kClientIdOfApplication          @"ClientIdOfApplication"

#define kBaseURL(interface)  [NSString stringWithFormat:@"http://%@:%@/hxxc/interface/%@.do",[UIApplication getObjectType:String key:kServerAddress], [UIApplication getObjectType:String key:kServerPort], interface]

#define kBaseEXURL(interface)  [NSString stringWithFormat:@"http://%@:%@/hxxc/interfaceEX/%@.do",[UIApplication getObjectType:String key:kServerAddress], [UIApplication getObjectType:String key:kServerPort], interface]

//#define kBaseURL(interface, sessionid)  [NSString stringWithFormat:@"http://%@:%@/hxxc/interface/%@.do;JSESSIONID=%@",[UIApplication getObjectType:String key:kServerAddress], [UIApplication getObjectType:String key:kServerPort], interface, sessionid]

//颜色
#define RGBColor(r, g, b, a)  [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]

#define kCommonTitleColor    RGBColor(18, 104, 9, 1)

#define kCommonTextPrefixColor      RGBColor(255, 255, 0, 1)
#define kCommonTextColor            RGBColor(255, 255, 255, 1)

#define kCommonImageSize     CGSizeMake(1600, 2560)


#define kImageCachePath  [DataMgr pathInCacheDirectory:@"com.hackemist.SDWebImageCache.default"]

#define kDaqufuzerencode         @"10006"
#define kXiaoqufuzerencode         @"10007"
#define kGuanliyuancode     @"10002"

#define kDacuxiaocode         @"12001"
#define kXiaocuxiaocode         @"12002"
#define kDaoshicode     @"12003"
#define kMeichengcode         @"12004"
#define kXiuxiqucode        @"12005"
#define kGuanggaoweicode     @"12006"
#define kBeijingyinyuecode         @"12007"
#define kYingyunwuliaocode         @"12008"

#define kWeishangbaocode         @"13001"
#define kYishangbaocode         @"13002"
#define kWeipingfencode     @"13003"
#define kYipingfencode         @"13004"

#define kWeitijiaocode        @"14001"
#define kWeishenhecode     @"14002"
#define kShenhetongguocode         @"14003"
#define kDaizhenggaicode         @"14004"
#define kYizhenggaicode        @"14005"
#define kZhenggaishenhetongguocode     @"14006"


#endif
