### 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.

~IMMRemovableMediaHandler

      public:
      virtual ~IMMRemovableMediaHandler()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

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.

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

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

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

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.

mediaLoaded

      public:
      virtual IMMRemovableMediaHandler& mediaLoaded()

  Called whenever media is loaded into the device.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

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

  -     virtual ~IHandler()

  -     virtual IString asDebugInfo() const

  -     virtual IString asString() const

  -     virtual IHandler& disable()

  -     virtual IHandler& enable(bool enable = true)

  -     virtual IHandler& handleEventsFor(IWindow* window)

  -     IHandler()

  -     bool isEnabled() const

  -     virtual IHandler& stopHandlingEventsFor(IWindow* window)

  IMMDeviceHandler

  -     virtual ~IMMDeviceHandler()

  -     virtual bool cuePoint(const IMMCuePointEvent& event)

  -     virtual bool deviceEvent(const IMMDeviceEvent& event)

  -     virtual IMMDeviceHandler&
          handleEventsFor( IMMDevice* device )

  -     IMMDeviceHandler()

  -     virtual bool
          positionChange( const IMMPositionChangeEvent& event )

  -     virtual IMMDeviceHandler&
          stopHandlingEventsFor( IMMDevice* device )

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IHandler

  -     virtual IEventResult defaultProcedure(IEvent& event)

  -     virtual bool dispatchHandlerEvent(IEvent& event) = 0

#### Inherited Protected Data

  - None