7 #ifndef SOSEnginePriv_h 
   8 #define SOSEnginePriv_h 
  10 #include <CoreFoundation/CoreFoundation.h> 
  11 #include <CoreFoundation/CFRuntime.h> 
  12 #include <Security/SecureObjectSync/SOSEngine.h> 
  14 /* SOSEngine implementation. */ 
  15 struct __OpaqueSOSEngine 
{ 
  17     SOSDataSourceRef dataSource
; 
  18     CFStringRef myID
;                       // My peerID in the circle 
  19     // We need to address the issues of corrupt keychain items 
  20     SOSManifestRef unreadable
;              // Possibly by having a set of unreadable items, to which we 
  21     // add any corrupted items in the db that have yet to be deleted. 
  22     // This happens if we notce corruption during a (read only) query. 
  23     // We would also perma-subtract unreadable from manifest whenever 
  24     // anyone asked for manifest.  This result would be cached in 
  25     // The manifestCache below, so we just need a key into the cache 
  26     CFDataRef localMinusUnreadableDigest
;   // or a digest (CFDataRef of the right size). 
  28     CFMutableDictionaryRef manifestCache
;       // digest -> ( refcount, manifest ) 
  29     CFMutableDictionaryRef peerMap
;             // peerId -> SOSPeerRef 
  30     CFDictionaryRef viewNameSet2ChangeTracker
;  // CFSetRef of CFStringRef -> SOSChangeTrackerRef 
  31     CFDictionaryRef viewName2ChangeTracker
;     // CFStringRef -> SOSChangeTrackerRef 
  33     CFDateRef lastTraceDate
;                    // Last time we did a CloudKeychainTrace 
  34     CFMutableDictionaryRef coders
; 
  35     bool haveLoadedCoders
; 
  37     bool codersNeedSaving
; 
  39     dispatch_queue_t queue
;                     // Engine queue 
  41     dispatch_source_t save_timer
;               // Engine state save timer 
  42     bool save_timer_pending
;                    // Engine state timer running, read/modify on engine queue 
  44     dispatch_queue_t syncCompleteQueue
;              // Non-retained queue for async notificaion 
  45     SOSEnginePeerInSyncBlock syncCompleteListener
;   // Block to call to notify the listener. 
  48 #endif /* SOSEnginePriv_h */