30 #ifndef PLUGINS_AZOTH_INTERFACES_IPROXYOBJECT_H
31 #define PLUGINS_AZOTH_INTERFACES_IPROXYOBJECT_H
109 virtual void SetPassword (
const QString& password, QObject *account) = 0;
187 virtual QObject*
GetAccount (
const QString& accID)
const = 0;
203 virtual QObject*
GetEntry (
const QString& entryID,
const QString& accID)
const = 0;
216 virtual void OpenChat (
const QString& entryID,
217 const QString& accID,
218 const QString& message = QString (),
219 const QString& variant = QString ())
const = 0;
235 virtual QList<QColor>
GenerateColors (
const QString& scheme, QColor bg)
const = 0;
247 virtual QString
GetNickColor (
const QString& nick,
const QList<QColor>& colors)
const = 0;
258 virtual QString
FormatDate (QDateTime date, QObject *message)
const = 0;
271 virtual QString
FormatNickname (QString nick, QObject *message,
const QString& color)
const = 0;
282 virtual QString
FormatBody (QString body, QObject *message)
const = 0;
299 virtual QStringList
FindLinks (
const QString&) = 0;
302 const QDateTime& date,
306 QObject *parent =
nullptr) = 0;
332 "org.Deviant.LeechCraft.Plugins.Azoth.Plugins.IProxyObject/1.0");
virtual QString StateToString(State state) const =0
Returns a human-readable string for the given state.
virtual void PreprocessMessage(QObject *message)=0
Preprocesses the message before displaying it.
virtual QIcon GetIconForState(State state) const =0
virtual QList< QColor > GenerateColors(const QString &scheme, QColor bg) const =0
Generates the nickname colors for the given scheme.
virtual QString GetPassword(QObject *account)=0
Retrieves the password for the given account.
virtual QString FormatBody(QString body, QObject *message) const =0
Formats the body for the given message.
virtual QString AuthStatusToString(AuthStatus status) const =0
Returns serialized name of the authorization status.
virtual QString GetNickColor(const QString &nick, const QList< QColor > &colors) const =0
Returns the color for the given nick and color set.
virtual void FormatLinks(QString &body)=0
virtual bool IsMessageRead(QObject *msgObj)=0
virtual QString PrettyPrintDateTime(const QDateTime &datetime)=0
Formats the datetime according to current locale.
virtual QObject * GetEntry(const QString &entryID, const QString &accID) const =0
Returns the entry object for the given entry ID.
virtual QList< QObject * > GetAllAccounts() const =0
Returns all the accounts registered in Azoth.
virtual void MarkMessagesAsRead(QObject *entryObject)=0
virtual void SetPassword(const QString &password, QObject *account)=0
Stores the password for the given account.
Q_DECLARE_INTERFACE(LeechCraft::Azoth::IProxyObject,"org.Deviant.LeechCraft.Plugins.Azoth.Plugins.IProxyObject/1.0")
virtual Util::ResourceLoader * GetResourceLoader(PublicResourceLoader loader) const =0
virtual QStringList FindLinks(const QString &)=0
virtual bool IsAutojoinAllowed()=0
Queries whether autojoin is allowed.
virtual QString GetAccountPassword(QObject *account, bool useStored=true)=0
Retrieves password for the given account, asking user if needed.
Type
Represents possible message types.
virtual QString FormatNickname(QString nick, QObject *message, const QString &color) const =0
Formats the nickname for the given message and color.
Direction
Represents the direction of the message.
virtual QObject * CreateCoreMessage(const QString &body, const QDateTime &date, IMessage::Type type, IMessage::Direction dir, QObject *other, QObject *parent=nullptr)=0
virtual QString ToPlainBody(QString body)=0
virtual void OpenChat(const QString &entryID, const QString &accID, const QString &message=QString(), const QString &variant=QString()) const =0
Opens the chat with the given entry.
virtual QString FormatDate(QDateTime date, QObject *message) const =0
Formats the date for the given message.
virtual QObject * GetSettingsManager()=0
Returns the Core's settings manager object.
virtual AuthStatus AuthStatusFromString(const QString &str) const =0
Converts string representation to AuthStatus element.
virtual QObject * GetAccount(const QString &accID) const =0
Returns the account object for the given account ID.