forked from sparkle-project/Sparkle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLVUpdateActivityProtocol.h
40 lines (33 loc) · 1017 Bytes
/
LVUpdateActivityProtocol.h
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
//
// LVUpdateActivityProtocol.h
// Sparkle
//
// Created by Kelly Sutton on 5/13/13.
//
//
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
/*!
@protocol
@abstract Implement this protocol to provide automatic update checking methods to Sparkle.
*/
@protocol LVUpdateActivityProtocol <NSObject>
/*!
@method
@abstract An abstract method to report when the application was last active
@discussion Should return an NSDate object for the last significant user-driven action taken in the app.
*/
- (NSDate *)lastActivity;
/*!
@method
@abstract An abstract method to report how often an update should be run
@discussion Although Sparkle does not trigger the automatic update check, it makes sure to not update if a user action has been taken within the threshold before restarting.
*/
- (NSTimeInterval)updateThreshold;
/**
* If the update fails, report to the delegate
*
* @param error The error returned when update failed.
*/
- (void)updateFailedWithError:(NSError *)error;
@end