LeechCraft Azoth
0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
Toggle main menu visibility
Loading...
Searching...
No Matches
iprotocol.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <QFlags>
12
#include <QMetaType>
13
14
class
QObject;
15
class
QIcon;
16
17
namespace
LC
18
{
19
namespace
Azoth
20
{
21
class
IAccount
;
22
class
IProtocolPlugin
;
23
41
class
IProtocol
42
{
43
public
:
44
virtual
~IProtocol
() {}
45
49
enum
ProtocolFeature
50
{
53
PFNone
= 0x0,
54
57
PFSupportsMUCs
= 0x01,
58
64
PFMUCsJoinable
= 0x02,
65
71
PFSupportsInBandRegistration
= 0x04,
72
78
PFNoAccountRegistration
= 0x08
79
};
80
81
Q_DECLARE_FLAGS (ProtocolFeatures,
ProtocolFeature
)
82
83
86
enum
AccountAddOption
87
{
90
AAONoOptions
= 0,
91
96
AAORegisterNewAccount
= 0x01
97
};
98
99
Q_DECLARE_FLAGS (AccountAddOptions,
AccountAddOption
)
100
101
105
virtual QObject*
GetQObject
() = 0;
106
109
virtual ProtocolFeatures
GetFeatures
() const = 0;
110
117
virtual
QList
<QObject*>
GetRegisteredAccounts
() = 0;
118
125
virtual QObject*
GetParentProtocolPlugin
() const = 0;
126
132
virtual QString
GetProtocolName
() const = 0;
133
138
virtual QIcon
GetProtocolIcon
() const = 0;
139
145
virtual QByteArray
GetProtocolID
() const = 0;
146
166
virtual
QList
<QWidget*>
GetAccountRegistrationWidgets
(AccountAddOptions options) = 0;
167
192
virtual
void
RegisterAccount
(const QString& name, const
QList
<QWidget*>& widgets) = 0;
193
207
virtual
void
RemoveAccount
(QObject *account) = 0;
208
219
virtual
void
accountAdded
(QObject *account) = 0;
220
232
virtual
void
accountRemoved
(QObject *account) = 0;
233
};
234
}
235
}
236
237
Q_DECLARE_METATYPE (
LC
::
Azoth
::
IProtocol
*)
238
Q_DECLARE_OPERATORS_FOR_FLAGS (
LC
::
Azoth
::
IProtocol
::ProtocolFeatures)
239
Q_DECLARE_INTERFACE (
LC
::
Azoth
::
IProtocol
,
240
"org.Deviant.LeechCraft.Azoth.IProtocol/1.0"
)
LC::Azoth::IAccount
Interface representing a single account.
Definition
iaccount.h:46
LC::Azoth::IProtocol
Represents a protocol.
Definition
iprotocol.h:42
LC::Azoth::IProtocol::GetAccountRegistrationWidgets
virtual QList< QWidget * > GetAccountRegistrationWidgets(AccountAddOptions options)=0
Returns the widgets used for account addition.
LC::Azoth::IProtocol::GetProtocolIcon
virtual QIcon GetProtocolIcon() const =0
Returns the icon of this protocol.
LC::Azoth::IProtocol::RemoveAccount
virtual void RemoveAccount(QObject *account)=0
Removes the given account.
LC::Azoth::IProtocol::RegisterAccount
virtual void RegisterAccount(const QString &name, const QList< QWidget * > &widgets)=0
Adds an account with the given name and widgets.
LC::Azoth::IProtocol::accountRemoved
virtual void accountRemoved(QObject *account)=0
Notifies about an account having been removed.
LC::Azoth::IProtocol::GetProtocolID
virtual QByteArray GetProtocolID() const =0
Returns the protocol ID, which must be unique among all the protocols.
LC::Azoth::IProtocol::GetProtocolName
virtual QString GetProtocolName() const =0
Returns the human-readable name of this protocol, like "Jabber" or "ICQ".
LC::Azoth::IProtocol::~IProtocol
virtual ~IProtocol()
Definition
iprotocol.h:44
LC::Azoth::IProtocol::GetQObject
virtual QObject * GetQObject()=0
Returns the protocol object as a QObject.
LC::Azoth::IProtocol::accountAdded
virtual void accountAdded(QObject *account)=0
Notifies about new account.
LC::Azoth::IProtocol::GetParentProtocolPlugin
virtual QObject * GetParentProtocolPlugin() const =0
Returns the pointer to the parent protocol plugin that this protocol belongs to.
LC::Azoth::IProtocol::AccountAddOption
AccountAddOption
Definition
iprotocol.h:87
LC::Azoth::IProtocol::AAONoOptions
@ AAONoOptions
Definition
iprotocol.h:90
LC::Azoth::IProtocol::AAORegisterNewAccount
@ AAORegisterNewAccount
Definition
iprotocol.h:96
LC::Azoth::IProtocol::GetRegisteredAccounts
virtual QList< QObject * > GetRegisteredAccounts()=0
Returns the accounts within this protocol.
LC::Azoth::IProtocol::GetFeatures
virtual ProtocolFeatures GetFeatures() const =0
LC::Azoth::IProtocol::ProtocolFeature
ProtocolFeature
Definition
iprotocol.h:50
LC::Azoth::IProtocol::PFSupportsInBandRegistration
@ PFSupportsInBandRegistration
Definition
iprotocol.h:71
LC::Azoth::IProtocol::PFNoAccountRegistration
@ PFNoAccountRegistration
Definition
iprotocol.h:78
LC::Azoth::IProtocol::PFSupportsMUCs
@ PFSupportsMUCs
Definition
iprotocol.h:57
LC::Azoth::IProtocol::PFMUCsJoinable
@ PFMUCsJoinable
Definition
iprotocol.h:64
LC::Azoth::IProtocol::PFNone
@ PFNone
Definition
iprotocol.h:53
LC::Azoth::IProtocolPlugin
Definition
iprotocolplugin.h:27
QList
Definition
iaccountactionsprovider.h:16
LC::Azoth
Definition
activityinfo.h:16
LC
Definition
activityinfo.h:14
src
plugins
azoth
interfaces
azoth
iprotocol.h
Generated by
1.17.0