LeechCraft Azoth 0.6.70-14794-g33744ae6ce
Modular multiprotocol IM plugin for LeechCraft
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#ifndef PLUGINS_AZOTH_INTERFACES_IHAVECONSOLE_H
10#define PLUGINS_AZOTH_INTERFACES_IHAVECONSOLE_H
11#include <QMetaType>
12
13namespace LC
14{
15namespace Azoth
16{
32 {
33 public:
34 virtual ~IHaveConsole () {}
35
38 enum class PacketFormat
39 {
44 XML,
45
52
57 Binary
58 };
59
62 enum class PacketDirection
63 {
66 In,
67
70 Out
71 };
72
77 virtual PacketFormat GetPacketFormat () const = 0;
78
94 virtual void SetConsoleEnabled (bool enabled) = 0;
95 protected:
113 virtual void gotConsolePacket (const QByteArray& packet,
114 PacketDirection direction, const QString& hrEntryId) = 0;
115 };
116}
117}
118
119Q_DECLARE_INTERFACE (LC::Azoth::IHaveConsole,
120 "org.Deviant.LeechCraft.Azoth.IHaveConsole/1.0")
121
122#endif
Interface for accounts that support protocol consoles.
Definition: ihaveconsole.h:32
virtual PacketFormat GetPacketFormat() const =0
Returns the packet format used in this account.
virtual void SetConsoleEnabled(bool enabled)=0
Enables or disables the console.
PacketFormat
Defines the format of the packets in this protocol.
Definition: ihaveconsole.h:39
@ XML
XML packets (like in XMPP).
@ Binary
Binary packets (like in Oscar).
@ PlainText
Plain text packets (like in IRC).
virtual void gotConsolePacket(const QByteArray &packet, PacketDirection direction, const QString &hrEntryId)=0
Notifies about new packet.
PacketDirection
Defines the direction of a packet.
Definition: ihaveconsole.h:63