![]() |
LeechCraft Azoth 0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
|
#include "ihaveserverhistory.h"
Public Member Functions | |
| virtual | ~IHaveServerHistory () |
| virtual bool | HasFeature (ServerHistoryFeature) const =0 |
| virtual void | OpenServerHistoryConfiguration ()=0 |
| virtual QAbstractItemModel * | GetServerContactsModel () const =0 |
| virtual void | FetchServerHistory (const QModelIndex &contact, const QByteArray &startId, int count)=0 |
| Fetches the given history with the given contact. | |
| virtual DefaultSortParams | GetSortParams () const =0 |
| virtual Util::ContextTask< QList< History::SomeEntryWithMessages > > | FetchServerHistory (const std::optional< QDateTime > &since)=0 |
Protected Member Functions | |
| virtual void | serverHistoryFetched (const QModelIndex &contact, const QByteArray &startId, const SrvHistMessages_t &messages)=0 |
| Emitted when messages are fetched. | |
Definition at line 61 of file ihaveserverhistory.h.
|
inlinevirtual |
Definition at line 64 of file ihaveserverhistory.h.
|
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.
| [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. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
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).
| [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. |