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 enum { 12 ACTION_STEP_INIT = 0, 13 ACTION_STEP_START, 14 ACTION_STEP_DOWNLOAD, 15 ACTION_STEP_APPLY, 16 ACTION_STEP_COMPLETE, 17 ACTION_STEP_MAX 18 }; 19 20 enum { 21 STATE_HEAD = 0, 22 STATE_DISPLAY_STATUS, 23 STATE_DISPLAY_PROGRESS, 24 STATE_GET_CONFIRMATION, 25 STATE_APPLY_UPDATES, 26 STATE_FINAL_MESSAGE, 27 STATE_MAX 28 }; 29 30 enum update_type { 31 USER_SELECTION_NEEDED = 0, 32 INVALID_SELECTION, 33 CANCEL_UPDATE, 34 UPDATE, 35 UPDATE_CHECK_ONLY, 36 FULLSYNC, 37 FULLSYNC_CHECK_ONLY, 38 UPDATE_TYPE_END 39 } ; 40 41 // Message what values 42 static const uint32 kMsgTextUpdate = 'iUPD'; 43 static const uint32 kMsgProgressUpdate = 'iPRO'; 44 static const uint32 kMsgCancel = 'iCAN'; 45 static const uint32 kMsgCancelResponse = 'iCRE'; 46 static const uint32 kMsgUpdateConfirmed = 'iCON'; 47 static const uint32 kMsgWarningDismissed = 'iWDI'; 48 static const uint32 kMsgNetworkAlert = 'iNAL'; 49 static const uint32 kMsgGetUpdateType = 'iGUP'; 50 static const uint32 kMsgRegister = 'iREG'; 51 static const uint32 kMsgFinalQuit = 'iFIN'; 52 static const uint32 kMsgMoreDetailsOn = 'iDON'; 53 static const uint32 kMsgMoreDetailsOff = 'iDOF'; 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