| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- //
- // const.h
- // iShop
- //
- // Created by Rui Zhang on 12/14/23.
- //
- #ifndef const_h
- #define const_h
- #pragma mark WINDOW REFRESH
- #define REFRESH_NONE 0
- #define REFRESH_VIEW 1
- #define REFRESH_DATA 2
- #pragma mark INTERFACE RESULT
- #define RESULT_FALSE 0
- #define RESULT_NO_RESPONSE 1
- #define RESULT_TRUE 2
- #define RESULT_NO_EMAIL_ADDRESS 3
- #define RESULT_NET_SERVER_ERR -1
- #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
- #pragma mark CATALOG CELL
- #define CATEGORY_VIEWTYPE_SMALL 0
- #define CATEGORY_VIEWTYPE_LARGE 1
- #define CATEGORY_VIEWTYPE_CUSTOM 2
- #define CATEGORY_VIEWTYPE_LIST 3
- #pragma mark 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 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)]
- #endif /* const_h */
|