2 // SOSAccountTransaction.h
8 #ifndef SOSAccountTransaction_h
9 #define SOSAccountTransaction_h
11 #include <CoreFoundation/CoreFoundation.h>
12 #import <Security/SecureObjectSync/SOSAccountPriv.h>
13 #include <CoreFoundation/CFRuntime.h>
15 NS_ASSUME_NONNULL_BEGIN
17 @
class SOSAccountTransaction
;
19 @interface
SOSAccount (Transaction
)
21 + (void)performOnAccountQueue
:(void (^)(void))action
;
22 + (void)performWhileHoldingAccountQueue
:(void (^)(void))action
;
24 - (void) performTransaction
: (void (^)(SOSAccountTransaction
* txn
)) action
;
25 - (void) performTransaction_Locked
: (void (^)(SOSAccountTransaction
* txn
)) action
;
29 @interface SOSAccountTransaction
: NSObject
31 + (instancetype
) transactionWithAccount
: (SOSAccount
*) account
;
33 - (instancetype
) init NS_UNAVAILABLE
;
34 - (instancetype
) initWithAccount
: (SOSAccount
*) account NS_DESIGNATED_INITIALIZER
;
39 - (void) requestSyncWith
: (NSString
*) peerID
;
40 - (void) requestSyncWithPeers
: (NSSet
<NSString
*>*) peerList
;
42 @property SOSAccount
*account
;
44 @
property (readonly
) NSString
* description
;
50 #endif /* SOSAccountTransaction_h */