LeechCraft Azoth
0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
Toggle main menu visibility
Loading...
Searching...
No Matches
ihaveconsole.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 <QMetaType>
12
#include <QtPlugin>
13
14
namespace
LC::Azoth
15
{
30
class
IHaveConsole
31
{
32
public
:
33
virtual
~IHaveConsole
() {}
34
37
enum class
PacketFormat
38
{
43
XML
,
44
50
PlainText
,
51
56
Binary
57
};
58
61
enum class
PacketDirection
62
{
65
In
,
66
69
Out
70
};
71
76
virtual
PacketFormat
GetPacketFormat
()
const
= 0;
77
93
virtual
void
SetConsoleEnabled
(
bool
enabled) = 0;
94
protected
:
112
virtual
void
gotConsolePacket
(
const
QByteArray& packet,
113
PacketDirection
direction,
const
QString& hrEntryId) = 0;
114
};
115
}
116
117
Q_DECLARE_INTERFACE (
LC::Azoth::IHaveConsole
,
118
"org.Deviant.LeechCraft.Azoth.IHaveConsole/1.0"
)
LC::Azoth::IHaveConsole
Interface for accounts that support protocol consoles.
Definition
ihaveconsole.h:31
LC::Azoth::IHaveConsole::GetPacketFormat
virtual PacketFormat GetPacketFormat() const =0
Returns the packet format used in this account.
LC::Azoth::IHaveConsole::SetConsoleEnabled
virtual void SetConsoleEnabled(bool enabled)=0
Enables or disables the console.
LC::Azoth::IHaveConsole::PacketFormat
PacketFormat
Defines the format of the packets in this protocol.
Definition
ihaveconsole.h:38
LC::Azoth::IHaveConsole::PacketFormat::XML
@ XML
XML packets (like in XMPP).
Definition
ihaveconsole.h:43
LC::Azoth::IHaveConsole::PacketFormat::Binary
@ Binary
Binary packets (like in Oscar).
Definition
ihaveconsole.h:56
LC::Azoth::IHaveConsole::PacketFormat::PlainText
@ PlainText
Plain text packets (like in IRC).
Definition
ihaveconsole.h:50
LC::Azoth::IHaveConsole::gotConsolePacket
virtual void gotConsolePacket(const QByteArray &packet, PacketDirection direction, const QString &hrEntryId)=0
Notifies about new packet.
LC::Azoth::IHaveConsole::PacketDirection
PacketDirection
Defines the direction of a packet.
Definition
ihaveconsole.h:62
LC::Azoth::IHaveConsole::PacketDirection::Out
@ Out
Outgoing packet.
Definition
ihaveconsole.h:69
LC::Azoth::IHaveConsole::PacketDirection::In
@ In
Incoming packet.
Definition
ihaveconsole.h:65
LC::Azoth::IHaveConsole::~IHaveConsole
virtual ~IHaveConsole()
Definition
ihaveconsole.h:33
LC::Azoth
Definition
activityinfo.h:16
src
plugins
azoth
interfaces
azoth
ihaveconsole.h
Generated by
1.17.0