#pragma once #include "SCPatchMessenger.h" #include "SCPatchCommon.h" class SCPatchClient : public SCPatchMessenger { friend mach_error_t SCPatchInit(SCPatchParams *params); friend mach_error_t ThreadEntryPoint(SCPatchParams *params); public: SCPatchClient(void); ~SCPatchClient(void); static SCPatchClient *GetPatchClientPointer(void) { return sGlobalPatchClientInstance; } virtual OSErr Initialize(CFStringRef /* clientBundleID */, CFStringRef /* controllerBundleID */, pid_t /* pid */) { return noErr; } CFStringRef GetMyBundleID(void) { return mClientBundleID; } CFStringRef GetControllerBundleID(void) { return mControllerBundleID; } protected: // In your main file, you must allocate a global instance of your // SCPatchClient subclass and initialize this pointer to it: static SCPatchClient *sGlobalPatchClientInstance; SCPatchParams mPatchParams; CFStringRef mClientBundleID, mControllerBundleID; };