]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSAccountTransaction.h
667e53bea5030120c635cba969cf7ccfb0e0e6d1
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSAccountTransaction.h
1 //
2 // SOSAccountTransaction.h
3 // sec
4 //
5 //
6 //
7
8 #ifndef SOSAccountTransaction_h
9 #define SOSAccountTransaction_h
10
11 typedef struct __OpaqueSOSAccountTransaction *SOSAccountTransactionRef;
12
13 #include <CoreFoundation/CoreFoundation.h>
14 #include <Security/SecureObjectSync/SOSAccount.h>
15 #include <CoreFoundation/CFRuntime.h>
16
17 CF_ASSUME_NONNULL_BEGIN
18
19 struct __OpaqueSOSAccountTransaction {
20 CFRuntimeBase _base;
21
22 _Nonnull SOSAccountRef account;
23
24 bool initialInCircle;
25 _Nullable CFSetRef initialViews;
26
27 _Nullable CFSetRef initialUnsyncedViews;
28 _Nullable CFStringRef initialID;
29
30 bool initialTrusted;
31 _Nullable CFDataRef initialKeyParameters;
32
33 _Nullable CFMutableSetRef peersToRequestSync;
34 };
35
36
37 SOSAccountTransactionRef SOSAccountTransactionCreate(SOSAccountRef account);
38 void SOSAccountTransactionFinish(SOSAccountTransactionRef txn);
39 void SOSAccountTransactionFinishAndRestart(SOSAccountTransactionRef txn);
40
41 void SOSAccountTransactionAddSyncRequestForPeerID(SOSAccountTransactionRef txn, CFStringRef peerID);
42 void SOSAccountTransactionAddSyncRequestForAllPeerIDs(SOSAccountTransactionRef txn, CFSetRef /* CFStringRef */ peerIDs);
43
44 CF_ASSUME_NONNULL_END
45
46 #endif /* SOSAccountTransaction_h */