xref: /haiku/src/apps/softwareupdater/constants.h (revision 17683fa9b621a6c87cdbc51ff781c9a0c0fda6f6)
1 /*
2  * Copyright 2017, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Brian Hill <supernova@tycho.email>
7  */
8 #ifndef CONSTANTS_H
9 #define CONSTANTS_H
10 
11 #define kAppSignature "application/x-vnd.haiku-softwareupdater"
12 #define kSettingsFilename "SoftwareUpdater_settings"
13 
14 enum {
15 	ACTION_STEP_INIT = 0,
16 	ACTION_STEP_START,
17 	ACTION_STEP_DOWNLOAD,
18 	ACTION_STEP_APPLY,
19 	ACTION_STEP_COMPLETE,
20 	ACTION_STEP_MAX
21 };
22 
23 enum {
24 	STATE_HEAD = 0,
25 	STATE_DISPLAY_STATUS,
26 	STATE_DISPLAY_PROGRESS,
27 	STATE_GET_CONFIRMATION,
28 	STATE_APPLY_UPDATES,
29 	STATE_FINAL_MESSAGE,
30 	STATE_MAX
31 };
32 
33 enum update_type {
34 	USER_SELECTION_NEEDED = 0,
35 	INVALID_SELECTION,
36 	CANCEL_UPDATE,
37 	UPDATE,
38 	UPDATE_CHECK_ONLY,
39 	FULLSYNC,
40 	UPDATE_TYPE_END
41 };
42 
43 // Message what values
44 static const uint32 kMsgTextUpdate = 'iUPD';
45 static const uint32 kMsgProgressUpdate = 'iPRO';
46 static const uint32 kMsgCancel = 'iCAN';
47 static const uint32 kMsgCancelResponse = 'iCRE';
48 static const uint32 kMsgUpdateConfirmed = 'iCON';
49 static const uint32 kMsgWarningDismissed = 'iWDI';
50 static const uint32 kMsgGetUpdateType = 'iGUP';
51 static const uint32 kMsgNoRepositories = 'iNRE';
52 static const uint32 kMsgRegister = 'iREG';
53 static const uint32 kMsgFinalQuit = 'iFIN';
54 static const uint32 kMsgMoreDetailsToggle = 'iDTO';
55 static const uint32 kMsgWindowFrameChanged = 'iWFC';
56 static const uint32 kMsgSetZoomLimits = 'iSZL';
57 
58 // Message data keys
59 #define kKeyHeader "key_header"
60 #define kKeyDetail "key_detail"
61 #define kKeyPackageName "key_packagename"
62 #define kKeyPackageCount "key_packagecount"
63 #define kKeyPercentage "key_percentage"
64 #define kKeyMessenger "key_messenger"
65 #define kKeyAlertResult "key_alertresult"
66 
67 // Settings keys
68 #define kKeyShowDetails "ShowDetails"
69 #define kKeyWindowFrame "WindowFrame"
70 
71 #endif // CONSTANTS_H
72