### IMMNotifyEvent

  The IMMNotifyEvent class is the class for notification events. These events get generated when any device function gets called. This can be powerful for asynchronous processing when you do not want to wait for something to finish. For more information, see IMMDevice::nowait. To get notified of events, you attach an observer to the device, and it sends a notification when a command has finished processing. From this event, you can find out what command was called, from which device it came, the return value of the command that was executed, and, if the command generated an error, what its error number and string are.

### IMMNotifyEvent - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~IMMNotifyEvent

      public:
      virtual ~IMMNotifyEvent()

Supported Platforms

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

IMMNotifyEvent

      public:
      IMMNotifyEvent(const IEvent& event)

  Although you can construct objects of this class, typically IMMDeviceHandler::dispatchHandlerEvent creates objects of this class from an object of the class IEvent or another IMMNotifyEvent object.

Supported Platforms

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

### Command

Use these members to determine what command generated this notification.

command

      public:
      Command command() const

  Returns the command that generated this notification event.

Supported Platforms

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

### Event Information

Use these members to parse the event information into the success state of the command (and, if there is an error, its error code and string) and to access the user parameter.

device

      public:
      IMMDevice* device() const

  Returns a pointer to the device that this event is from.

Supported Platforms

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

errorId

      public:
      unsigned short errorId() const

  Returns the error code from the command if there was one; otherwise, it returns 0.

Supported Platforms

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

errorText

      public:
      static IString errorText(unsigned long errorCode)

  Returns the error text for a given error code. If there was not any error text, then it returns a null IString.

Supported Platforms

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

userParameter

      public:
      unsigned short userParameter() const

  Returns the user parameter that was set at the time of this event. See IMMDevice::setUserParameter for more information.

Supported Platforms

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

### Success Code

Use these members to determine if the command succeeded.

successCode

      public:
      SuccessCode successCode() const

  Returns the success code, which indicates if the command succeeded or failed.

Supported Platforms

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

### IMMNotifyEvent - Enumerations

Command

      enum Command { unknownCommand=0,
                     open=1,
                     close,
                     escape,
                     play,
                     seek,
                     stop,
                     pause,
                     info,
                     getDeviceCapabilities,
                     status,
                     spin,
                     set,
                     step,
                     record,
                     sysInfo,
                     save,
                     cue,
                     update,
                     setCuePoint,
                     setPositionAdvise,
                     setSyncOffset,
                     load,
                     acquireDevice,
                     releaseDevice,
                     masterAudio,
                     getTableOfContents,
                     deviceSettings,
                     connector,
                     resume,
                     connectorInfo,
                     defaultConnection,
                     connection,
                     group,
                     capture=40,
                     freeze,
                     getImageBuffer,
                     getImagePalette,
                     put,
                     realize,
                     rewind,
                     restore,
                     setImageBuffer,
                     setImagePalette,
                     unfreeze,
                     where,
                     windowCommand,
                     deleteCommand,
                     cut,
                     paste,
                     copy,
                     redo,
                     undo,
                     breakCommand,
                     monitor,
                     reserve,
                     setAudioCommand,
                     signal,
                     setVideoCommand,
                     qualityCommand,
                     listCommand,
                     configureCommand }

  Enumeration that specifies the command that this event was generated for.

Supported Platforms

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

SuccessCode

      enum SuccessCode { successful,
                         preempted,
                         aborted,
                         error }

  Enumeration that specifies if the command was successful. The following are valid values:

  successful
    The command was completed successfully.
  preempted
    Another notification request (same type of command) was received.
  aborted
    The command was interrupted and is unable to be completed. For example, the first command was a play with nowait, and a second command, stop, was issued before the play could finish.
  error
    The command caused an error to occur.

Supported Platforms

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

### IMMNotifyEvent - Inherited Member Functions and Data

#### Inherited Public Functions

  IEvent

  -     virtual ~IEvent()

  -     IWindowHandle controlHandle() const

  -     virtual IWindow* controlWindow() const

  -     IEvent& decrementOwnerLevels()

  -     virtual IWindow* dispatchingWindow() const

  -     unsigned long eventId() const

  -     IWindowHandle handle() const

  -     IEvent(const IEvent& event)

  -     IEvent( const IWindowHandle& handle,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent( IWindow* window,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent& operator =(const IEvent& event)

  -     IEventParameter1 parameter1() const

  -     IEventParameter2 parameter2() const

  -     bool passToOwner() const

  -     IEventResult result() const

  -     IEvent& setControlHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingWindow(IWindow* window)

  -     IEvent& setHandle(const IWindowHandle& handle)

  -     IEvent& setNumberOfLevels(int levels = - 1)

  -     IEvent& setPassToOwner(bool passOn = true)

  -     IEvent& setResult(const IEventResult& eventResult)

  -     IEvent& setResult(bool eventResult)

  -     virtual IWindow* window() const

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None