]> git.saurik.com Git - apple/security.git/blob - keychain/SecureObjectSync/SOSAccountTransaction.h
Security-59754.80.3.tar.gz
[apple/security.git] / keychain / SecureObjectSync / SOSAccountTransaction.h
1 //
2 // SOSAccountTransaction.h
3 // sec
4 //
5 //
6 //
7
8 #ifndef SOSAccountTransaction_h
9 #define SOSAccountTransaction_h
10
11 #include <CoreFoundation/CoreFoundation.h>
12 #include "keychain/SecureObjectSync/SOSAccountPriv.h"
13 #include <CoreFoundation/CFRuntime.h>
14
15 NS_ASSUME_NONNULL_BEGIN
16
17 @class SOSAccountTransaction;
18
19 @interface SOSAccount (Transaction)
20
21 + (void)performOnQuietAccountQueue:(void (^)(void))action;
22
23 - (void) performTransaction: (void (^)(SOSAccountTransaction* txn)) action;
24 - (void) performTransaction_Locked: (void (^)(SOSAccountTransaction* txn)) action;
25
26 @end
27
28 @interface SOSAccountTransaction : NSObject
29
30 - (instancetype) init NS_UNAVAILABLE;
31 - (instancetype) initWithAccount: (SOSAccount*) account quiet:(bool)quiet NS_DESIGNATED_INITIALIZER;
32
33 - (void) finish;
34 - (void) restart;
35
36 - (void) requestSyncWith: (NSString*) peerID;
37 - (void) requestSyncWithPeers: (NSSet<NSString*>*) peerList;
38
39 @property SOSAccount *account;
40
41 @property (readonly) NSString* description;
42
43 @end
44
45 NS_ASSUME_NONNULL_END
46
47 #endif /* SOSAccountTransaction_h */