| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- //
- // common_const.h
- // RA TradeFiling
- //
- // Created by Rui Zhang on 11/18/20.
- //
- #ifndef common_const_h
- #define common_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)]
- // 接口json 的result值
- #define RESULT_LOGIN_ON_OTHER_DEVICE -1
- #define RESULT_NO_RESPONSE -1024
- #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_VER_LOW -15
- //#define RESULT_FALSE 0
- #define RESULT_FALSE 1
- #define RESULT_TRUE 2
- #define RESULT_FAILED_WITH_MESSAGE 9
- #define RESULT_TIMEOUT 99
- // 如何处理commoneditor action 类型调用的返回值
- #define ACTION_SAVE_DATA 0
- #define ACTION_FILL_SECTION 1
- // 如何处理commoneditor 数据加载类型
- #define URL_REMOTE 1
- #define URL_LOCAL 0
- #define URL_NONE 2
- #define URL_RESTORE 3
- #define URL_FILE 4
- // 对应接口状态的部分message
- #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 RA_NOTIFICATION_KICKOUT @"RA_NOTIFICATION_KICKOUT"
- #endif /* common_const_h */
|