package history

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message BeginTransfer

md-d2d-history.proto:203

Sent by DD to initiate the conversation history transfer for a given timespan. When receiving this message: 1. If `BeginTransfer` has been received before, close the connection and abort these steps. 2. Lookup the cached requested properties for the given `id`. If none could be found, close the connection and abort these steps. 3. Let `messages` an empty list. Let `size` be `0`. 4. For each remaining message to be sent for the requested timespan: 1. If the media types match this message, send the blob as a `common.BlobData` message and update `size` with the byte size of the media. 2. Append the current message to `messages` and update `size` with the byte size of the message (without media). 3. If `messages` contains 100+ items or `size` is greater 100 MiB, abort the loop. 5. Send a `Data` message with the included `messages`. 6. If there are remaining messages, restart these steps from the beginning. 7. Wait until all buffered data on the connection has been written. Then, close the connection.

Used in: DdToSd

message Data

md-d2d-history.proto:226

One or more messages of the conversation history sent by SD. When receiving this message: 1. Let `blobs` be the previously received set of `common.BlobData` prior to this message. 2. For each message of `messages`: 1. If the message is not in the expected timespan, close the connection and abort these steps. 2. If the message type is unknown or cannot be parsed, discard the message and abort these steps. 3. Store the message. If the message already exists, overwrite it. 4. If the message refers to a Blob ID, lookup the Blob in `blobs`. If the Blob could be found, store it persistently and remove it from `blobs`. 3. Log a warning for each remaining Blob in `blobs` and discard them. 4. If `remaining` is `0`, close the connection and consider the conversation history transfer successfully completed.

Used in: SdToDd

message DdToSd

md-d2d-history.proto:103

Root message envelope for messages from the destination device (DD) to the source device (SD).

message GetSummary

md-d2d-history.proto:147

Sent by DD to get a summary of the conversation history available on SD. When receiving this message: 1. If `BeginTransfer` has been received before, close the connection and abort these steps. 2. If summary data is currently being retrieved for a previous `GetSummary` message, abort that process. 3. If cached properties from a previous `GetSummary` message exist, discard those properties. 4. Filter `media` in the following way: 1. If the special media type _all_ is present, discard any other entries. 2. Remove duplicate entries. 5. Cache the requested properties, including the `id`. 4. Retrieve the summary data for the given timespan and send a `Summary` message with the same `id` back to DD. For outgoing messages, the timespan refers to the time the message was created. For incoming messages, the timespan refers to the time the message was received.

Used in: DdToSd

enum MediaType

md-d2d-history.proto:123

Media type to transfer

Used in: GetSummary

message PastIncomingMessage

md-d2d-history.proto:274

A past incoming message

Used in: PastMessage

message PastMessage

md-d2d-history.proto:235

Contains a past incoming or outgoing message.

Used in: Data

message PastOutgoingMessage

md-d2d-history.proto:258

A past outgoing message

Used in: PastMessage

message Reaction

md-d2d-history.proto:243

A reaction to a message

Used in: PastIncomingMessage, PastOutgoingMessage

enum Reaction.Type

md-d2d-history.proto:248

The reaction type.

Used in: Reaction

message SdToDd

md-d2d-history.proto:113

Root message envelope for messages from the source device (SD) to the destination device (DD).

message Summary

md-d2d-history.proto:169

Summary data for a given timespan as requested by DD. When receiving this message: 1. If `BeginTransfer` has been sent in the meantime, discard this message and abort these steps. 2. If `id` matches the id sent in the most recently sent `GetSummary` message, display the summary data to the user. The user may change the properties (timespan, media types, etc.) which will trigger another `GetSummary` message. When the user commits to the currently selected properties, it sends a `BeginTransfer` message.

Used in: SdToDd