]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSTransportMessageIDS.h
Security-57740.51.3.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 kIDSPeerReceivedACK = 4,
13 kIDSPeerAvailability = 6,
14 kIDSPeerAvailabilityDone = 7,
15 kIDSKeychainSyncIDSFragmentation = 8,
16 kIDSPeerUsesACK = 9
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 typedef struct __OpaqueSOSTransportMessageIDS *SOSTransportMessageIDSRef;
32
33 SOSTransportMessageIDSRef SOSTransportMessageIDSCreate(SOSAccountRef account, CFStringRef circleName, CFErrorRef *error);
34
35 HandleIDSMessageReason SOSTransportMessageIDSHandleMessage(SOSAccountRef account, CFDictionaryRef message, CFErrorRef *error);
36
37 bool SOSTransportMessageIDSGetIDSDeviceID(SOSAccountRef account);
38
39 void SOSTransportMessageIDSSetFragmentationPreference(SOSTransportMessageRef transport, CFBooleanRef preference);
40 CFBooleanRef SOSTransportMessageIDSGetFragmentationPreference(SOSTransportMessageRef transport);
41