forked from macvim-dev/macvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSPUUserUpdateState.h
More file actions
85 lines (71 loc) · 2 KB
/
SPUUserUpdateState.h
File metadata and controls
85 lines (71 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//
// SPUUserUpdateState.h
// Sparkle
//
// Created by Mayur Pawashe on 2/29/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#ifndef SPUUserUpdateState_h
#define SPUUserUpdateState_h
#import <Foundation/Foundation.h>
#if defined(BUILDING_SPARKLE_SOURCES_EXTERNALLY)
// Ignore incorrect warning
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wquoted-include-in-framework-header"
#import "SUExport.h"
#pragma clang diagnostic pop
#else
#import <Sparkle/SUExport.h>
#endif
NS_ASSUME_NONNULL_BEGIN
/**
A choice made by the user when prompted with a new update.
*/
typedef NS_ENUM(NSInteger, SPUUserUpdateChoice) {
/**
Dismisses the update and skips being notified of it in the future.
*/
SPUUserUpdateChoiceSkip,
/**
Downloads (if needed) and installs the update.
*/
SPUUserUpdateChoiceInstall,
/**
Dismisses the update until Sparkle reminds the user of it at a later time.
*/
SPUUserUpdateChoiceDismiss,
};
/**
Describes the current stage an update is undergoing.
*/
typedef NS_ENUM(NSInteger, SPUUserUpdateStage) {
/**
The update has not been downloaded.
*/
SPUUserUpdateStageNotDownloaded,
/**
The update has already been downloaded but not begun installing.
*/
SPUUserUpdateStageDownloaded,
/**
The update has already been downloaded and began installing in the background.
*/
SPUUserUpdateStageInstalling
};
/**
This represents the user's current update state.
*/
SU_EXPORT NS_SWIFT_SENDABLE @interface SPUUserUpdateState : NSObject<NSSecureCoding>
- (instancetype)init NS_UNAVAILABLE;
/**
The current update stage.
This stage indicates if data has been already downloaded or not, or if an update is currently being installed.
*/
@property (nonatomic, readonly) SPUUserUpdateStage stage;
/**
Indicates whether or not the update check was initiated by the user.
*/
@property (nonatomic, readonly) BOOL userInitiated;
@end
NS_ASSUME_NONNULL_END
#endif /* SPUUserUpdateState_h */