2.2.1.4.1.2 NotificationData Structure

The NotificationData structure specifies details about the notification. The contents of this structure are as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

NotificationFlags

TableEventType

TableRowFolderID

...

TableRowMessageID

...

TableRowInstance

InsertAfterTableRowFolderID

...

InsertAfterTableRowID

...

InsertAfterTableRowInstance

TableRowDataSize

TableRowData (variable)

...

FolderId

...

MessageId

...

ParentFolderId

...

OldFolderId

...

OldMessageId

...

OldParentFolderId

...

TagCount

Tags (variable)

...

TotalMessageCount

UnreadMessageCount

MessageFlags

UnicodeFlag

MessageClass (variable)

...

NotificationFlags (2 bytes): A combination of an enumeration and flags that describe the type of the notification and the availability of the notification data fields.

The least significant 12 bits of the NotificationFlags field contain the NotificationType enumeration, which defines the type of the notification. The possible values for this enumeration are listed in the following table.

Bit

Meaning

0x0002

The notification is for a NewMail event.

0x0004

The notification is for an ObjectCreated event.

0x0008

The notification is for an ObjectDeleted event.

0x0010

The notification is for an ObjectModified event.

0x0020

The notification is for an ObjectMoved event.

0x0040

The notification is for an ObjectCopied event.

0x0080

The notification is for a SearchCompleted event.

0x0100

The notification is for a TableModified event.

0x0400

This value is reserved. It is not used by the server and MUST be ignored by the client.

The most significant four bits of the NotificationFlags field are flags that specify the availability of the notification data fields.

Bit

Flag

Meaning

0x1000

T

The notification contains information about a change in the total number of messages in a folder triggering the event. If this bit is set, the NotificationType value MUST be 0x0010.

0x2000

U

The notification contains information about a change in the number of unread messages in a folder triggering the event. If this bit is set, the NotificationType value MUST be 0x0010.

0x4000

S

The notification is caused by an event in a search folder. If this bit is set, bit 0x8000 MUST be set.

0x8000

M

The notification is caused by an event on a message.

TableEventType (2 bytes): A subtype of the notification for a TableModified event. This field is available only if the NotificationType value in the NotificationFlags field is 0x0100.

The following table lists the values that are available for event types. For more details, see section 2.2.1.1.1.

Value

Meaning

0x0001

The notification is for TableChanged events.

0x0003

The notification is for TableRowAdded events.

0x0004

The notification is for TableRowDeleted events.

0x0005

The notification is for TableRowModified events.

0x0007

The notification is for TableRestrictionChanged events.

TableRowFolderID (8 bytes): The value of the Folder ID structure, as specified in [MS-OXCDATA] section 2.2.1.1, of the item triggering the notification. This field is available only if the TableEventType field is available and is 0x0003, 0x0004, or 0x0005.

TableRowMessageID (8 bytes): The value of the Message ID structure, as specified in [MS-OXCDATA] section 2.2.1.2, of the item triggering the notification. This field is available only if bit 0x8000 is set in the NotificationFlags field and if the TableEventType field is available and is 0x0003, 0x0004, or 0x0005.

TableRowInstance (4 bytes): An identifier of the instance of the previous row in the table. This field is available only if bit 0x8000 is set in the NotificationFlags field and if the TableEventType field is available and is 0x0003, 0x0004, or 0x0005.

InsertAfterTableRowFolderID (8 bytes): The old value of the Folder ID structure of the item triggering the notification. This field is available only if the TableEventType field is available and is 0x0003 or 0x0005.

InsertAfterTableRowID (8 bytes): The old value of the Message ID structure of the item triggering the notification. This field is available only if bit 0x8000 is set in the NotificationFlags field and if the TableEventType field is available and is 0x0003 or 0x0005.

InsertAfterTableRowInstance (4 bytes): An unsigned 32-bit identifier of the instance of the row where the modified row is inserted. This field is available only if bit 0x8000 is set in the NotificationFlags field and if the TableEventType field is available and is 0x0003 or 0x0005.

TableRowDataSize (2 bytes): An unsigned 16-bit integer that indicates the length of the table row data. This field is available only if the TableEventType field is available and is 0x0003 or 0x0005.

TableRowData (variable): The table row data, which contains a list of property values in a PropertyRow structure, as specified in [MS-OXCDATA] section 2.8, for the row that was added or modified in the table. The property values to be included are determined by a previous RopSetColumns ROP, as specified in [MS-OXCTABL] section 2.2.2.2. This field is available only if the TableEventType field is available and is 0x0003 or 0x0005.

FolderId (8 bytes): The Folder ID structure of the item triggering the event. This field is available only if the NotificationType value in the NotificationFlags field is not 0x0100 or 0x0400.

MessageId (8 bytes): The Message ID structure, as specified in [MS-OXCDATA] section 2.2.1.2, of the item triggering the event. This field is available only if the NotificationType value in the NotificationFlags field is not 0x0100 or 0x0400, and bit 0x8000 is set in the NotificationFlags field.

ParentFolderId (8 bytes): The Folder ID structure of the parent folder of the item triggering the event. This field is available only if the value of the NotificationType in the NotificationFlags field is 0x0004, 0x0008, 0x0020, or 0x0040, and it is sent for either a message in a search folder (both bit 0x4000 and bit 0x8000 are set in the NotificationFlags field) or a folder (both bit 0x4000 and bit 0x8000 are not set in the NotificationFlags field).

OldFolderId (8 bytes): The old Folder ID structure of the item triggering the event. This field is available only if the NotificationType value in the NotificationFlags field is 0x0020 or 0x0040.

OldMessageId (8 bytes): The old Message ID structure of the item triggering the event. This field is available only if the value of the NotificationType in the NotificationFlags field is 0x0020 or 0x0040 and bit 0x8000 is set in the NotificationFlags field.

OldParentFolderId (8 bytes): The old parent Folder ID structure of the item triggering the event. This field is available only if the value of the NotificationType in the NotificationFlags field is 0x0020 or 0x0040 and bit 0x8000 is not set in the NotificationFlags field.

TagCount (2 bytes): An unsigned 16-bit integer that specifies the number of property tags in the Tags field. This field is available only if the value of the NotificationType in the NotificationFlags field is 0x0004 or 0x0010. If the value of the NotificationType in the NotificationFlags field is 0x0010, the value of this field SHOULD<9> be set to 0x0000.

Tags (variable): An array of unsigned 32-bit integers that identifies the IDs of properties that have changed. This field is available only if the TagCount field is available and the value of the TagCount field is not 0x0000 or 0xFFFF.

TotalMessageCount (4 bytes): An unsigned 32-bit integer that specifies the total number of items in the folder triggering this event. This field is available only if bit 0x1000 is set in the NotificationFlags field.

UnreadMessageCount (4 bytes): An unsigned 32-bit integer that specifies the number of unread items in a folder triggering this event. This field is available only if bit 0x2000 is set in the NotificationFlags field.

MessageFlags (4 bytes): An unsigned 32-bit integer that specifies the message flags of new mail that has been received.<10> This field is available only if the value of the NotificationType in the NotificationFlags field is 0x0002. For details, see [MS-OXCMSG] section 2.2.1.6.

UnicodeFlag (1 byte): A value of TRUE (0x01) indicates the value of the MessageClass field is in Unicode; otherwise, FALSE (0x00) indicates the value of the MessageClass is in ASCII. A value of FALSE is returned if the client is working in cached mode, as specified by the ClientMode field in [MS-OXCRPC] section 2.2.2.2.4. This field is available only if the value of the NotificationType field in the NotificationFlags field is 0x0002.

MessageClass (variable): A null-terminated string containing the message class of the new mail. The string is in Unicode if the UnicodeFlag field is set to TRUE (0x01). The string is in ASCII if UnicodeFlag is set to FALSE (0x00). This field is available only if the value of the NotificationType in the NotificationFlags field is 0x0002.