gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Embedded blocks...


From: Gregory Casamento
Subject: Embedded blocks...
Date: Sat, 26 Oct 2019 10:42:35 -0400

Hey Guys,

I am implementing the following class:


DEFINE_BLOCK_TYPE(NSBackgroundActivityCompletionHandler, void, NSBackgroundActivityResult);
DEFINE_BLOCK_TYPE(GSScheduledBlock, void, NSBackgroundActivityCompletionHandler);  

@interface NSBackgroundActivityScheduler : NSObject
{
  NSString *_identifier;
  NSQualityOfService _qualityOfService;
  NSTimeInterval _interval;
  NSTimeInterval _tolerance;
  BOOL _repeats;
  BOOL _shouldDefer;
}
 
- (instancetype) initWithIdentifier: (NSString *)identifier;

- (NSString *) identifier;
- (void) setIdentifier: (NSString *)identifier;

- (NSQualityOfService) qualityOfService;
- (void) setQualityOfService: (NSQualityOfService)qualityOfService;

- (BOOL) repeats;
- (void) setRepeats: (BOOL)flag;

- (NSTimeInterval) interval;
- (void) setInterval: (NSTimeInterval)interval;

- (NSTimeInterval) tolerance;
- (void) setTolerance: (NSTimeInterval)interval;

- (BOOL) shouldDefer;
- (void) setShouldDefer: (BOOL)flag;

- (void) scheduleWithBlock: (GSScheduledBlock)block;

- (void) invalidate;
 
@end

How do I handle the embedded block GSScheduledBlock??  Declaring it this way compiles, but I have no idea how to access the handler which is passed in.

Any clues?  

Thanks, GC

--
Gregory Casamento
GNUstep Lead Developer / OLC, Principal Consultant
http://www.gnustep.org - http://heronsperch.blogspot.com
http://ind.ie/phoenix/



Mailtrack Sender notified by
Mailtrack 10/26/19, 10:39:17 AM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]