#include "ihaveserverhistory.h"
Definition at line 61 of file ihaveserverhistory.h.
◆ DatedFetchResult_t
◆ MessagesSyncMap_t
◆ ~IHaveServerHistory()
virtual LC::Azoth::IHaveServerHistory::~IHaveServerHistory |
( |
| ) |
|
|
inlinevirtual |
◆ FetchServerHistory() [1/2]
◆ FetchServerHistory() [2/2]
virtual void LC::Azoth::IHaveServerHistory::FetchServerHistory |
( |
const QModelIndex & |
contact, |
|
|
const QByteArray & |
startId, |
|
|
int |
count |
|
) |
| |
|
pure virtual |
Fetches the given history with the given contact.
This function should fetch the history with the contact, which is one of the indices of the model returned by GetServerContactsModel(), and emit the serverHistoryFetched() signal after fetching.
A natural ordering is implied on the messages: we say that one message comes before another one if its date is further in the past then other's one.
The history is fetched "around" the message identified by startId. If count is positive, then at most count messages should be fetched before the message specified by startId. Otherwise if count is negative, abs(count)
messages should be fetched after startId.
If startId is empty, then most recent messages should be fetched.
- Parameters
-
[in] | contact | The contact index from the GetServerContactsModel() to fetch history with. |
[in] | startId | The ID of the message around which to fetch messages, or an empty array if most recent messages are wanted. |
[in] | count | The absolute value of count is the number of messages to fetch. If the value is positive, then messages before startId should be fetched, otherwise messages after startId are to be fetched. |
- See also
- serverHistoryFetched()
◆ GetServerContactsModel()
virtual QAbstractItemModel* LC::Azoth::IHaveServerHistory::GetServerContactsModel |
( |
| ) |
const |
|
pure virtual |
◆ GetSortParams()
◆ HasFeature()
◆ OpenServerHistoryConfiguration()
virtual void LC::Azoth::IHaveServerHistory::OpenServerHistoryConfiguration |
( |
| ) |
|
|
pure virtual |
◆ serverHistoryFetched()
virtual void LC::Azoth::IHaveServerHistory::serverHistoryFetched |
( |
const QModelIndex & |
contact, |
|
|
const QByteArray & |
startId, |
|
|
const SrvHistMessages_t & |
messages |
|
) |
| |
|
protectedpure virtual |
Emitted when messages are fetched.
This signal should be emitted when messages with the given contact are fetched as a result of some previous FetchServerHistory() call. The startId parameter corresponds to the same-named parameter of FetchServerHistory(), and messages is a list of messages kept on server (probaly empty).
- Note
- This function is expected to be a signal.
- Parameters
-
[out] | contact | The contact with which the server history is fetched. |
[out] | startId | The ID of the message around which the messages are fetched (see FetchServerHistory() documentation). |
[out] | messages | The list of fetched messages (probably empty). Expected to be sorted in ascending order. |
The documentation for this class was generated from the following file: