]>
Commit | Line | Data |
---|---|---|
427c49bc | 1 | /* |
d8f41ccd A |
2 | * Copyright (c) 2012-2014 Apple Inc. All Rights Reserved. |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * This file contains Original Code and/or Modifications of Original Code | |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. Please obtain a copy of the License at | |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | * file. | |
12 | * | |
13 | * The Original Code and all software distributed under the License are | |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
18 | * Please see the License for the specific language governing rights and | |
19 | * limitations under the License. | |
20 | * | |
21 | * @APPLE_LICENSE_HEADER_END@ | |
427c49bc A |
22 | */ |
23 | ||
d8f41ccd | 24 | |
427c49bc A |
25 | /*! |
26 | @header SOSAccount.h | |
27 | The functions provided in SOSCircle.h provide an interface to a | |
28 | secure object syncing circle for a single class | |
29 | */ | |
30 | ||
31 | #ifndef _SOSACCOUNT_H_ | |
32 | #define _SOSACCOUNT_H_ | |
33 | ||
d8f41ccd A |
34 | /* Forward declarations of SOS types. */ |
35 | typedef struct __OpaqueSOSAccount *SOSAccountRef; | |
6b200bc3 | 36 | typedef struct __OpaqueSOSRecoveryKeyBag *SOSRecoveryKeyBagRef; |
d8f41ccd | 37 | |
427c49bc A |
38 | #include <CoreFoundation/CoreFoundation.h> |
39 | ||
fa7225c8 | 40 | #include <Security/SecureObjectSync/SOSAccountTransaction.h> |
5c19dc3a A |
41 | #include <Security/SecureObjectSync/SOSCircle.h> |
42 | #include <Security/SecureObjectSync/SOSFullPeerInfo.h> | |
43 | #include <Security/SecureObjectSync/SOSCloudCircle.h> | |
44 | #include <Security/SecureObjectSync/SOSCloudCircleInternal.h> | |
45 | #include <Security/SecureObjectSync/SOSTransportKeyParameter.h> | |
46 | #include <Security/SecureObjectSync/SOSTransportCircle.h> | |
47 | #include <Security/SecureObjectSync/SOSTransportMessage.h> | |
48 | #include <Security/SecureObjectSync/SOSRing.h> | |
49 | #include <Security/SecureObjectSync/SOSPeerInfoSecurityProperties.h> | |
6b200bc3 | 50 | #include <Security/SecureObjectSync/SOSRecoveryKeyBag.h> |
d8f41ccd | 51 | |
427c49bc A |
52 | #include <dispatch/dispatch.h> |
53 | ||
54 | __BEGIN_DECLS | |
55 | ||
56 | #define RETIREMENT_FINALIZATION_SECONDS (24*60*60) | |
57 | ||
58 | ||
427c49bc | 59 | typedef void (^SOSAccountCircleMembershipChangeBlock)(SOSCircleRef new_circle, |
d8f41ccd A |
60 | CFSetRef added_peers, CFSetRef removed_peers, |
61 | CFSetRef added_applicants, CFSetRef removed_applicants); | |
62 | typedef void (^SOSAccountSyncablePeersBlock)(CFArrayRef trustedPeers, CFArrayRef addedPeers, CFArrayRef removedPeers); | |
e3d460c9 | 63 | typedef bool (^SOSAccountWaitForInitialSyncBlock)(SOSAccountRef account); |
fa7225c8 | 64 | typedef void (^SOSAccountSaveBlock)(CFDataRef flattenedAccount, CFErrorRef flattenFailError); |
427c49bc | 65 | |
427c49bc A |
66 | SOSAccountRef SOSAccountCreate(CFAllocatorRef allocator, |
67 | CFDictionaryRef gestalt, | |
d8f41ccd A |
68 | SOSDataSourceFactoryRef factory); |
69 | SOSAccountRef SOSAccountCreateBasic(CFAllocatorRef allocator, | |
70 | CFDictionaryRef gestalt, | |
71 | SOSDataSourceFactoryRef factory); | |
427c49bc | 72 | |
5c19dc3a A |
73 | |
74 | CFTypeID SOSAccountGetTypeID(void); | |
75 | ||
427c49bc A |
76 | // |
77 | // MARK: Persistent Encode decode | |
78 | // | |
79 | ||
80 | SOSAccountRef SOSAccountCreateFromDER(CFAllocatorRef allocator, SOSDataSourceFactoryRef factory, | |
427c49bc A |
81 | CFErrorRef* error, |
82 | const uint8_t** der_p, const uint8_t *der_end); | |
427c49bc A |
83 | SOSAccountRef SOSAccountCreateFromData(CFAllocatorRef allocator, CFDataRef circleData, |
84 | SOSDataSourceFactoryRef factory, | |
427c49bc A |
85 | CFErrorRef* error); |
86 | ||
87 | size_t SOSAccountGetDEREncodedSize(SOSAccountRef cir, CFErrorRef *error); | |
88 | uint8_t* SOSAccountEncodeToDER(SOSAccountRef cir, CFErrorRef* error, const uint8_t* der, uint8_t* der_end); | |
89 | size_t SOSAccountGetDEREncodedSize_V3(SOSAccountRef cir, CFErrorRef *error); | |
90 | uint8_t* SOSAccountEncodeToDER_V3(SOSAccountRef cir, CFErrorRef* error, const uint8_t* der, uint8_t* der_end); | |
91 | CFDataRef SOSAccountCopyEncodedData(SOSAccountRef circle, CFAllocatorRef allocator, CFErrorRef *error); | |
d8f41ccd A |
92 | // |
93 | //MARK: IDS Device ID | |
5c19dc3a | 94 | CFStringRef SOSAccountCopyDeviceID(SOSAccountRef account, CFErrorRef *error); |
6b200bc3 | 95 | bool SOSAccountSetMyDSID(SOSAccountTransactionRef txn, CFStringRef IDS, CFErrorRef* errror); |
5c19dc3a A |
96 | bool SOSAccountSendIDSTestMessage(SOSAccountRef account, CFStringRef message, CFErrorRef *error); |
97 | bool SOSAccountStartPingTest(SOSAccountRef account, CFStringRef message, CFErrorRef *error); | |
6b200bc3 | 98 | bool SOSAccountRetrieveDeviceIDFromKeychainSyncingOverIDSProxy(SOSAccountRef account, CFErrorRef *error); |
427c49bc A |
99 | |
100 | // | |
101 | // MARK: Credential management | |
102 | // | |
103 | ||
fa7225c8 A |
104 | SecKeyRef SOSAccountGetTrustedPublicCredential(SOSAccountRef account, CFErrorRef* error); |
105 | ||
427c49bc | 106 | SecKeyRef SOSAccountGetPrivateCredential(SOSAccountRef account, CFErrorRef* error); |
5c19dc3a A |
107 | CFDataRef SOSAccountGetCachedPassword(SOSAccountRef account, CFErrorRef* error); |
108 | ||
e0e0d90e A |
109 | void SOSAccountSetParameters(SOSAccountRef account, CFDataRef parameters); |
110 | ||
427c49bc A |
111 | void SOSAccountPurgePrivateCredential(SOSAccountRef account); |
112 | ||
113 | bool SOSAccountTryUserCredentials(SOSAccountRef account, | |
114 | CFStringRef user_account, CFDataRef user_password, | |
115 | CFErrorRef *error); | |
116 | ||
117 | bool SOSAccountAssertUserCredentials(SOSAccountRef account, | |
118 | CFStringRef user_account, CFDataRef user_password, | |
119 | CFErrorRef *error); | |
120 | ||
5c19dc3a A |
121 | bool SOSAccountRetryUserCredentials(SOSAccountRef account); |
122 | void SOSAccountSetUnTrustedUserPublicKey(SOSAccountRef account, SecKeyRef publicKey); | |
123 | ||
124 | bool SOSAccountGenerationSignatureUpdate(SOSAccountRef account, CFErrorRef *error); | |
427c49bc A |
125 | |
126 | // | |
127 | // MARK: Circle management | |
128 | // | |
427c49bc | 129 | |
d8f41ccd A |
130 | bool SOSAccountUpdateCircle(SOSAccountRef account, SOSCircleRef circle, CFErrorRef *error); |
131 | void SOSTransportEachMessage(SOSAccountRef account, CFDictionaryRef updates, CFErrorRef *error); | |
427c49bc A |
132 | |
133 | ||
5c19dc3a | 134 | SOSCCStatus SOSAccountGetCircleStatus(SOSAccountRef account, CFErrorRef* error); |
fa7225c8 | 135 | CFStringRef SOSAccountGetSOSCCStatusString(SOSCCStatus status); |
5c19dc3a | 136 | bool SOSAccountIsInCircle(SOSAccountRef account, CFErrorRef *error); |
fa7225c8 A |
137 | bool SOSAccountJoinCircles(SOSAccountTransactionRef aTxn, CFErrorRef* error); |
138 | bool SOSAccountJoinCirclesAfterRestore(SOSAccountTransactionRef aTxn, CFErrorRef* error); | |
5c19dc3a | 139 | bool SOSAccountLeaveCircle(SOSAccountRef account,CFErrorRef* error); |
e0e0d90e | 140 | bool SOSAccountRemovePeersFromCircle(SOSAccountRef account, CFArrayRef peers, CFErrorRef* error); |
427c49bc A |
141 | bool SOSAccountBail(SOSAccountRef account, uint64_t limit_in_seconds, CFErrorRef* error); |
142 | bool SOSAccountAcceptApplicants(SOSAccountRef account, CFArrayRef applicants, CFErrorRef* error); | |
143 | bool SOSAccountRejectApplicants(SOSAccountRef account, CFArrayRef applicants, CFErrorRef* error); | |
144 | ||
fa7225c8 | 145 | bool SOSAccountResetToOffering(SOSAccountTransactionRef aTxn, CFErrorRef* error); |
427c49bc | 146 | bool SOSAccountResetToEmpty(SOSAccountRef account, CFErrorRef* error); |
d8f41ccd | 147 | bool SOSValidateUserPublic(SOSAccountRef account, CFErrorRef* error); |
427c49bc | 148 | |
5c19dc3a A |
149 | void SOSAccountForEachCirclePeerExceptMe(SOSAccountRef account, void (^action)(SOSPeerInfoRef peer)); |
150 | ||
427c49bc | 151 | CFArrayRef SOSAccountCopyApplicants(SOSAccountRef account, CFErrorRef *error); |
d8f41ccd A |
152 | CFArrayRef SOSAccountCopyGeneration(SOSAccountRef account, CFErrorRef *error); |
153 | CFArrayRef SOSAccountCopyValidPeers(SOSAccountRef account, CFErrorRef *error); | |
5c19dc3a | 154 | CFArrayRef SOSAccountCopyPeersToListenTo(SOSAccountRef account, CFErrorRef *error); |
d8f41ccd A |
155 | CFArrayRef SOSAccountCopyNotValidPeers(SOSAccountRef account, CFErrorRef *error); |
156 | CFArrayRef SOSAccountCopyRetired(SOSAccountRef account, CFErrorRef *error); | |
e0e0d90e | 157 | CFArrayRef SOSAccountCopyViewUnaware(SOSAccountRef account, CFErrorRef *error); |
427c49bc A |
158 | CFArrayRef SOSAccountCopyPeers(SOSAccountRef account, CFErrorRef *error); |
159 | CFArrayRef SOSAccountCopyActivePeers(SOSAccountRef account, CFErrorRef *error); | |
160 | CFArrayRef SOSAccountCopyActiveValidPeers(SOSAccountRef account, CFErrorRef *error); | |
161 | CFArrayRef SOSAccountCopyConcurringPeers(SOSAccountRef account, CFErrorRef *error); | |
162 | ||
5c19dc3a | 163 | SOSFullPeerInfoRef SOSAccountCopyAccountIdentityPeerInfo(SOSAccountRef account, CFAllocatorRef allocator, CFErrorRef* error); |
427c49bc A |
164 | bool SOSAccountIsAccountIdentity(SOSAccountRef account, SOSPeerInfoRef peer_info, CFErrorRef *error); |
165 | ||
166 | enum DepartureReason SOSAccountGetLastDepartureReason(SOSAccountRef account, CFErrorRef* error); | |
167 | ||
fa7225c8 A |
168 | // |
169 | // MARK: iCloud Identity | |
170 | // | |
171 | bool SOSAccountAddiCloudIdentity(SOSAccountRef account, SOSCircleRef circle, SecKeyRef user_key, CFErrorRef *error); | |
172 | bool SOSAccountRemoveIncompleteiCloudIdentities(SOSAccountRef account, SOSCircleRef circle, SecKeyRef privKey, CFErrorRef *error); | |
173 | ||
174 | // | |
175 | // MARK: Save Block | |
176 | // | |
177 | ||
178 | void SOSAccountSetSaveBlock(SOSAccountRef account, SOSAccountSaveBlock saveBlock); | |
179 | void SOSAccountFlattenToSaveBlock(SOSAccountRef account); | |
180 | ||
427c49bc A |
181 | // |
182 | // MARK: Change blocks | |
183 | // | |
184 | void SOSAccountAddChangeBlock(SOSAccountRef a, SOSAccountCircleMembershipChangeBlock changeBlock); | |
185 | void SOSAccountRemoveChangeBlock(SOSAccountRef a, SOSAccountCircleMembershipChangeBlock changeBlock); | |
186 | ||
d8f41ccd A |
187 | void SOSAccountAddSyncablePeerBlock(SOSAccountRef a, |
188 | CFStringRef ds_name, | |
189 | SOSAccountSyncablePeersBlock changeBlock); | |
190 | ||
427c49bc A |
191 | // |
192 | // MARK: Local device gestalt change. | |
193 | // | |
194 | bool SOSAccountUpdateGestalt(SOSAccountRef account, CFDictionaryRef new_gestalt); | |
195 | ||
6b200bc3 A |
196 | CFDictionaryRef SOSAccountCopyGestalt(SOSAccountRef account); |
197 | ||
198 | CFDictionaryRef SOSAccountCopyV2Dictionary(SOSAccountRef account); | |
199 | ||
200 | bool SOSAccountUpdateV2Dictionary(SOSAccountRef account, CFDictionaryRef newV2Dict); | |
201 | ||
822b670c | 202 | bool SOSAccountUpdateFullPeerInfo(SOSAccountRef account, CFSetRef minimumViews, CFSetRef excludedViews); |
5c19dc3a A |
203 | |
204 | SOSViewResultCode SOSAccountUpdateView(SOSAccountRef account, CFStringRef viewname, SOSViewActionCode actionCode, CFErrorRef *error); | |
205 | ||
206 | SOSViewResultCode SOSAccountViewStatus(SOSAccountRef account, CFStringRef viewname, CFErrorRef *error); | |
207 | ||
208 | bool SOSAccountUpdateViewSets(SOSAccountRef account, CFSetRef enabledViews, CFSetRef disabledViews); | |
209 | ||
fa7225c8 A |
210 | void SOSAccountPendEnableViewSet(SOSAccountRef account, CFSetRef enabledViews); |
211 | void SOSAccountPendDisableViewSet(SOSAccountRef account, CFSetRef disabledViews); | |
212 | ||
213 | ||
5c19dc3a A |
214 | SOSSecurityPropertyResultCode SOSAccountUpdateSecurityProperty(SOSAccountRef account, CFStringRef property, SOSSecurityPropertyActionCode actionCode, CFErrorRef *error); |
215 | ||
216 | SOSSecurityPropertyResultCode SOSAccountSecurityPropertyStatus(SOSAccountRef account, CFStringRef property, CFErrorRef *error); | |
217 | ||
218 | ||
d8f41ccd | 219 | bool SOSAccountHandleParametersChange(SOSAccountRef account, CFDataRef updates, CFErrorRef *error); |
427c49bc | 220 | |
6b200bc3 A |
221 | // |
222 | // MARK: Requests for syncing later | |
223 | // | |
224 | bool SOSAccountRequestSyncWithAllPeers(SOSAccountTransactionRef txn, CFErrorRef *error); | |
225 | ||
226 | // | |
227 | // MARK: Outgoing/Sync functions | |
228 | // | |
229 | ||
230 | bool SOSAccountSyncWithKVSPeerWithMessage(SOSAccountTransactionRef txn, CFStringRef peerid, CFDataRef message, CFErrorRef *error); | |
231 | bool SOSAccountClearPeerMessageKey(SOSAccountTransactionRef txn, CFStringRef peerID, CFErrorRef *error); | |
232 | ||
233 | CF_RETURNS_RETAINED CFSetRef SOSAccountProcessSyncWithPeers(SOSAccountTransactionRef txn, CFSetRef /* CFStringRef */ peers, CFSetRef /* CFStringRef */ backupPeers, CFErrorRef *error); | |
fa7225c8 | 234 | |
6b200bc3 | 235 | bool SOSAccountSendIKSPSyncList(SOSAccountRef account, CFErrorRef *error); |
fa7225c8 A |
236 | bool SOSAccountSyncWithKVSUsingIDSID(SOSAccountRef account, CFStringRef deviceID, CFErrorRef *error); |
237 | ||
427c49bc | 238 | |
6b200bc3 A |
239 | // |
240 | // MARK: Cleanup functions | |
241 | // | |
427c49bc A |
242 | bool SOSAccountCleanupAfterPeer(SOSAccountRef account, size_t seconds, SOSCircleRef circle, |
243 | SOSPeerInfoRef cleanupPeer, CFErrorRef* error); | |
244 | ||
245 | bool SOSAccountCleanupRetirementTickets(SOSAccountRef account, size_t seconds, CFErrorRef* error); | |
246 | ||
247 | bool SOSAccountScanForRetired(SOSAccountRef account, SOSCircleRef circle, CFErrorRef *error); | |
248 | ||
249 | SOSCircleRef SOSAccountCloneCircleWithRetirement(SOSAccountRef account, SOSCircleRef starting_circle, CFErrorRef *error); | |
250 | ||
5c19dc3a A |
251 | bool SOSAccountPostDebugScope(SOSAccountRef account, CFTypeRef scope, CFErrorRef *error); |
252 | ||
427c49bc A |
253 | // |
254 | // MARK: Version incompatibility Functions | |
255 | // | |
256 | CFStringRef SOSAccountCopyIncompatibilityInfo(SOSAccountRef account, CFErrorRef* error); | |
257 | ||
258 | // | |
5c19dc3a | 259 | // MARK: Backup functions |
427c49bc A |
260 | // |
261 | ||
e0e0d90e | 262 | bool SOSAccountIsBackupRingEmpty(SOSAccountRef account, CFStringRef viewName); |
fa7225c8 | 263 | bool SOSAccountNewBKSBForView(SOSAccountRef account, CFStringRef viewName, CFErrorRef *error); |
5c19dc3a | 264 | |
fa7225c8 A |
265 | bool SOSAccountSetBackupPublicKey(SOSAccountTransactionRef aTxn, CFDataRef backupKey, CFErrorRef *error); |
266 | bool SOSAccountRemoveBackupPublickey(SOSAccountTransactionRef aTxn, CFErrorRef *error); | |
e0e0d90e | 267 | bool SOSAccountSetBSKBagForAllSlices(SOSAccountRef account, CFDataRef backupSlice, bool setupV0Only, CFErrorRef *error); |
5c19dc3a | 268 | |
e3d460c9 A |
269 | SOSBackupSliceKeyBagRef SOSAccountBackupSliceKeyBagForView(SOSAccountRef account, CFStringRef viewName, CFErrorRef* error); |
270 | ||
fa7225c8 A |
271 | bool SOSAccountIsLastBackupPeer(SOSAccountRef account, CFErrorRef *error); |
272 | ||
6b200bc3 A |
273 | |
274 | // | |
275 | // MARK: Recovery Public Key Functions | |
276 | // | |
277 | bool SOSAccountRegisterRecoveryPublicKey(SOSAccountTransactionRef txn, CFDataRef recovery_key, CFErrorRef *error); | |
278 | CFDataRef SOSAccountCopyRecoveryPublicKey(SOSAccountTransactionRef txn, CFErrorRef *error); | |
279 | bool SOSAccountClearRecoveryPublicKey(SOSAccountTransactionRef txn, CFDataRef recovery_key, CFErrorRef *error); | |
280 | bool SOSAccountSetRecoveryKey(SOSAccountRef account, CFDataRef pubData, CFErrorRef *error); | |
281 | bool SOSAccountRemoveRecoveryKey(SOSAccountRef account, CFErrorRef *error); | |
282 | SOSRecoveryKeyBagRef SOSAccountCopyRecoveryKeyBag(CFAllocatorRef allocator, SOSAccountRef account, CFErrorRef *error); | |
283 | CFDataRef SOSAccountCopyRecoveryPublic(CFAllocatorRef allocator, SOSAccountRef account, CFErrorRef *error); | |
284 | bool SOSAccountRecoveryKeyIsInBackupAndCurrentInView(SOSAccountRef account, CFStringRef viewname); | |
285 | bool SOSAccountSetRecoveryKeyBagEntry(CFAllocatorRef allocator, SOSAccountRef account, SOSRecoveryKeyBagRef rkbg, CFErrorRef *error); | |
286 | SOSRecoveryKeyBagRef SOSAccountCopyRecoveryKeyBagEntry(CFAllocatorRef allocator, SOSAccountRef account, CFErrorRef *error); | |
287 | void SOSAccountEnsureRecoveryRing(SOSAccountRef account); | |
288 | ||
5c19dc3a A |
289 | // |
290 | // MARK: Private functions | |
291 | // | |
427c49bc | 292 | |
d8f41ccd | 293 | dispatch_queue_t SOSAccountGetQueue(SOSAccountRef account); |
427c49bc | 294 | |
d8f41ccd | 295 | typedef bool (^SOSAccountSendBlock)(CFStringRef key, CFDataRef message, CFErrorRef *error); |
427c49bc A |
296 | |
297 | // | |
298 | // MARK: Utility functions | |
299 | // | |
300 | ||
5c19dc3a | 301 | CFStringRef SOSAccountCreateCompactDescription(SOSAccountRef a); |
427c49bc A |
302 | CFStringRef SOSInterestListCopyDescription(CFArrayRef interests); |
303 | ||
5c19dc3a A |
304 | // |
305 | // MARK: View Funcitons | |
306 | // | |
307 | ||
308 | // Use these to tell the engine what views are common to myPeer and other circle peers | |
309 | CFArrayRef SOSCreateActiveViewIntersectionArrayForPeerID(SOSAccountRef account, CFStringRef peerID); | |
310 | CFDictionaryRef SOSViewsCreateActiveViewMatrixDictionary(SOSAccountRef account, SOSCircleRef circle, CFErrorRef *error); | |
311 | ||
5c19dc3a A |
312 | const uint8_t* der_decode_cloud_parameters(CFAllocatorRef allocator, |
313 | CFIndex algorithmID, SecKeyRef* publicKey, | |
314 | CFDataRef *parameters, | |
315 | CFErrorRef* error, | |
316 | const uint8_t* der, const uint8_t* der_end); | |
317 | ||
318 | /* CFSet <-> XPC functions */ | |
319 | CFSetRef CreateCFSetRefFromXPCObject(xpc_object_t xpcSetDER, CFErrorRef* error); | |
320 | xpc_object_t CreateXPCObjectWithCFSetRef(CFSetRef setref, CFErrorRef *error); | |
321 | ||
d8f41ccd | 322 | |
fa7225c8 A |
323 | // |
324 | // MARK: HSA2 Piggyback Support Functions | |
325 | // | |
326 | ||
327 | SOSPeerInfoRef SOSAccountCopyApplication(SOSAccountRef account, CFErrorRef*); | |
328 | CFDataRef SOSAccountCopyCircleJoiningBlob(SOSAccountRef account, SOSPeerInfoRef applicant, CFErrorRef *error); | |
329 | bool SOSAccountJoinWithCircleJoiningBlob(SOSAccountRef account, CFDataRef joiningBlob, CFErrorRef *error); | |
330 | ||
331 | // | |
332 | // MARK: Initial-Sync | |
333 | // | |
334 | bool SOSAccountHasCompletedInitialSync(SOSAccountRef account); | |
335 | CFMutableSetRef SOSAccountCopyUnsyncedInitialViews(SOSAccountRef account); | |
336 | bool SOSAccountHasCompletedRequiredBackupSync(SOSAccountRef account); | |
337 | ||
338 | // | |
339 | // MARK: State Logging | |
340 | // | |
341 | void SOSAccountLogState(SOSAccountRef account); | |
342 | void SOSAccountLogViewState(SOSAccountRef account); | |
343 | ||
344 | // | |
345 | // MARK: Checking other peer views | |
346 | // | |
347 | ||
348 | CFBooleanRef SOSAccountPeersHaveViewsEnabled(SOSAccountRef account, CFArrayRef viewNames, CFErrorRef *error); | |
349 | ||
6b200bc3 A |
350 | void SOSAccountSetTestSerialNumber(SOSAccountRef account, CFStringRef serial); |
351 | ||
352 | ||
353 | // | |
354 | // MARK: Syncing status functions | |
355 | // | |
356 | bool SOSAccountMessageFromPeerIsPending(SOSAccountTransactionRef txn, SOSPeerInfoRef peer, CFErrorRef *error); | |
357 | bool SOSAccountSendToPeerIsPending(SOSAccountTransactionRef txn, SOSPeerInfoRef peer, CFErrorRef *error); | |
358 | ||
427c49bc A |
359 | __END_DECLS |
360 | ||
361 | #endif /* !_SOSACCOUNT_H_ */ |