This topic has not yet been rated - Rate this topic

4 Protocol Examples

The examples in this section are XML fragments that contain various notifications. The type of notification in each case is identified by the name attribute of the Data element.

[XML]

 
        <Data name="NewMailNotification">
            <Buffer>
                02                  // NotificationType is NewMail
                80                  // Message
                010000000078291F    // New message FolderId
                0100000000783484    // New message MessageId

                22000000            // MessageFlags
                00                  // UnicodeFlag indicates ASCII
                49504D2E4E6F746500  // MessageClass
            </Buffer>
        </Data>

        <Data name="ObjectCreatedNotification">
            <Buffer>
                04                  // NotificationType is ObjectCreated
                00                  // No flags
                0100000000782781    // New object FolderId
                0100000000782780    // Parent FolderId
                0000                // TagCount
            </Buffer>
        </Data>

        <Data name="ObjectCreatedNotification">
            <Buffer>
                04                  // NotificationType is ObjectCreated
                80                  // Message
                0100000000782780    // New message FolderId
                0100000000784172    // New message MessageId

                1F00                // TagCount
                0B001B0E            // Tags
                0300790E
                02010B30
                0300A166
                0300F13F
                40000730
                40000830
                0201F93F
                1E00F83F
                03005940
                0201FB3F
                1E00FA3F
                03005A40
                0201BD67
                0201BE67
                40000967
                1F003510
                1F000010
                02010910
                02011310
                1E00040E
                1E00030E
                1F003700
                1F003D00
                1F001D0E
                0B001F0E
                0300FD3F
                40003900
                4000060E
                0300080E
                0300230E
            </Buffer>
        </Data>

        <Data name="ObjectDeletedNotification">
            <Buffer>
                08                  // NotificationType is ObjectDeleted
                00                  // No flags
                0100000000782780    // FolderId
                010000000078277F    // ParentFolderId
            </Buffer>
        </Data>

        <Data name="ObjectModifiedNotification">
            <Buffer>
                10                  // NotificationType is ObjectModified
                00                  // No flags
                0100000000782780    // FolderId

                0200                // TagCount
                03003866            // Tags
                0B000A36
            </Buffer>
        </Data>

        <Data name="ObjectModifiedNotification">
            <Buffer>
                10                  // NotificationType is ObjectModified
                20                  // U bitmask, unread items changed
                010000000078291F    // FolderId
                0100                // TagCount
                03000336            // Tags
                00000000            // Unread message count
            </Buffer>
        </Data>

        <Data name="ObjectModifiedNotification">
            <Buffer>
                10                  // NotificationType is ObjectModified
                10                  // T bitmask, total items changed
                0100000000782780    // FolderId

                0400                // TagCount
                03000236            // Tags
                0300080E
                0300AF66
                0300B366

                01000000            // TotalMessageCount
            </Buffer>
        </Data>

        <Data name="ObjectModifiedNotification">
            <Buffer>
                10                  // NotificationType is ObjectModified
                30                  // U bitmask, unread items changed
                010000000078291F    // FolderId

                0500                // TagCount
                03000236            // Tags
                03000336
                0300080E
                0300AF66
                0300B366

                04000000            // TotalMessageCount
                03000000            // UnreadMessageCount
            </Buffer>
        </Data>

        <Data name="ObjectMovedNotification">
            <Buffer>
                20                  // NotificationType isObjectMoved
                80                  // Message
                0100000000782781    // Message FolderId
                0100000000784378    // MessageId
                0100000000782780    // OldFolderId
                0100000000784172    // OldMessageId
            </Buffer>
        </Data>

        <Data name="ObjectCopiedNotification">
            <Buffer>
                40                  // NotificationType is ObjectCopied
                80                  // Message
                0100000000782780    // Message FolderId
                0100000000784173    // MessageId
                0100000000782780    // OldMessageId
                0100000000784172    // OldFolderId
            </Buffer>
        </Data>

        <Data name="TableModifiedNotification">
            <Buffer>
                00 01       // NotificationType is TableModified
                01 00       // TableEventType is TableChanged
            </Buffer>
        </Data>

        <Data name="TableModifiedNotification">
            <Buffer>
                00 01       // NotificationType is TableModified
                07 00       // TableEventType is TableRestrictionChanged
            </Buffer>
        </Data>

        <Data name="TableRowAddModifiedNotification">
            <Buffer>
                00 01       // NotificationType is TableModified
                03 00       // TableEventType is TableRowAdded
                01 00 00 02 81 6C EA 9D // TableRowFolderID
                01 00 00 02 81 6C EA 9E // InsertAfterTableRowFolderID

                A3 00 // TableRowDataSize

                // TableRowData
                00          // No errors
                42 00 69 00 6c 00 6c 00
                79 00 20 00 44 00 2e 00
                53 00 2e 00 20 00 50 00
                72 00 6f 00 78 00 79 00 00

                00 7e
                00 00 00 00 00 dc
                a7 40 c8 c0 42 10 1a b4 b9 08 00 2b 2f e1 82 01
                00 00 00 00 00 00 00 2f 4f 3d 46 49 52 53 54 20
                4f 52 47 41 4e 49 5a 41 54 49 4f 4e 2f 4f 55 3d
                45 58 43 48 41 4e 47 45 20 41 44 4d 49 4e 49 53
                54 52 41 54 49 56 45 20 47 52 4f 55 50 20 28 46
                59 44 49 42 4f 48 46 32 33 53 50 44 4c 54 29 2f
                43 4e 3d 52 45 43 49 50 49 45 4e 54 53 2f 43 4e
                3d 44 53 50 52 4f 58 59 00
            </Buffer>
        </Data>

        <Data name="TableRowAddModifiedNotification">
            <Buffer>
                00 C1       // NotificationType is TableModified and the 
                            // S and M flags are set
                03 00       // TableEventType is TableRowAdded
                01 00 00 00 00 78 60 45 // FolderId
                01 00 00 02 81 6C FC 84 // MessageId
                01 00 00 00 // TableRowInstance
                01 00 00 00 00 78 60 45 // InsertAfterTableRowFolderId
                01 00 00 02 81 6C FC 82 // InsertAfterTableRowID
                01 00 00 00 // InsertAfterTableRowInstance

                A3 00 // TableRowDataSize

                // TableRowData
                00          // No errors
                42 00 69 00 6c 00 6c 00
                79 00 20 00 44 00 2e 00
                53 00 2e 00 20 00 50 00
                72 00 6f 00 78 00 79 00 00

                00 7e
                00 00 00 00 00 dc
                a7 40 c8 c0 42 10 1a b4 b9 08 00 2b 2f e1 82 01
                00 00 00 00 00 00 00 2f 4f 3d 46 49 52 53 54 20
                4f 52 47 41 4e 49 5a 41 54 49 4f 4e 2f 4f 55 3d
                45 58 43 48 41 4e 47 45 20 41 44 4d 49 4e 49 53
                54 52 41 54 49 56 45 20 47 52 4f 55 50 20 28 46
                59 44 49 42 4f 48 46 32 33 53 50 44 4c 54 29 2f
                43 4e 3d 52 45 43 49 50 49 45 4e 54 53 2f 43 4e
                3d 44 53 50 52 4f 58 59 00
            </Buffer>
        </Data>

        <Data name="TableRowAddModifiedNotification">
            <Buffer>
                00 01       // NotificationType is TableModified
                05 00       // TableEventType is TableRowModified
                01 00 00 00 00 78 60 45 // FolderId
                01 00 00 00 00 78 60 50 // InsertAfterTableRowFolderID

                A3 00 // TableRowDataSize

                // TableRowData
                00          // No errors
                42 00 69 00 6c 00 6c 00
                79 00 20 00 44 00 2e 00
                53 00 2e 00 20 00 50 00
                72 00 6f 00 78 00 79 00 00

                00 7e
                00 00 00 00 00 dc
                a7 40 c8 c0 42 10 1a b4 b9 08 00 2b 2f e1 82 01
                00 00 00 00 00 00 00 2f 4f 3d 46 49 52 53 54 20
                4f 52 47 41 4e 49 5a 41 54 49 4f 4e 2f 4f 55 3d
                45 58 43 48 41 4e 47 45 20 41 44 4d 49 4e 49 53
                54 52 41 54 49 56 45 20 47 52 4f 55 50 20 28 46
                59 44 49 42 4f 48 46 32 33 53 50 44 4c 54 29 2f
                43 4e 3d 52 45 43 49 50 49 45 4e 54 53 2f 43 4e
                3d 44 53 50 52 4f 58 59 00
            </Buffer>
        </Data>

        <Data name="TableRowAddModifiedNotification">
            <Buffer>
                00 C1       // NotificationType is TableModified and the 
                            // S and M flags are set
                05 00       // TableEventType is TableRowModified
                01 00 00 00 00 78 60 45 // TableRowFolderID
                01 00 00 02 81 6C FC 83 // TableRowMessageID
                01 00 00 00 // TableRowInstance
                01 00 00 00 00 78 60 46 // InsertAfterTableRowFolderID
                01 00 00 02 81 6C FC 84 // InsertAfterTableRowID
                01 00 00 00 // InsertAfterTableRowInstance

                A3 00 // TableRowDataSize

                // TableRowData
                00          // No errors
                42 00 69 00 6c 00 6c 00
                79 00 20 00 44 00 2e 00
                53 00 2e 00 20 00 50 00
                72 00 6f 00 78 00 79 00 00

                00 7e
                00 00 00 00 00 dc
                a7 40 c8 c0 42 10 1a b4 b9 08 00 2b 2f e1 82 01
                00 00 00 00 00 00 00 2f 4f 3d 46 49 52 53 54 20
                4f 52 47 41 4e 49 5a 41 54 49 4f 4e 2f 4f 55 3d
                45 58 43 48 41 4e 47 45 20 41 44 4d 49 4e 49 53
                54 52 41 54 49 56 45 20 47 52 4f 55 50 20 28 46
                59 44 49 42 4f 48 46 32 33 53 50 44 4c 54 29 2f
                43 4e 3d 52 45 43 49 50 49 45 4e 54 53 2f 43 4e
                3d 44 53 50 52 4f 58 59 00
            </Buffer>
        </Data>

        <Data name="TableRowDeletedModifiedNotification">
            <Buffer>
                00 01       // NotificationType is TableModified
                04 00       // TableEventType is TableRowDeleted
                01 00 00 00 00 78 60 45 // FolderId
            </Buffer>
        </Data>

        <Data name="TableRowDeletedModifiedNotification">
            <Buffer>
                00 C1       // NotificationType is TableModified and the 
                            // S and M flags are set
                04 00       // TableEventType is TableRowDeleted
                01 00 00 02 81 6C EA 96 // TableRowFolderID
                01 00 00 02 81 6D 09 01 // TableRowMessageID
                01 00 00 00 // TableRowInstance
            </Buffer>
        </Data>

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.