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 57 // Message data keys 58 #define kKeyHeader "key_header" 59 #define kKeyDetail "key_detail" 60 #define kKeyPackageName "key_packagename" 61 #define kKeyPackageCount "key_packagecount" 62 #define kKeyPercentage "key_percentage" 63 #define kKeyMessenger "key_messenger" 64 #define kKeyAlertResult "key_alertresult" 65 66 // Settings keys 67 #define kKeyShowDetails "ShowDetails" 68 #define kKeyWindowFrame "WindowFrame" 69 70 #endif // CONSTANTS_H 71