11#include <QHashFunctions>
14#include <util/azoth/emitters/clentry.h>
71 Q_DECLARE_FLAGS (Features,
Feature)
116 return entry->GetQObject ();
151 [[deprecated(
"Use GetGlobalPersistentID() or GetGlobalStrongestID()")]]
157 [[deprecated(
"Use GetConventionalID()")]]
217 return *persistentId;
224 return *persistentId;
308 const QString& variant) = 0;
360 virtual QMap<QString, QVariant>
GetClientInfo (
const QString& variant)
const = 0;
380Q_DECLARE_OPERATORS_FOR_FLAGS (LC::Azoth::ICLEntry::Features)
Interface representing a single account.
virtual QByteArray GetAccountID() const =0
Returns the ID of this account.
Represents a single entry in contact list.
virtual ~ICLEntry()=default
virtual QObject * GetQObject()=0
virtual QString GetHumanReadableAddress() const
QString GetEntryID() const
virtual Features GetEntryFeatures() const =0
virtual void SendMessage(const OutgoingMessage &message)=0
Sends the message described by message.
virtual void ChatTabClosed()=0
Called by Azoth when the chat with the entry is closed.
virtual void PurgeMessages(const QDateTime &before)=0
Purges messages before the given date.
virtual std::optional< EntryPersistentId > GetPersistentID() const =0
Returns the global persistent ID of this entry.
std::optional< GlobalPersistentId > GetGlobalPersistentID() const
virtual QStringList Groups() const =0
Returns the list of human-readable names of the groups that this entry belongs to.
Emitters::CLEntry Emitter_
virtual void SetChatPartState(ChatPartState state, const QString &variant)=0
Notifies about our chat participation state change.
virtual void MarkMsgsRead()=0
Called whenever new messages are read.
@ FSelfContact
The entry represents ourselves, like the self-contact in XMPP.
@ FMaskLongetivity
Mask for FPermanentEntry and FSessionEntry.
@ FSessionEntry
The entry is transient, like a chat room participant or a temporary contact.
@ FSupportsRenames
The entry supports renaming, so SetEntryName() makes sense.
@ FSupportsGrouping
The entry supports moving between different groups via SetGroups().
@ FPermanentEntry
The entry is permanent: it belongs to some kind of roster list.
@ FSupportsAuth
The entry supports auth manipulations and implements IAuthable.
virtual void SetGroups(const QStringList &groups)=0
Sets the list of groups this item belongs to.
@ PrivateChat
A chat room member.
@ Chat
A standard one-to-one chat.
@ MUC
A multi-user chatroom.
@ UnauthEntry
An unauthorized user that has requested authorization.
virtual QList< IMessage * > GetAllMessages() const =0
Returns all already sent or received messages.
virtual EntryType GetEntryType() const =0
QString GetHumanReadableID() const
GlobalConventionalId GetGlobalConventionalID() const
virtual EntryStatus GetStatus(const QString &variant=QString()) const =0
Returns the current status of a variant of the item.
virtual QMap< QString, QVariant > GetClientInfo(const QString &variant) const =0
Returns the client information for the given variant.
virtual QString GetEntryName() const =0
GlobalStrongestId GetGlobalStrongestID() const
virtual EntryConventionalId GetConventionalID() const =0
Returns the conventional human-readable ID of this entry.
virtual IAccount * GetParentAccount() const =0
virtual QList< QAction * > GetActions() const =0
Returns the list of actions for the item.
QObject * GetParentCLEntryObject() const
virtual void ShowInfo()=0
Requests the entry to show dialog with info about it.
virtual ICLEntry * GetParentCLEntry() const
Emitters::CLEntry & GetCLEntryEmitter()
virtual QStringList Variants() const =0
Returns the list of destination variants.
EntryStrongestId GetStrongestID() const
virtual void SetEntryName(const QString &name)=0
Sets the human-readable name of this entry.
This interface is used to represent a message.
GlobalId< IdKind::Conventional > GlobalConventionalId
EntryId< IdKind::Conventional > EntryConventionalId
StrongestId< EntryId > EntryStrongestId
StrongestId< GlobalId > GlobalStrongestId
Describes an entry's status.
Describes a message to be sent, as formed by the user and before it has been sent to the wire.