1 /* 2 * Copyright 2018-2020, Andrew Lindesay <apl@lindesay.co.nz>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef HAIKU_DEPOT_CONSTANTS_H 6 #define HAIKU_DEPOT_CONSTANTS_H 7 8 enum { 9 MSG_BULK_LOAD_DONE = 'mmwd', 10 MSG_MAIN_WINDOW_CLOSED = 'mwcl', 11 MSG_PACKAGE_SELECTED = 'pkgs', 12 MSG_PACKAGE_WORKER_BUSY = 'pkwb', 13 MSG_PACKAGE_WORKER_IDLE = 'pkwi', 14 MSG_ADD_VISIBLE_PACKAGES = 'avpk', 15 MSG_UPDATE_SELECTED_PACKAGE = 'uspk', 16 MSG_CLIENT_TOO_OLD = 'oldc', 17 MSG_NETWORK_TRANSPORT_ERROR = 'nett', 18 MSG_SERVER_ERROR = 'svre', 19 MSG_SERVER_DATA_CHANGED = 'svdc', 20 MSG_ALERT_SIMPLE_ERROR = 'nser', 21 MSG_DID_ADD_USER_RATING = 'adur', 22 MSG_DID_UPDATE_USER_RATING = 'upur', 23 MSG_LANGUAGE_SELECTED = 'lngs', 24 MSG_VIEW_LATEST_USER_USAGE_CONDITIONS = 'vluc', 25 MSG_VIEW_USERS_USER_USAGE_CONDITIONS = 'vuuc', 26 MSG_USER_USAGE_CONDITIONS_DATA = 'uucd', 27 MSG_USER_USAGE_CONDITIONS_ERROR = 'uuce', 28 MSG_USER_USAGE_CONDITIONS_NOT_LATEST = 'uucl', 29 MSG_LOG_OUT = 'lgot', 30 }; 31 32 33 #define RATING_MISSING -1.0f 34 #define RATING_MIN 0.0f 35 36 37 #define RGB_COLOR_WHITE (rgb_color) { 255, 255, 255, 255 } 38 39 40 #define HD_ERROR_BASE (B_ERRORS_END + 1) 41 #define HD_NETWORK_INACCESSIBLE (HD_ERROR_BASE + 1) 42 #define HD_CLIENT_TOO_OLD (HD_ERROR_BASE + 2) 43 #define HD_ERR_NOT_MODIFIED (HD_ERROR_BASE + 3) 44 #define HD_ERR_NO_DATA (HD_ERROR_BASE + 4) 45 46 47 #define REPOSITORY_NAME_SYSTEM "system" 48 #define REPOSITORY_NAME_INSTALLED "installed" 49 50 51 #define KEY_ALERT_TEXT "alert_text" 52 #define KEY_ALERT_TITLE "alert_title" 53 #define KEY_WORK_STATUS_TEXT "work_status_text" 54 #define KEY_WORK_STATUS_PROGRESS "work_status_progress" 55 #define KEY_WINDOW_SETTINGS "window_settings" 56 #define KEY_MAIN_SETTINGS "main_settings" 57 58 59 // These constants reference resources in 'HaikuDepot.ref' 60 enum { 61 RSRC_STAR_BLUE = 510, 62 RSRC_STAR_GREY = 520, 63 RSRC_INSTALLED = 530, 64 RSRC_ARROW_LEFT = 540, 65 RSRC_ARROW_RIGHT = 550, 66 }; 67 68 69 enum UserUsageConditionsSelectionMode { 70 LATEST = 1, 71 USER = 2, 72 FIXED = 3 73 // means that the user usage conditions are supplied to the window. 74 }; 75 76 #define LANGUAGE_DEFAULT_CODE "en" 77 #define LANGUAGE_DEFAULT Language(LANGUAGE_DEFAULT_CODE, "English", true) 78 79 80 #define PACKAGE_INFO_MAX_USER_RATINGS 250 81 82 #define STR_MDASH "\xE2\x80\x94" 83 84 #define ALERT_MSG_LOGS_USER_GUIDE "\nInformation about how to view the logs is " \ 85 "available in the HaikuDepot section of the user guide." 86 87 #define CACHE_DIRECTORY_APP "HaikuDepot" 88 89 #endif // HAIKU_DEPOT_CONSTANTS_H