Last change
on this file since 339 was 153, checked in by Nicholas Riley, 21 years ago |
Integrates SCPatch and mach_inject; unfinished, buggy.
|
File size:
983 bytes
|
Rev | Line | |
---|
[153] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #include "SCPatchMessenger.h"
|
---|
| 4 | #include "SCPatchCommon.h"
|
---|
| 5 |
|
---|
| 6 | class SCPatchClient : public SCPatchMessenger
|
---|
| 7 | {
|
---|
| 8 | friend mach_error_t SCPatchInit(SCPatchParams *params);
|
---|
| 9 | friend mach_error_t ThreadEntryPoint(SCPatchParams *params);
|
---|
| 10 |
|
---|
| 11 | public:
|
---|
| 12 |
|
---|
| 13 | SCPatchClient(void);
|
---|
| 14 | ~SCPatchClient(void);
|
---|
| 15 |
|
---|
| 16 | static SCPatchClient *GetPatchClientPointer(void) { return sGlobalPatchClientInstance; }
|
---|
| 17 |
|
---|
| 18 | virtual OSErr Initialize(CFStringRef /* clientBundleID */,
|
---|
| 19 | CFStringRef /* controllerBundleID */,
|
---|
| 20 | pid_t /* pid */) { return noErr; }
|
---|
| 21 |
|
---|
| 22 | CFStringRef GetMyBundleID(void) { return mClientBundleID; }
|
---|
| 23 | CFStringRef GetControllerBundleID(void) { return mControllerBundleID; }
|
---|
| 24 |
|
---|
| 25 | protected:
|
---|
| 26 |
|
---|
| 27 | // In your main file, you must allocate a global instance of your
|
---|
| 28 | // SCPatchClient subclass and initialize this pointer to it:
|
---|
| 29 | static SCPatchClient *sGlobalPatchClientInstance;
|
---|
| 30 |
|
---|
| 31 | SCPatchParams mPatchParams;
|
---|
| 32 | CFStringRef mClientBundleID, mControllerBundleID;
|
---|
| 33 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.