|
|
|
@ -12,19 +12,20 @@
|
|
|
|
|
@implementation pEpUpdater
|
|
|
|
|
|
|
|
|
|
const double CYCLE = 7200.0; // 7200 seconds = 2 hours
|
|
|
|
|
NSString* configPath = @"/Library/Application Support/pEp/Updater";
|
|
|
|
|
|
|
|
|
|
-(id)init
|
|
|
|
|
{
|
|
|
|
|
self = [super init];
|
|
|
|
|
|
|
|
|
|
if (self) {
|
|
|
|
|
[NSTimer scheduledTimerWithTimeInterval:CYCLE target:self selector:@selector(updateAll:) userInfo:nil repeats:YES];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_cycle = CYCLE;
|
|
|
|
|
_configPath = @"/Library/Application Support/pEp/Updater";
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-(void)scheduleUpdates
|
|
|
|
|
{
|
|
|
|
|
[NSTimer scheduledTimerWithTimeInterval:CYCLE target:self selector:@selector(updateAll:) userInfo:nil repeats:YES];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-(void)updateAll:(NSTimer*)timer
|
|
|
|
|
{
|
|
|
|
|
// update all registered products
|
|
|
|
|