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.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
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.


[view class]
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.


[view class]
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


[view class]
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


[view class]
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


[view class]
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.


[view class]
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


[view class]
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


[view class]
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

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data