session-ios/Signal/src/util/Operation.h
Frederic Jacobs c6d44e59e2 TextSecureKit Refactoring
- Using same clang format file for old and new files.
- Moving out all TextSecure code to allow other clients (OS X, iOS) to
  integrate easily TextSecure functionality.
- Use TextSecure API to signup.
2015-12-22 23:41:10 +01:00

33 lines
681 B
Objective-C

#import <Foundation/Foundation.h>
#import "ArrayUtil.h"
#import "DataUtil.h"
#import "DictionaryUtil.h"
#import "StringUtil.h"
typedef void (^Action)(void);
typedef id (^Function)(void);
@interface Operation : NSObject
@property (nonatomic, readonly, copy) Action callback;
+ (Operation *)operation:(Action)block;
+ (void)asyncRun:(Action)action onThread:(NSThread *)thread;
+ (void)asyncRunAndWaitUntilDone:(Action)action onThread:(NSThread *)thread;
+ (void)asyncRunOnNewThread:(Action)action;
- (void)run;
- (SEL)selectorToRun;
- (void)performOnNewThread;
- (void)performOnThread:(NSThread *)thread;
- (void)performOnThreadAndWaitUntilDone:(NSThread *)thread;
@end