LeechCraft Azoth 0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
Loading...
Searching...
No Matches
LC::Azoth::IHistoryPlugin Class Referenceabstract

Interface for plugins storing chat history. More...

#include "ihistoryplugin.h"

Public Member Functions

virtual bool IsHistoryEnabledFor (ICLEntry &entry) const =0
 Whether history is enabled for the given entry.
virtual Util::ContextTask< void > RequestLastMessages (ICLEntry &entry, int count)=0
 Requests last messages for the given entry.
virtual Util::ContextTask< std::optional< QDateTime > > RequestMaxTimestamp (IAccount &acc)=0
virtual void AddMessages (const History::SomeEntryWithMessages &)=0
 Adds a set of messages to the history.

Protected Member Functions

virtual ~IHistoryPlugin ()=default
virtual void gotLastMessages (QObject *entry, const QList< QObject * > &messages)=0
 Notifies about last messages for the given entry.

Detailed Description

Interface for plugins storing chat history.

This interface should be implemented by plugins that store chat history for Azoth to provide additional features using these plugins.

Definition at line 101 of file ihistoryplugin.h.

Constructor & Destructor Documentation

◆ ~IHistoryPlugin()

virtual LC::Azoth::IHistoryPlugin::~IHistoryPlugin ( )
protectedvirtualdefault

Member Function Documentation

◆ AddMessages()

virtual void LC::Azoth::IHistoryPlugin::AddMessages ( const History::SomeEntryWithMessages & )
pure virtual

Adds a set of messages to the history.

◆ gotLastMessages()

virtual void LC::Azoth::IHistoryPlugin::gotLastMessages ( QObject * entry,
const QList< QObject * > & messages )
protectedpure virtual

Notifies about last messages for the given entry.

This signal should be emitted when last chat messages with the given entry have been retrieved from the history as the result of the call to RequestLastMessages().

If there are no messages for the entry, the implementation may either emit this signal with empty messages list or choose to not emit any signals at all.

Note
This function is expected to be a signal.
See also
RequestLastMessages()

◆ IsHistoryEnabledFor()

virtual bool LC::Azoth::IHistoryPlugin::IsHistoryEnabledFor ( ICLEntry & entry) const
pure virtual

Whether history is enabled for the given entry.

This method checks if history logging is enabled for the given entry.

Parameters
[in]entryThe entry to check.
Returns
Whether history logging is enabled for this entry.

◆ RequestLastMessages()

virtual Util::ContextTask< void > LC::Azoth::IHistoryPlugin::RequestLastMessages ( ICLEntry & entry,
int count )
pure virtual

Requests last messages for the given entry.

This method, when called, requests last num messages from the chat log with the entry.

This method is asynchronous: it is expected to return soon after being called, and the result is expected to be emitted via the gotLastMessages() signal.

Parameters
[in]entryThe entry for which to query the history.
[in]countThe maximum number of messages to retrieve.
See also
gotLastMessages()

◆ RequestMaxTimestamp()

virtual Util::ContextTask< std::optional< QDateTime > > LC::Azoth::IHistoryPlugin::RequestMaxTimestamp ( IAccount & acc)
pure virtual

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/leechcraft-doc-0.6.70+git.18450.gabe19ee3b0-build/leechcraft-0.6.70-18450-gabe19ee3b0/src/plugins/azoth/interfaces/azoth/ihistoryplugin.h