IMMRemovableMediaHandler

The IMMRemovableMediaHandler class is the base handler class for removable devices. This class provides the ability for derived classes to implement their own processing when media is loaded or unloaded from a device. For example, if the user ejects the CD from a CD player, then you might want to gray out the controls of the CD player until the user inserts a new CD.


IMMRemovableMediaHandler - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


[view class]
~IMMRemovableMediaHandler
public:
virtual ~IMMRemovableMediaHandler()

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
IMMRemovableMediaHandler
public:
IMMRemovableMediaHandler()

Creates IMMRemovableMediaHandler objects.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Event Processing

Derived classes must supply these functions to process a pass device event.


[view class]
handleEventsFor
public:
virtual IMMRemovableMediaHandler& handleEventsFor( IMMRemovableMedia* device )

Attaches the handler to the specified IMMDevice object. This is overridden to force attachment of this handler to only one device.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
passDevice
public:
virtual bool passDevice(const IMMPassDeviceEvent& event)

Processes pass device events. It is implemented by derived classes.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
stopHandlingEventsFor
public:
virtual IMMRemovableMediaHandler& stopHandlingEventsFor( IMMRemovableMedia* device )
Stops the handling of events for the device passed.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
dispatchHandlerEvent
protected:
virtual bool dispatchHandlerEvent(IEvent& event)
Dispatches command functions for this handler.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Media Loading

Use these members to provide processing when media is either loaded or unloaded from the device. They are implemented by derived classes.


[view class]
mediaLoaded
public:
virtual IMMRemovableMediaHandler& mediaLoaded()

Called whenever media is loaded into the device.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
mediaUnloaded
public:
virtual IMMRemovableMediaHandler& mediaUnloaded()

Called whenever media is unloaded from the device.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


IMMRemovableMediaHandler - Inherited Member Functions and Data

Inherited Public Functions

IHandler
IMMDeviceHandler

Inherited Public Data

Inherited Protected Functions

IHandler

Inherited Protected Data