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