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 15enum { 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 24enum { 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 34enum 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 45static const uint32 kMsgTextUpdate = 'iUPD'; 46static const uint32 kMsgProgressUpdate = 'iPRO'; 47static const uint32 kMsgCancel = 'iCAN'; 48static const uint32 kMsgCancelResponse = 'iCRE'; 49static const uint32 kMsgUpdateConfirmed = 'iCON'; 50static const uint32 kMsgWarningDismissed = 'iWDI'; 51static const uint32 kMsgGetUpdateType = 'iGUP'; 52static const uint32 kMsgNoRepositories = 'iNRE'; 53static const uint32 kMsgRegister = 'iREG'; 54static const uint32 kMsgFinalQuit = 'iFIN'; 55static const uint32 kMsgMoreDetailsToggle = 'iDTO'; 56static const uint32 kMsgWindowFrameChanged = 'iWFC'; 57static const uint32 kMsgSetZoomLimits = 'iSZL'; 58static const uint32 kMsgReboot = 'iREB'; 59static 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