Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package team.creatif;
- public class Constants {
- // Configurations
- public static final String DatabaseURL = "jdbc:mysql://localhost:3306/keydriver?useSSL=false&useUnicode=yes&characterEncoding=UTF-8";
- public static final String DatabaseUsername = "root";
- public static final String DatabasePassword = "1234";
- public static final String DateFormat = "yyyy-MM-dd HH:mm:ss";
- //INFO
- public static final double showRadius = 10.1;
- public static final int drivers_distribute_time = 10000;
- // Driver offer request types
- public class DriverTypes {
- static final int WITH_OVERDRAFT = 0;
- static final int WITHOUT_OVERDRAFT = 1;
- }
- public class Methods {
- public static final int REQUEST_TYPE_AUTH = 0;
- public static final int REQUEST_TYPE_GET_INFO = 1;
- public static final int REQUEST_TYPE_GET_CARS = 2;
- public static final int UPDATE_DRIVER_LOCATION = 3;
- public static final int REQUEST_USER_CREATE_ORDER = 4;
- public static final int REQUEST_TYPE_GET_ORDERS = 5;
- public static final int REQUEST_TYPE_GET_ONE_ORDER = 6;
- public static final int REQUEST_TYPE_DRIVER_CLOSE_ORDER = 7;
- public static final int REQUEST_GET_CURRENT_SCENE = 8;
- public static final int REQUEST_UPGRADE_ORDER_PRICE = 9;
- public static final int REQUEST_CANCEL_ORDER = 10;
- public static final int REQUEST_DRIVER_REACHED = 11;
- }
- public class Commands {
- public static final int UNKNOWN = 0;
- public static final int DRIVER_HAS_BEEN_CHANGE_LOCATION = 1;
- public static final int NEW_ORDER = 2;
- public static final int CHANGE_MAIN_SCENE = 8;
- public static final int ORDER_CHANGED = 9;
- public static final int ORDER_REMOVED = 10;
- public static final int DRIVER_CHANGED_LOCATION_FOR_ORDER = 11;
- }
- // ERRORS CODES
- public class Errors {
- public static final int UNKNOWN = 0;
- public static final int INCORRECT_TOKEN = 1;
- public static final int SQL_EXCEPTION = 2;
- public static final int INCORRECT_JSON = 3;
- public static final int INCORRECT_CONFIRM_CODE = 4;
- public static final int SYSTEM_ERROR = 5;
- public static final int USER_HAS_BEEN_LISTEN = 6;
- public static final int DRIVER_HAS_BEEN_LISTEN_ORDERS = 7;
- public static final int ACCESS_DENIED_FOR_DRIVER = 8;
- public static final int NO_SUCH_METHOD = 9;
- }
- // CODES
- public class Codes {
- public static final int ALL_OK = 0;
- }
- public class Scenes {
- /*
- USER SCENES
- 0 - Нет действий
- 1 - Заказал такси
- 2 - Ждет такси
- 3 - Едет в такси
- 4 - Поставить оценку
- */
- public static final int USER_MAIN_SCENE = 0;
- public static final int USER_WAIT_ORDER_PICKUP = 1;
- public static final int USER_WAIT_CAR = 2;
- public static final int USER_IN_CAR = 3;
- public static final int USER_SET_RATE = 4;
- public static final int DRIVER_MOVE_TO_ORDER = 5;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement