LeechCraft Azoth 0.6.70-17335-ge406ffdcaf
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#pragma once
10
11#include <QMetaType>
12#include <QtPlugin>
13
14namespace LC::Azoth
15{
31 {
32 public:
33 virtual ~IHaveConsole () {}
34
37 enum class PacketFormat
38 {
44
51
57 };
58
61 enum class PacketDirection
62 {
66
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
117Q_DECLARE_INTERFACE (LC::Azoth::IHaveConsole,
118 "org.Deviant.LeechCraft.Azoth.IHaveConsole/1.0")
Interface for accounts that support protocol consoles.
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.
@ 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.