IOFWUserObjectExporter.h [plain text]
#import "IOFireWireLibPriv.h"
using namespace IOFireWireLib ;
class IOFWUserObjectExporter : public OSObject
{
OSDeclareDefaultStructors (IOFWUserObjectExporter )
public :
typedef void (*CleanupFunction)( const OSObject * obj ) ;
private :
unsigned fCapacity ;
unsigned fObjectCount ;
const OSObject ** fObjects ;
CleanupFunction * fCleanupFunctions ;
IOLock * fLock ;
public :
virtual bool init () ;
virtual void free () ;
virtual bool serialize ( OSSerialize * s ) const ;
IOReturn addObject ( OSObject & obj, CleanupFunction cleanup, UserObjectHandle & outHandle ) ;
void removeObject ( UserObjectHandle handle ) ;
const OSObject * lookupObject ( UserObjectHandle handle ) const ;
void removeAllObjects () ;
inline void lock () const { IOLockLock ( fLock ) ; }
inline void unlock () const { IOLockUnlock ( fLock ) ; }
} ;