1 #include <CoreFoundation/CoreFoundation.h>
2 #include <Security/SecureObjectSync/SOSTransportBackupPeer.h>
3 #include <utilities/SecCFWrappers.h>
4 #include <AssertMacros.h>
7 CFGiblisWithHashFor(SOSTransportBackupPeer);
9 SOSTransportBackupPeerRef SOSTransportBackupPeerCreate(CFStringRef fileLocation, CFErrorRef *error)
11 SOSTransportBackupPeerRef tpt = (SOSTransportBackupPeerRef)CFTypeAllocateWithSpace(SOSTransportBackupPeer, sizeof(struct __OpaqueSOSTransportBackupPeer) - sizeof(CFRuntimeBase), kCFAllocatorDefault);
12 tpt->fileLocation = CFRetainSafe(fileLocation);
16 static CFStringRef SOSTransportBackupPeerCopyFormatDescription(CFTypeRef aObj, CFDictionaryRef formatOptions){
17 SOSTransportBackupPeerRef t = (SOSTransportBackupPeerRef) aObj;
19 return CFStringCreateWithFormat(NULL, NULL, CFSTR("<SOSTransportBackupPeer@%p\n>"), t);
22 static void SOSTransportBackupPeerDestroy(CFTypeRef aObj){
23 SOSTransportBackupPeerRef transport = (SOSTransportBackupPeerRef) aObj;
24 CFReleaseNull(transport);
27 CFIndex SOSTransportBackupPeerGetTransportType(SOSTransportBackupPeerRef transport, CFErrorRef *error){
31 static CFHashCode SOSTransportBackupPeerHash(CFTypeRef obj){
32 return (intptr_t) obj;
35 static Boolean SOSTransportBackupPeerCompare(CFTypeRef lhs, CFTypeRef rhs){
36 return SOSTransportBackupPeerHash(lhs) == SOSTransportBackupPeerHash(rhs);