#ifndef _SCPATCHCONTEXT_ #define _SCPATCHCONTEXT_ #ifdef __MWERKS__ #include #include #include #else #include #include #include #endif #include //------------------------------------------------------------------------------------------------------------- class MacPSN { public: ProcessSerialNumber psn; MacPSN(ProcessSerialNumber *inPSN) { psn = *inPSN; } ~MacPSN(void) { }; }; //------------------------------------------------------------------------------------------------------------- bool operator< (const MacPSN& x, const MacPSN& y); bool operator==(const MacPSN& x, const MacPSN& y); //------------------------------------------------------------------------------------------------------------- class SCPatchContext { public: ProcessSerialNumber psn; SInt32 pid; OSType creator; CFStringRef path; CFStringRef name; UInt32 flags; SCPatchContext(ProcessSerialNumber *inPSN, SInt32 inPID, OSType creator); SCPatchContext(const SCPatchContext &); ~SCPatchContext(void) { } }; typedef ProcessSerialNumber SCPatchContextRef; typedef std::multimap::iterator SCPatchContextIterator; typedef std::pair SCPatchContextPair; class SCPatchContextList { private: std::multimap contexts; public: SCPatchContextList(void); ~SCPatchContextList(void); SCPatchContextRef NewContext(ProcessSerialNumber *inPSN, SInt32 inPID, OSType inCreator); SCPatchContext *GetContext(ProcessSerialNumber *inPSN); SCPatchContext *GetContext(OSType inCreator); void DeleteContext(ProcessSerialNumber *inPSN); SCPatchContextIterator begin(void) { return contexts.begin(); } SCPatchContextIterator end(void) { return contexts.end(); } }; #endif