Skip to content
Snippets Groups Projects
Verified Commit f80f3f33 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

feat: improve docs for backlog loading

parent ca59bf43
No related branches found
No related tags found
No related merge requests found
Pipeline #2672 passed
......@@ -125,35 +125,56 @@ interface BacklogManager {
// C->S calls
/**
* Loads backlog for `bufferId`, starting at message `first`, up to `last`
* (plus `additional` more messages after `last`) but at most `limit`
* messages total.
* Loads backlog for [bufferId], where the message id is >= [first] and < [last].
* If [first] or [last] is unset, the list will be unbounded in that direction.
*
* first == -1 && last == -1: highest $limit messages
* last == -1: $msgid in [$first, ∞), highest $limit
* else: $msgid in [$first, $last), highest $limit messages
* If a [limit] is set, the list will be truncated to the newest N messages.
*
* If both [first] and [last] are set, and the list of messages is not truncated by [limit],
* [additional] messages will be loaded before [last].
*/
requestBacklog(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, additional: Int)
/**
* Same as `requestBacklog`, but only messages of a certain message `type`
* with certain `flags` set.
* Loads backlog for [bufferId], where the message id is >= [first] and < [last].
* If [first] or [last] is unset, the list will be unbounded in that direction.
*
* If a [limit] is set, the list will be truncated to the newest N messages.
*
* If both [first] and [last] are set, and the list of messages is not truncated by [limit],
* [additional] messages will be loaded before [last].
*
* Only messages matching [type] and [flags] will be returned and counted.
*/
requestBacklogFiltered(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, additional: Int, type: Int, flags: Int)
/**
* Same as `requestBacklog`, but only messages of a certain message `type`
* with certain `flags` set.
* Loads backlog for [bufferId], where the message id is >= [first] and < [last].
* If [first] or [last] is unset, the list will be unbounded in that direction.
*
* If a [limit] is set, the list will be truncated to the oldest N messages.
*
* first == -1 && last == -1: lowest $limit messages
* last == -1: $msgid in [$first, ∞), lowest $limit
* else: $msgid in [$first, $last), lowest $limit messages
* Only messages matching [type] and [flags] will be returned and counted.
*/
requestBacklogForward(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, type: Int, flags: Int)
/**
* Same as `requestBacklog`, but applied to all buffers.
* Loads backlog for all buffers, where the message id is >= [first] and < [last].
* If [first] or [last] is unset, the list will be unbounded in that direction.
*
* If a [limit] is set, the list will be truncated to the newest N messages.
*
* If both [first] and [last] are set, and the list of messages is not truncated by [limit],
* [additional] messages will be loaded before [last].
*/
requestBacklogAll(first: MsgId, last: MsgId, limit: Int, additional: Int)
/**
* Same as `requestBacklogFiltered`, but applied to all buffers.
* Loads backlog for all buffers, where the message id is >= [first] and < [last].
* If [first] or [last] is unset, the list will be unbounded in that direction.
*
* If a [limit] is set, the list will be truncated to the newest N messages.
*
* If both [first] and [last] are set, and the list of messages is not truncated by [limit],
* [additional] messages will be loaded before [last].
*
* Only messages matching [type] and [flags] will be returned and counted.
*/
requestBacklogAllFiltered(first: MsgId, last: MsgId, limit: Int, additional: Int, type: Int, flags: Int)
......@@ -161,23 +182,28 @@ interface BacklogManager {
// S->C calls
/**
* The response to `requestBacklog`, with the messages encoded as QVariants
* in the `messages` parameter.
* Response to the corresponding [requestBacklog] call.
* [messages] contains the messages as `QVariant<Message>`
*/
receiveBacklog(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, additional: Int, messages: QVariantList)
/**
* The response to `requestBacklogFiltered`, with the messages encoded as
* QVariants in the `messages` parameter.
* Response to the corresponding [requestBacklogFiltered] call.
* [messages] contains the messages as `QVariant<Message>`
*/
receiveBacklogFiltered(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, additional: Int, type: Int, flags: Int, messages: QVariantList)
/**
* The response to `requestBacklogAll`, with the messages encoded as
* QVariants in the `messages` parameter.
* Response to the corresponding [requestBacklogForward] call.
* [messages] contains the messages as `QVariant<Message>`
*/
receiveBacklogForward(bufferId: BufferId, first: MsgId, last: MsgId, limit: Int, type: Int, flags: Int, messages: QVariantList)
/**
* Response to the corresponding [requestBacklogAll] call.
* [messages] contains the messages as `QVariant<Message>`
*/
receiveBacklogAll(first: MsgId, last: MsgId, limit: Int, additional: Int, messages: QVariantList)
/**
* The response to `requestBacklogAllFiltered`, with the messages encoded as
* QVariants in the `messages` parameter.
* Response to the corresponding [requestBacklogAllFiltered] call.
* [messages] contains the messages as `QVariant<Message>`
*/
receiveBacklogAllFiltered(first: MsgId, last: MsgId, limit: Int, additional: Int, type: Int, flags: Int, messages: QVariantList)
}
......@@ -185,8 +211,8 @@ interface BacklogManager {
**Network**
Its network representation is an empty `QVariantMap`, as it has no syncable fields. For the same reason it also does **
not** support the otherwise standard `update` call.
Its network representation is an empty `QVariantMap`, as it has no syncable fields. For the same reason it also does
**not** support the otherwise standard `update` call.
## BufferSyncer
......@@ -900,15 +926,15 @@ interface IrcListHelper {
**Network**
Its network representation is an empty `QVariantMap`, as it has no syncable fields. For the same reason it also does **
not** support the otherwise standard `update` call.
Its network representation is an empty `QVariantMap`, as it has no syncable fields. For the same reason it also does
**not** support the otherwise standard `update` call.
## IrcUser
**ObjectName**
The objectName of an IrcUser is the string representation of the networkId of the network it belongs to, followed by a "
/", followed by the nick of the user.
The objectName of an IrcUser is the string representation of the networkId of the network it belongs to, followed by a
"/", followed by the nick of the user.
Example: `4/justJanne`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment