]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSTransportMessageIDS.h
Security-57740.31.2.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSTransportMessageIDS.h
1 //
2 // SOSTransportMessageIDS.h
3 // sec
4 //
5 //
6 #include <Security/SecureObjectSync/SOSAccount.h>
7
8 typedef enum {
9 kIDSStartPingTestMessage = 1,
10 kIDSEndPingTestMessage= 2,
11 kIDSSendOneMessage = 3,
12 kIDSSyncMessagesRaw = 4,
13 kIDSSyncMessagesCompact = 5,
14 kIDSPeerAvailability = 6,
15 kIDSPeerAvailabilityDone = 7,
16 kIDSKeychainSyncIDSFragmentation = 8
17 } idsOperation;
18
19 //error handling stuff
20
21 typedef enum {
22 kSecIDSErrorNoDeviceID = -1, //default case
23 kSecIDSErrorNotRegistered = -2,
24 kSecIDSErrorFailedToSend=-3,
25 kSecIDSErrorCouldNotFindMatchingAuthToken = -4,
26 kSecIDSErrorDeviceIsLocked = -5,
27 kSecIDSErrorNoPeersAvailable = -6
28
29 } idsError;
30
31
32 extern const CFStringRef kSecIDSErrorDomain;
33 extern const CFStringRef kIDSOperationType;
34 extern const CFStringRef kIDSMessageToSendKey;
35
36 typedef struct __OpaqueSOSTransportMessageIDS *SOSTransportMessageIDSRef;
37
38 SOSTransportMessageIDSRef SOSTransportMessageIDSCreate(SOSAccountRef account, CFStringRef circleName, CFErrorRef *error);
39
40 HandleIDSMessageReason SOSTransportMessageIDSHandleMessage(SOSAccountRef account, CFDictionaryRef message, CFErrorRef *error);
41
42 void SOSTransportMessageIDSGetIDSDeviceID(SOSAccountRef account);
43
44 void SOSTransportMessageIDSSetFragmentationPreference(SOSTransportMessageRef transport, CFBooleanRef preference);
45 CFBooleanRef SOSTransportMessageIDSGetFragmentationPreference(SOSTransportMessageRef transport);
46