IOFWUserObjectExporter.h [plain text]
namespace IOFireWireLib
{
typedef UInt32 UserObjectHandle;
}
#ifdef KERNEL
class IOFWUserObjectExporter : public OSObject
{
OSDeclareDefaultStructors (IOFWUserObjectExporter )
public :
typedef void (*CleanupFunction)( const OSObject * obj );
typedef void (*CleanupFunctionWithExporter)( const OSObject * obj, IOFWUserObjectExporter * );
private :
unsigned fCapacity;
unsigned fObjectCount;
const OSObject ** fObjects;
CleanupFunctionWithExporter * fCleanupFunctions;
IOLock * fLock;
OSObject * fOwner;
public :
static IOFWUserObjectExporter * createWithOwner( OSObject * owner );
bool initWithOwner( OSObject * owner );
virtual bool init();
virtual void free ();
virtual bool serialize ( OSSerialize * s ) const;
IOReturn addObject ( OSObject * obj, CleanupFunction cleanup, IOFireWireLib::UserObjectHandle * outHandle );
void removeObject ( IOFireWireLib::UserObjectHandle handle );
const OSObject * lookupObject ( IOFireWireLib::UserObjectHandle handle ) const;
const OSObject * lookupObjectForType( IOFireWireLib::UserObjectHandle handle, const OSMetaClass * toType ) const;
void removeAllObjects ();
void lock () const;
void unlock () const;
OSObject * getOwner() const;
const IOFireWireLib::UserObjectHandle lookupHandle ( OSObject * object ) const;
private:
OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 0);
OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 1);
OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 2);
OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 3);
OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 4);
OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 5);
OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 6);
OSMetaClassDeclareReservedUnused(IOFWUserObjectExporter, 7);
};
#endif