IMMDeviceHandler

The IMMDeviceHandler class is the base handler class for IMMDevices and provides behavior common to all devices. IMMDeviceHandler inherits from IHandler. It inherits dispatchHandlerEvent virtual function from IHandler to encapsulate the multimedia interface. This function does four things. First, it determines what message has been received and converts it into the appropriate event. Second, it determines which device the event is for. Third, it calls the virtual function for the event. Fourth, it goes through the list of added IObservers for the device and calls the IObserver::dispatchNotificationEvent with the event.


IMMDeviceHandler - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
IMMDeviceHandler
public:
IMMDeviceHandler()

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Device Attachment

Use these members to attach and detach the handler object to and from a given device.


[view class]
handleEventsFor
public:
virtual IMMDeviceHandler& handleEventsFor( IMMDevice* device )

Attaches the handler to the specified IMMDevice object.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
stopHandlingEventsFor
public:
virtual IMMDeviceHandler& stopHandlingEventsFor( IMMDevice* device )

Detaches the handler from the specified IMMDevice object.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Event Dispatching

Event-dispatching members evaluate an event to determine if it is appropriate for this handler object to process. If it is, these members call the virtual function used to process the event.


[view class]
dispatchHandlerEvent
protected:
virtual bool dispatchHandlerEvent(IEvent& event)

This function does four things. First, it determines what message has been received and converts it into the appropriate event. Second, it determines which device the event is for. Third, it calls the virtual function for the event. Fourth, it goes through the list of added IObservers for the device and calls the IObserver::dispatchNotificationEvent with the event.

A given handler should return true if the event should not be dispatched to other handlers. In such cases, a result can be placed in the specified IEvent object.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Event Processing

Derived classes must supply these members to process a device, position change, pass, or cue point event.


[view class]
cuePoint
public:
virtual bool cuePoint(const IMMCuePointEvent& event)

Implemented by derived classes to process cuePoint events.

Supported Platforms

Windows OS/2 AIX
Ignored Yes No


[view class]
deviceEvent
public:
virtual bool deviceEvent(const IMMDeviceEvent& event)

Implemented by derived classes to process device events.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


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

Implemented by derived classes to process pass device events.

Supported Platforms

Windows OS/2 AIX
Ignored Yes No


[view class]
positionChange
public:
virtual bool positionChange( const IMMPositionChangeEvent& event )

Implemented by derived classes to process position change events.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


IMMDeviceHandler - Inherited Member Functions and Data

Inherited Public Functions

IHandler

Inherited Public Data

Inherited Protected Functions

IHandler

Inherited Protected Data