pEpUpdater class

works_for_me
Volker Birk 3 years ago
parent 86a093c298
commit 027deb1e65

@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
35380AE7247BD13A004A08A6 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 35380AE6247BD13A004A08A6 /* README.md */; };
35380AEA247C784E004A08A6 /* pEpUpdater.m in Sources */ = {isa = PBXBuildFile; fileRef = 35380AE9247C784E004A08A6 /* pEpUpdater.m */; };
35DC18D8244DA19100FB2002 /* pEpMacOSAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 35DC18D7244DA19100FB2002 /* pEpMacOSAdapter.m */; };
35DC18DA244DA19100FB2002 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 35DC18D9244DA19100FB2002 /* main.m */; };
/* End PBXBuildFile section */
@ -25,6 +26,8 @@
/* Begin PBXFileReference section */
35380AD4247BBB03004A08A6 /* downloadclient.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = downloadclient.xcodeproj; path = ../downloadclient/downloadclient/downloadclient.xcodeproj; sourceTree = "<group>"; };
35380AE6247BD13A004A08A6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
35380AE8247C784E004A08A6 /* pEpUpdater.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = pEpUpdater.h; sourceTree = "<group>"; };
35380AE9247C784E004A08A6 /* pEpUpdater.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = pEpUpdater.m; sourceTree = "<group>"; };
35DC18D2244DA19100FB2002 /* pEpMacOSAdapter.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = pEpMacOSAdapter.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
35DC18D5244DA19100FB2002 /* pEpMacOSAdapterProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = pEpMacOSAdapterProtocol.h; sourceTree = "<group>"; };
35DC18D6244DA19100FB2002 /* pEpMacOSAdapter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = pEpMacOSAdapter.h; sourceTree = "<group>"; };
@ -78,6 +81,8 @@
35DC18D7244DA19100FB2002 /* pEpMacOSAdapter.m */,
35DC18D9244DA19100FB2002 /* main.m */,
35DC18DB244DA19100FB2002 /* Info.plist */,
35380AE8247C784E004A08A6 /* pEpUpdater.h */,
35380AE9247C784E004A08A6 /* pEpUpdater.m */,
);
path = pEpMacOSAdapter;
sourceTree = "<group>";
@ -166,6 +171,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
35380AEA247C784E004A08A6 /* pEpUpdater.m in Sources */,
35DC18DA244DA19100FB2002 /* main.m in Sources */,
35DC18D8244DA19100FB2002 /* pEpMacOSAdapter.m in Sources */,
);

@ -0,0 +1,20 @@
//
// pEpUpdater.h
// pEpMacOSAdapter
//
// Created by Volker Birk on 26.05.20.
// Copyright © 2020 p≡p foundation. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface pEpUpdater : NSObject
-(id)init;
-(void)updateAll:(NSTimer*)timer;
@end
NS_ASSUME_NONNULL_END

@ -0,0 +1,31 @@
//
// pEpUpdater.m
// pEpMacOSAdapter
//
// Created by Volker Birk on 26.05.20.
// Copyright © 2020 pp foundation. All rights reserved.
//
#import "pEpUpdater.h"
@implementation pEpUpdater
const double CYCLE = 7200.0;
-(id)init
{
self = [super init];
if (self) {
[NSTimer scheduledTimerWithTimeInterval:CYCLE target:self selector:@selector(updateAll:) userInfo:nil repeats:YES];
}
return self;
}
-(void)updateAll:(NSTimer*)timer
{
// update all registered products
}
@end
Loading…
Cancel
Save