3.1.5.2 Streaming of Per-User Read/Unread Data

When synchronizing the per-user read/unread data for a public folder, the size of the returned data can exceed the maximum amount of data that can be sent in a single ROP. For this reason, RopReadPerUserInformation (section 2.2.1.12) and RopWritePerUserInformation (section 2.2.1.13) are designed to stream the data by means of multiple invocations until all data is received or sent. The client MUST complete the streaming of data for one public folder before commencing streaming operations for another public folder on the same server logon.

RopReadPerUserInformation Streaming

If the HasFinished field of the RopReadPerUserInformation response is set to FALSE, indicating that there is more data to be retrieved for the public folder, the client sends another RopReadPerUserInformation request. The client continues to send RopReadPerUserInformation requests until all data is retrieved from the server.

If multiple requests are necessary to retrieve all of the data, the client MUST specify an updated value in the DataOffset field of the next request so that DataOffset points to the first byte of the next block of data to be returned. The new value is equal to the sum of the value used in the previous RopReadPerUserInformation request and the value of the DataSize field of the previous RopReadPerUserInformation response. In other words, if HasFinished is set to FALSE, DataOffset is set as follows in the next RopReadPerUserInformation request.

DataOffset = DataOffset + DataSize

If multiple requests are necessary to retrieve all of the data, the MaxDataSize field can be set to a different value in each invocation of the ROP. This is completely at the client's discretion.

The per-user read/unread data has been completely retrieved when the HasFinished field of the response is set to TRUE. The client MUST NOT interpret the value of the Data field of the RopReadPerUserInformation response. The client simply provides the value unaltered in a future sequence of invocations of RopWritePerUserInformation.

RopWritePerUserInformation Streaming

The client sends the data as it was received in the RopReadPerUserInformation response. The client continues to send RopWritePerUserInformation requests until all of the data is sent to the server. The client sets HasFinished to TRUE when the last block of data is sent.