]> git.saurik.com Git - apple/security.git/blob - OSX/sec/securityd/Regressions/SOSTransportTestTransports.h
Security-58286.41.2.tar.gz
[apple/security.git] / OSX / sec / securityd / Regressions / SOSTransportTestTransports.h
1 #ifndef SEC_SOSTransportTestTransports_h
2 #define SEC_SOSTransportTestTransports_h
3
4 #import "Security/SecureObjectSync/SOSTransportCircleKVS.h"
5 #import "Security/SecureObjectSync/SOSTransportMessageKVS.h"
6 #import "Security/SecureObjectSync/SOSTransportMessageIDS.h"
7
8 extern CFMutableArrayRef key_transports;
9 extern CFMutableArrayRef circle_transports;
10 extern CFMutableArrayRef message_transports;
11
12 void SOSAccountUpdateTestTransports(SOSAccount* account, CFDictionaryRef gestalt);
13
14 @interface SOSMessageIDSTest : SOSMessageIDS
15
16 @property (nonatomic) CFMutableDictionaryRef changes;
17 @property (nonatomic) CFStringRef accountName;
18
19 -(SOSMessageIDSTest*) initWithAccount:(SOSAccount*)acct andAccountName:(CFStringRef) aN andCircleName:(CFStringRef) cN err:(CFErrorRef *)error;
20 -(CFIndex) SOSTransportMessageGetTransportType;
21 -(CFStringRef) SOSTransportMessageGetCircleName;
22 -(CFTypeRef) SOSTransportMessageGetEngine;
23 -(SOSAccount*) SOSTransportMessageGetAccount;
24 void SOSTransportMessageIDSTestSetName(SOSMessageIDSTest* transport, CFStringRef acctName);
25 -(bool) SOSTransportMessageSendMessages:(SOSMessageIDSTest*) transport pm:(CFDictionaryRef) peer_messages err:(CFErrorRef *)error;
26 -(bool) SOSTransportMessageIDSGetIDSDeviceID:(SOSAccount*)acct;
27 -(CFDictionaryRef)CF_RETURNS_RETAINED SOSTransportMessageHandlePeerMessageReturnsHandledCopy:(SOSMessageIDSTest*) transport peerMessages:(CFMutableDictionaryRef)message err:(CFErrorRef *)error;
28 -(HandleIDSMessageReason) SOSTransportMessageIDSHandleMessage:(SOSAccount*)acct m:(CFDictionaryRef) message err:(CFErrorRef *)error;
29
30 @end
31
32 @interface CKKeyParameterTest : CKKeyParameter
33
34 @property (nonatomic) CFMutableDictionaryRef changes;
35 @property (nonatomic) CFStringRef name;
36 @property (nonatomic) CFStringRef circleName;
37 -(id) initWithAccount:(SOSAccount*) acct andName:(CFStringRef) name andCircleName:(CFStringRef) circleName;
38 -(bool) SOSTransportKeyParameterPublishCloudParameters:(CKKeyParameterTest*) transport data:(CFDataRef)newParameters err:(CFErrorRef*) error;
39 -(bool) SOSTransportKeyParameterHandleKeyParameterChanges:(CKKeyParameter*) transport data:(CFDataRef) data err:(CFErrorRef) error;
40
41 @end
42
43 @interface SOSMessageKVSTest : SOSMessageKVS
44 @property (nonatomic) CFMutableDictionaryRef changes;
45 @property (nonatomic) CFStringRef name;
46
47 -(id) initWithAccount:(SOSAccount*) acct andName:(CFStringRef) name andCircleName:(CFStringRef) circleName;
48 -(bool) SOSTransportMessageSendMessages:(SOSMessageKVSTest*) transport pm:(CFDictionaryRef) peer_messages err:(CFErrorRef *)error;
49 -(CFIndex) SOSTransportMessageGetTransportType;
50 -(CFStringRef) SOSTransportMessageGetCircleName;
51 -(CFTypeRef) SOSTransportMessageGetEngine;
52 -(SOSAccount*) SOSTransportMessageGetAccount;
53 @end
54
55 @interface SOSCircleStorageTransportTest : SOSKVSCircleStorageTransport
56 {
57 NSString *accountName;
58 }
59 @property (nonatomic) NSString *accountName;
60
61 -(id) init;
62 -(id) initWithAccount:(SOSAccount*)account andWithAccountName:(CFStringRef)accountName andCircleName:(CFStringRef)circleName;
63
64 bool SOSTransportCircleTestRemovePendingChange(SOSCircleStorageTransportTest* transport, CFStringRef circleName, CFErrorRef *error);
65 CFStringRef SOSTransportCircleTestGetName(SOSCircleStorageTransportTest* transport);
66 bool SOSAccountEnsureFactoryCirclesTest(SOSAccount* a, CFStringRef accountName);
67 SOSAccount* SOSTransportCircleTestGetAccount(SOSCircleStorageTransportTest* transport);
68 void SOSTransportCircleTestClearChanges(SOSCircleStorageTransportTest* transport);
69 void SOSTransportCircleTestSetName(SOSCircleStorageTransportTest* transport, CFStringRef accountName);
70 bool SOSAccountInflateTestTransportsForCircle(SOSAccount* account, CFStringRef circleName, CFStringRef accountName, CFErrorRef *error);
71 -(void) SOSTransportCircleTestAddBulkToChanges:(CFDictionaryRef) updates;
72 -(void) testAddToChanges:(CFStringRef) message_key data:(CFDataRef)message_data;
73 -(CFMutableDictionaryRef) SOSTransportCircleTestGetChanges;
74 @end
75
76 void SOSTransportMessageIDSTestSetName(SOSMessageIDSTest* transport, CFStringRef n);
77 void SOSTransportMessageTestClearChanges(SOSMessageKVSTest* transport);
78
79 void SOSTransportMessageKVSTestSetName(SOSMessageKVSTest* transport, CFStringRef n);
80 CFMutableDictionaryRef SOSTransportMessageKVSTestGetChanges(SOSMessageKVSTest* transport);
81 CFStringRef SOSTransportMessageKVSTestGetName(SOSMessageKVSTest* transport);
82
83 CFStringRef SOSTransportKeyParameterTestGetName(CKKeyParameterTest* transport);
84 CFMutableDictionaryRef SOSTransportKeyParameterTestGetChanges(CKKeyParameterTest* transport);
85 void SOSTransportKeyParameterTestSetName(CKKeyParameterTest* transport, CFStringRef accountName);
86 void SOSTransportKeyParameterTestClearChanges(CKKeyParameterTest* transport);
87 SOSAccount* SOSTransportKeyParameterTestGetAccount(CKKeyParameterTest* transport);
88 SOSAccount* SOSTransportMessageKVSTestGetAccount(SOSMessageKVSTest* transport);
89 void SOSTransportMessageIDSTestClearChanges(SOSMessageIDSTest* transport);
90
91 CFMutableDictionaryRef SOSTransportMessageIDSTestGetChanges(SOSMessageIDSTest* transport);
92 SOSAccount* SOSTransportMessageIDSTestGetAccount(SOSMessageIDSTest* transport);
93 CFStringRef SOSTransportMessageIDSTestGetName(SOSMessageIDSTest* transport);
94 #endif