mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +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
|
@interface NSBackgroundActivityScheduler : NSObject
|
||||||
{
|
{
|
||||||
NSString *_identifier;
|
NSString *_identifier;
|
||||||
NSString *_qualityOfService;
|
NSQualityOfService _qualityOfService;
|
||||||
|
NSTimeInterval _interval;
|
||||||
|
NSTimeInterval _tolerance;
|
||||||
BOOL _repeats;
|
BOOL _repeats;
|
||||||
BOOL _shouldDefer;
|
BOOL _shouldDefer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,54 +28,77 @@
|
||||||
|
|
||||||
- (instancetype) initWithIdentifier: (NSString *)identifier
|
- (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
|
- (NSString *) identifier
|
||||||
{
|
{
|
||||||
|
return _identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setIdentifier: (NSString *)identifier
|
- (void) setIdentifier: (NSString *)identifier
|
||||||
{
|
{
|
||||||
|
ASSIGNCOPY(_identifier, identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSQualityOfService) qualityOfService
|
- (NSQualityOfService) qualityOfService
|
||||||
{
|
{
|
||||||
|
return _qualityOfService;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setQualityOfService: (NSQualityOfService)qualityOfService
|
- (void) setQualityOfService: (NSQualityOfService)qualityOfService
|
||||||
{
|
{
|
||||||
|
_qualityOfService = qualityOfService;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) repeats
|
- (BOOL) repeats
|
||||||
{
|
{
|
||||||
|
return _repeats;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setRepeats: (BOOL)flag
|
- (void) setRepeats: (BOOL)flag
|
||||||
{
|
{
|
||||||
|
_repeats = flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSTimeInterval) interval
|
- (NSTimeInterval) interval
|
||||||
{
|
{
|
||||||
|
return _interval;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setInterval: (NSTimeInterval)interval
|
- (void) setInterval: (NSTimeInterval)interval
|
||||||
{
|
{
|
||||||
|
_interval = interval;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSTimeInterval) tolerance
|
- (NSTimeInterval) tolerance
|
||||||
{
|
{
|
||||||
|
return _tolerance;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setTolerance: (NSTimeInterval)interval
|
- (void) setTolerance: (NSTimeInterval)tolerance
|
||||||
{
|
{
|
||||||
|
_tolerance = tolerance;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) shouldDefer
|
- (BOOL) shouldDefer
|
||||||
{
|
{
|
||||||
|
return _shouldDefer;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setShouldDefer: (BOOL)flag
|
- (void) setShouldDefer: (BOOL)flag
|
||||||
{
|
{
|
||||||
|
_shouldDefer = flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) scheduleWithBlock: (GSScheduledBlock)block
|
- (void) scheduleWithBlock: (GSScheduledBlock)block
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue