| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- //
- // config.h
- // Apex And Drivers
- //
- // Created by Jack on 2018/6/1.
- // Copyright © 2018年 USAI. All rights reserved.
- //
- #ifndef const_h
- #define const_h
- #define DEBUGLOG 1
- #ifdef DEBUGLOG
- #ifdef DEBUG
- // #define DebugLog( s, ... ) fprintf(stderr,"%s\n",[[NSString stringWithFormat:s, ##__VA_ARGS__] UTF8String])//
- #define DebugLog( s, ... ) fprintf(stderr, "<%p %s:(%d)> %s \n", self, [[[NSString stringWithUTF8String:__FILE__] lastPathComponent]UTF8String], __LINE__, [[NSString stringWithFormat:(s), ##__VA_ARGS__]UTF8String] )
- #define blockDebugLog( s, ... ) fprintf(stderr, "<%p %s:(%d)> %s \n",weakself, [[[NSString stringWithUTF8String:__FILE__] lastPathComponent]UTF8String], __LINE__, [[NSString stringWithFormat:(s), ##__VA_ARGS__]UTF8String] )
- #else
- #define DebugLog( s, ... )
- #define blockDebugLog( s, ... )
- #endif
- #else
- #define DebugLog( s, ... )
- #define blockDebugLog( s, ... )
- #endif
- #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
- #define UIColorFromRGBAlpha(rgbValue,alp) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(alp)]
- #define URL_REMOTE 1
- #define URL_LOCAL 0
- #define URL_NONE 2
- #define URL_RESTORE 3
- #define REFRESH_NONE 0
- #define REFRESH_VIEW 1
- #define REFRESH_DATA 2
- // 如何处理commoneditor action 类型调用的返回值
- #define ACTION_SAVE_DATA 0
- #define ACTION_FILL_SECTION 1
- #define RESULT_BARCODE_ERROR -50
- //#define RESULT_NET_NOTAVAILABLE -4
- //#define RESULT_NET_ERROR -3
- //#define RESULT_FALSE 0
- //#define RESULT_VER_LOW -15
- #define MAX_ROW 100
- #define MAX_COLUMN 100
- #define BEHAVIOR_SEARCH 0
- #define BEHAVIOR_RESULT 1
- #define AP_USER_AUTH 1
- #define AP_USER_NOT_AUTH 2
- #define AP_USER_NOT_EXIST 3
- #define AP_SESSION_EXPIRED 4
- #define AP_MESSAGE_NEW 5
- #define AP_MESSAGE_NONE 6
- //const int RESULT_FALSE = 0;
- //#define RESULT_TRUE -1
- //const int RESULT_NET_ERROR = -3;
- //const int RESULT_NET_NOTAVAILABLE = -4;
- //#define RESULT_ERROR -5
- //#define RESULT_LOCALFILE_ERROR -7
- //#define RESULT_USERAUTH_ERROR -9
- //#define RESULT_UPDATE_USERAUTH_ERROR -11
- //#define RESULT_SESSION_EXPIRED -13
- #define RESULT_FALSE 0
- #define RESULT_NO_RESPONSE -1024
- #define RESULT_TRUE 2
- #define RESULT_NO_EMAIL_ADDRESS 3
- #define RESULT_NET_SERVER_ERR -111
- #define RESULT_NET_ERROR -3
- #define RESULT_NET_NOTAVAILABLE -4
- #define RESULT_ERROR -5
- #define RESULT_LOCALFILE_ERROR -7
- #define RESULT_USERAUTH_ERROR -9
- #define RESULT_UPDATE_USERAUTH_ERROR -11
- #define RESULT_SESSION_EXPIRED -13
- #define RESULT_VER_LOW -15
- #define RESULT_BACKEND_CRASH -20
- #define RESULT_RESPONSE_ERROR -30
- #define RESULT_TIMEOUT 99
- #define RESULT_LOGIN_DEVICE -18
- #define RESULT_NO_MODEL 8
- #define JSON_TIMEOUT 60
- #define MSG_NET_NOTAVAILABLE @"No available network, please check your network setting."
- #define MSG_NET_ERROR @"Net Error. Cannot connect to server for now. Please retry later."
- #define MSG_USERAUTH_ERROR @"Username or password is incorrect.Please check."
- #define MSG_VER_LOW @"Current App version is out of date, please update to the latest version."
- #define MSG_ERROR @"Connection failed with Server, please email your IT Admin."//@"Some error occured on server."
- #define MSG_SUCCESS @"Success."
- #define MSG_LOGIN_DEVICE @"You are currently signed in on another device. Please check."
- #define MSG_TIMEOUT @"Request timeout."
- #define MSG_OFFLINE_SUBMIT @"Offline order will be submitted when you login online mode and sync with server."
- #define TITLE_OFFLINE_SUBMIT @"Offline Submit"
- #endif /* config_h */
|