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@warpmail.net> 7 */ 8 #ifndef CONSTANTS_H 9 #define CONSTANTS_H 10 11 #define kAppSignature "application/x-vnd.haiku-softwareupdater" 12 13 enum { 14 ACTION_STEP_INIT = 0, 15 ACTION_STEP_START, 16 ACTION_STEP_DOWNLOAD, 17 ACTION_STEP_APPLY, 18 ACTION_STEP_COMPLETE, 19 ACTION_STEP_MAX 20 }; 21 22 enum { 23 STATE_HEAD = 0, 24 STATE_DISPLAY_STATUS, 25 STATE_DISPLAY_PROGRESS, 26 STATE_GET_CONFIRMATION, 27 STATE_APPLY_UPDATES, 28 STATE_FINAL_MESSAGE, 29 STATE_MAX 30 }; 31 32 enum update_type { 33 USER_SELECTION_NEEDED = 0, 34 INVALID_SELECTION, 35 CANCEL_UPDATE, 36 UPDATE, 37 UPDATE_CHECK_ONLY, 38 FULLSYNC, 39 UPDATE_TYPE_END 40 }; 41 42 // Message what values 43 static const uint32 kMsgTextUpdate = 'iUPD'; 44 static const uint32 kMsgProgressUpdate = 'iPRO'; 45 static const uint32 kMsgCancel = 'iCAN'; 46 static const uint32 kMsgCancelResponse = 'iCRE'; 47 static const uint32 kMsgUpdateConfirmed = 'iCON'; 48 static const uint32 kMsgWarningDismissed = 'iWDI'; 49 static const uint32 kMsgGetUpdateType = 'iGUP'; 50 static const uint32 kMsgNoRepositories = 'iNRE'; 51 static const uint32 kMsgRegister = 'iREG'; 52 static const uint32 kMsgFinalQuit = 'iFIN'; 53 static const uint32 kMsgMoreDetailsToggle = 'iDTO'; 54 55 // Message data keys 56 #define kKeyHeader "key_header" 57 #define kKeyDetail "key_detail" 58 #define kKeyPackageName "key_packagename" 59 #define kKeyPackageCount "key_packagecount" 60 #define kKeyPercentage "key_percentage" 61 #define kKeyMessenger "key_messenger" 62 #define kKeyAlertResult "key_alertresult" 63 64 65 #endif // CONSTANTS_H 66