#pragma once
#include <Processes.h>
#include "HandleBuffer.h"
class CCIClassicStub {
public:
CCIClassicStub ();
void Reset (
OSType inMessageType);
void SendMessage ();
CCIHandleBuffer mSendBuffer;
CCIHandleBuffer mReceiveBuffer;
CCIUInt32 GetLastSeqNo () const { return sLastSeqNo; }
private:
void IncrementSeqNo () { sLastSeqNo++; }
static void SendCCacheAE (
Ptr inEventData,
Size inEventDataSize,
CCIUInt32 inEventID,
bool inWait,
Handle& outReply,
AEIdleUPP inIdleProc);
static void MakeAppleEvent (
AppleEvent& outAppleEvent);
static void GetServerAddress (
AEAddressDesc& outServerAddress);
static void SendAEToServer (
AppleEvent& inAppleEvent,
AppleEvent& outReply,
bool inWait,
AEIdleUPP inIdleProc);
static void LaunchYellowServer ();
static bool ServerPSNIsValid ();
static void ExtractReplyMessage (
const AppleEvent& inReplyEvent,
Handle& outReplyMessage);
bool ApplyCCacheDifferences ();
bool ApplyOneCCacheDifference ();
void InitializeDiffs ();
void ResetCCache ();
static ProcessSerialNumber sServerPSN;
static bool sDiffsHaveBeenInitialized;
static CCIUInt32 sLastSeqNo;
static CCIUInt32 sServerID;
OSType mEventID;
friend cc_int32 __CredentialsCacheInternalInitiateSyncWithYellowCache (void);
friend cc_int32 __CredentialsCacheInternalCompleteSyncWithYellowCache (
const AppleEvent* inAppleEvent);
friend cc_int32 __CredentialsCacheInternalSyncWithYellowCache (
AEIdleUPP inIdleProc);
};