X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/914fc88e61be54aed6b18205ff2775b48793a3b6..866f8763175ff60e4fa455b92b5eb660a12fe6c7:/OSX/sec/SOSCircle/SecureObjectSync/SOSTransportCircleKVS.h diff --git a/OSX/sec/SOSCircle/SecureObjectSync/SOSTransportCircleKVS.h b/OSX/sec/SOSCircle/SecureObjectSync/SOSTransportCircleKVS.h index 1be07825..998bd928 100644 --- a/OSX/sec/SOSCircle/SecureObjectSync/SOSTransportCircleKVS.h +++ b/OSX/sec/SOSCircle/SecureObjectSync/SOSTransportCircleKVS.h @@ -3,25 +3,40 @@ #ifndef sec_SOSTransportCircleKVS_h #define sec_SOSTransportCircleKVS_h -#include +#import "SOSTransportCircle.h" +@class SOSCircleStorageTransport; -typedef struct __OpaqueSOSTransportCircleKVS * SOSTransportCircleKVSRef; +@interface SOSKVSCircleStorageTransport : SOSCircleStorageTransport +{ + NSMutableDictionary *pending_changes; + NSString *circleName; +} -SOSTransportCircleKVSRef SOSTransportCircleKVSCreate(SOSAccountRef account, CFStringRef circleName, CFErrorRef *error); -SOSTransportKeyParameterRef SOSTransportKeyParameterCreateForSubclass(size_t size, SOSAccountRef account, CFErrorRef *error); +@property (retain, nonatomic) NSMutableDictionary *pending_changes; +@property (retain, nonatomic) NSString *circleName; -bool SOSTransportCircleKVSAppendKeyInterest(SOSTransportCircleKVSRef transport, CFMutableArrayRef alwaysKeys, CFMutableArrayRef afterFirstUnlockKeys, CFMutableArrayRef unlockedKeys, CFErrorRef *error); -void SOSTransportCircleKVSAddToPendingChanges(SOSTransportCircleKVSRef transport, CFStringRef message_key, CFDataRef message_data); -bool SOSTransportCircleKVSSendPendingChanges(SOSTransportCircleKVSRef transport, CFErrorRef *error); -bool SOSTransportCircleKVSAppendPeerInfoKeyInterest(SOSTransportCircleKVSRef transport, CFMutableArrayRef alwaysKeys, CFMutableArrayRef afterFirstUnlockKeys, CFMutableArrayRef unlockedKeys, CFErrorRef *error); -bool SOSTransportCircleKVSAppendRingKeyInterest(SOSTransportCircleKVSRef transport, CFMutableArrayRef alwaysKeys, CFMutableArrayRef afterFirstUnlockKeys, CFMutableArrayRef unlockedKeys, CFErrorRef *error); +-(id)init; +-(id)initWithAccount:(SOSAccount*)acct andCircleName:(NSString*)name; +-(NSString*) getCircleName; +-(bool) flushChanges:(CFErrorRef *)error; -bool SOSTransportCircleKVSAppendDebugKeyInterest(SOSTransportCircleKVSRef transport, CFMutableArrayRef alwaysKeys, CFMutableArrayRef afterFirstUnlockKeys, CFMutableArrayRef unlockedKeys, CFErrorRef *error); +-(void)kvsAddToPendingChanges:(CFStringRef) message_key data:(CFDataRef)message_data; +-(bool)kvsSendPendingChanges:(CFErrorRef *)error; -CFArrayRef SOSTransportCircleKVSHandlePeerInfoV2Messages(SOSTransportCircleRef transport, CFMutableDictionaryRef peer_info_message_table, CFErrorRef *error); +-(bool)kvsAppendKeyInterest:(CFMutableArrayRef) alwaysKeys firstUnlock:(CFMutableArrayRef) afterFirstUnlockKeys unlocked:(CFMutableArrayRef)unlockedKeys err:(CFErrorRef *)error; +-(bool)kvsAppendRingKeyInterest:(CFMutableArrayRef) alwaysKeys firstUnlock:(CFMutableArrayRef)afterFirstUnlockKeys unlocked:(CFMutableArrayRef) unlockedKeys err:(CFErrorRef *)error; +-(bool)kvsAppendDebugKeyInterest:(CFMutableArrayRef) alwaysKeys firstUnlock:(CFMutableArrayRef)afterFirstUnlockKeys unlocked:(CFMutableArrayRef) unlockedKeys err:(CFErrorRef *)error; +-(bool)kvsAppendConfigKeyInterest:(CFMutableArrayRef) alwaysKeys firstUnlock:(CFMutableArrayRef)afterFirstUnlockKeys unlocked:(CFMutableArrayRef) unlockedKeys err:(CFErrorRef *)error; +-(bool) kvsRingFlushChanges:(CFErrorRef*) error; +-(bool) kvsRingPostRing:(CFStringRef) ringName ring:(CFDataRef) ring err:(CFErrorRef *)error; +-(bool) kvssendDebugInfo:(CFStringRef) type debug:(CFTypeRef) debugInfo err:(CFErrorRef *)error; +-(bool) kvsSendOfficialDSID:(CFStringRef) dsid err:(CFErrorRef *)error; +-(bool) kvsSendAccountChangedWithDSID:(CFStringRef) dsid err:(CFErrorRef *)error; + +@end; #endif