mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Skeletal implementation getters and setters
This commit is contained in:
parent
a3fee06e0a
commit
3d6cd160b2
2 changed files with 27 additions and 2 deletions
|
@ -59,7 +59,9 @@ DEFINE_BLOCK_TYPE(GSScheduledBlock, void, NSBackgroundActivityCompletionHandler)
|
|||
@interface NSBackgroundActivityScheduler : NSObject
|
||||
{
|
||||
NSString *_identifier;
|
||||
NSString *_qualityOfService;
|
||||
NSQualityOfService _qualityOfService;
|
||||
NSTimeInterval _interval;
|
||||
NSTimeInterval _tolerance;
|
||||
BOOL _repeats;
|
||||
BOOL _shouldDefer;
|
||||
}
|
||||
|
|
|
@ -28,54 +28,77 @@
|
|||
|
||||
- (instancetype) initWithIdentifier: (NSString *)identifier
|
||||
{
|
||||
self = [super init];
|
||||
if(self != nil)
|
||||
{
|
||||
_identifier = identifier;
|
||||
_qualityOfService = NSQualityOfServiceDefault;
|
||||
_repeats = NO;
|
||||
_interval = 0;
|
||||
_tolerance = 0;
|
||||
_shouldDefer = NO;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *) identifier
|
||||
{
|
||||
return _identifier;
|
||||
}
|
||||
|
||||
- (void) setIdentifier: (NSString *)identifier
|
||||
{
|
||||
ASSIGNCOPY(_identifier, identifier);
|
||||
}
|
||||
|
||||
- (NSQualityOfService) qualityOfService
|
||||
{
|
||||
return _qualityOfService;
|
||||
}
|
||||
|
||||
- (void) setQualityOfService: (NSQualityOfService)qualityOfService
|
||||
{
|
||||
_qualityOfService = qualityOfService;
|
||||
}
|
||||
|
||||
- (BOOL) repeats
|
||||
{
|
||||
return _repeats;
|
||||
}
|
||||
|
||||
- (void) setRepeats: (BOOL)flag
|
||||
{
|
||||
_repeats = flag;
|
||||
}
|
||||
|
||||
- (NSTimeInterval) interval
|
||||
{
|
||||
return _interval;
|
||||
}
|
||||
|
||||
- (void) setInterval: (NSTimeInterval)interval
|
||||
{
|
||||
_interval = interval;
|
||||
}
|
||||
|
||||
- (NSTimeInterval) tolerance
|
||||
{
|
||||
return _tolerance;
|
||||
}
|
||||
|
||||
- (void) setTolerance: (NSTimeInterval)interval
|
||||
- (void) setTolerance: (NSTimeInterval)tolerance
|
||||
{
|
||||
_tolerance = tolerance;
|
||||
}
|
||||
|
||||
- (BOOL) shouldDefer
|
||||
{
|
||||
return _shouldDefer;
|
||||
}
|
||||
|
||||
- (void) setShouldDefer: (BOOL)flag
|
||||
{
|
||||
_shouldDefer = flag;
|
||||
}
|
||||
|
||||
- (void) scheduleWithBlock: (GSScheduledBlock)block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue