]> git.saurik.com Git - apple/security.git/blob - OSX/sec/securityd/Regressions/SOSTransportTestTransports.h
Security-59306.11.20.tar.gz
[apple/security.git] / OSX / sec / securityd / Regressions / SOSTransportTestTransports.h
1 #ifndef SEC_SOSTransportTestTransports_h
2 #define SEC_SOSTransportTestTransports_h
3
4 #import "keychain/SecureObjectSync/SOSTransportCircleKVS.h"
5 #import "keychain/SecureObjectSync/SOSTransportMessageKVS.h"
6
7 extern CFMutableArrayRef key_transports;
8 extern CFMutableArrayRef circle_transports;
9 extern CFMutableArrayRef message_transports;
10
11 void SOSAccountUpdateTestTransports(SOSAccount* account, CFDictionaryRef gestalt);
12
13 @interface CKKeyParameterTest : CKKeyParameter
14
15 @property (nonatomic) CFMutableDictionaryRef changes;
16 @property (nonatomic) CFStringRef name;
17 @property (nonatomic) CFStringRef circleName;
18 -(id) initWithAccount:(SOSAccount*) acct andName:(CFStringRef) name andCircleName:(CFStringRef) circleName;
19 -(bool) SOSTransportKeyParameterPublishCloudParameters:(CKKeyParameterTest*) transport data:(CFDataRef)newParameters err:(CFErrorRef*) error;
20 -(bool) SOSTransportKeyParameterHandleKeyParameterChanges:(CKKeyParameter*) transport data:(CFDataRef) data err:(CFErrorRef) error;
21
22 @end
23
24 @interface SOSMessageKVSTest : SOSMessageKVS
25 @property (nonatomic) CFMutableDictionaryRef changes;
26 @property (nonatomic) CFStringRef name;
27
28 -(id) initWithAccount:(SOSAccount*) acct andName:(CFStringRef) name andCircleName:(CFStringRef) circleName;
29 -(bool) SOSTransportMessageSendMessages:(SOSMessageKVSTest*) transport pm:(CFDictionaryRef) peer_messages err:(CFErrorRef *)error;
30 -(CFIndex) SOSTransportMessageGetTransportType;
31 -(CFStringRef) SOSTransportMessageGetCircleName;
32 -(CFTypeRef) SOSTransportMessageGetEngine;
33 -(SOSAccount*) SOSTransportMessageGetAccount;
34 @end
35
36 @interface SOSCircleStorageTransportTest : SOSKVSCircleStorageTransport
37 {
38 NSString *accountName;
39 }
40 @property (nonatomic) NSString *accountName;
41
42 -(id) init;
43 -(id) initWithAccount:(SOSAccount*)account andWithAccountName:(CFStringRef)accountName andCircleName:(CFStringRef)circleName;
44
45 bool SOSTransportCircleTestRemovePendingChange(SOSCircleStorageTransportTest* transport, CFStringRef circleName, CFErrorRef *error);
46 CFStringRef SOSTransportCircleTestGetName(SOSCircleStorageTransportTest* transport);
47 bool SOSAccountEnsureFactoryCirclesTest(SOSAccount* a, CFStringRef accountName);
48 SOSAccount* SOSTransportCircleTestGetAccount(SOSCircleStorageTransportTest* transport);
49 void SOSTransportCircleTestClearChanges(SOSCircleStorageTransportTest* transport);
50 void SOSTransportCircleTestSetName(SOSCircleStorageTransportTest* transport, CFStringRef accountName);
51 bool SOSAccountInflateTestTransportsForCircle(SOSAccount* account, CFStringRef circleName, CFStringRef accountName, CFErrorRef *error);
52 -(void) SOSTransportCircleTestAddBulkToChanges:(CFDictionaryRef) updates;
53 -(void) testAddToChanges:(CFStringRef) message_key data:(CFDataRef)message_data;
54 -(CFMutableDictionaryRef) SOSTransportCircleTestGetChanges;
55 @end
56
57 void SOSTransportMessageTestClearChanges(SOSMessageKVSTest* transport);
58
59 void SOSTransportMessageKVSTestSetName(SOSMessageKVSTest* transport, CFStringRef n);
60 CFMutableDictionaryRef SOSTransportMessageKVSTestGetChanges(SOSMessageKVSTest* transport);
61 CFStringRef SOSTransportMessageKVSTestGetName(SOSMessageKVSTest* transport);
62
63 CFStringRef SOSTransportKeyParameterTestGetName(CKKeyParameterTest* transport);
64 CFMutableDictionaryRef SOSTransportKeyParameterTestGetChanges(CKKeyParameterTest* transport);
65 void SOSTransportKeyParameterTestSetName(CKKeyParameterTest* transport, CFStringRef accountName);
66 void SOSTransportKeyParameterTestClearChanges(CKKeyParameterTest* transport);
67 SOSAccount* SOSTransportKeyParameterTestGetAccount(CKKeyParameterTest* transport);
68 SOSAccount* SOSTransportMessageKVSTestGetAccount(SOSMessageKVSTest* transport);
69 #endif