xref: /haiku/src/apps/haikudepot/HaikuDepotConstants.h (revision 54624bda43f13312a491fe1c91d22834be3374f5)
1 /*
2  * Copyright 2018, 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_MAIN_WINDOW_CLOSED		= 'mwcl',
10 	MSG_PACKAGE_SELECTED		= 'pkgs',
11 	MSG_PACKAGE_WORKER_BUSY		= 'pkwb',
12 	MSG_PACKAGE_WORKER_IDLE		= 'pkwi',
13 	MSG_ADD_VISIBLE_PACKAGES	= 'avpk',
14 	MSG_UPDATE_SELECTED_PACKAGE	= 'uspk',
15 	MSG_CLIENT_TOO_OLD			= 'oldc',
16 	MSG_NETWORK_TRANSPORT_ERROR	= 'nett',
17 	MSG_SERVER_ERROR			= 'svre',
18 	MSG_SERVER_DATA_CHANGED		= 'svdc',
19 	MSG_ALERT_SIMPLE_ERROR		= 'nser',
20 	MSG_DID_ADD_USER_RATING		= 'adur',
21 	MSG_DID_UPDATE_USER_RATING	= 'upur'
22 };
23 
24 
25 #define RATING_MISSING					-1.0f
26 #define RATING_MIN						0.0f
27 
28 
29 #define HD_ERROR_BASE					(B_ERRORS_END + 1)
30 #define HD_NETWORK_INACCESSIBLE			(HD_ERROR_BASE + 1)
31 #define HD_CLIENT_TOO_OLD				(HD_ERROR_BASE + 2)
32 #define HD_ERR_NOT_MODIFIED				(HD_ERROR_BASE + 3)
33 #define HD_ERR_NO_DATA					(HD_ERROR_BASE + 4)
34 
35 
36 #define REPOSITORY_NAME_SYSTEM			"system"
37 #define REPOSITORY_NAME_INSTALLED		"installed"
38 
39 
40 #define KEY_ALERT_TEXT					"alert_text"
41 #define KEY_ALERT_TITLE					"alert_title"
42 #define KEY_WORK_STATUS_TEXT			"work_status_text"
43 #define KEY_WORK_STATUS_PROGRESS		"work_status_progress"
44 #define KEY_WINDOW_SETTINGS				"window_settings"
45 #define KEY_MAIN_SETTINGS				"main_settings"
46 
47 
48 // These constants reference resources in 'HaikuDepot.ref'
49 enum {
50 	RSRC_STAR_BLUE		= 510,
51 	RSRC_STAR_GREY		= 520,
52 	RSRC_INSTALLED		= 530,
53 	RSRC_ARROW_LEFT		= 540,
54 	RSRC_ARROW_RIGHT	= 550,
55 };
56 
57 #endif // HAIKU_DEPOT_CONSTANTS_H