LeechCraft Azoth
0.6.70-18808-g3467692359
Modular multiprotocol IM plugin for LeechCraft
Toggle main menu visibility
Loading...
Searching...
No Matches
imessage.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 <QString>
12
#include <QDateTime>
13
#include <QtPlugin>
14
#include "
messagebase.h
"
15
16
class
QObject;
17
18
namespace
LC
19
{
20
namespace
Azoth
21
{
22
class
ICLEntry
;
23
39
class
IMessage
:
public
MessageBase
40
{
41
public
:
42
virtual
~IMessage
() {};
43
46
enum class
Direction
: uint8_t
47
{
50
In
,
51
54
Out
55
};
56
59
enum class
Type
: uint8_t
60
{
63
ChatMessage
,
64
72
MUCMessage
,
73
79
StatusMessage
,
80
88
EventMessage
,
89
92
ServiceMessage
93
};
94
102
enum class
SubType
: uint8_t
103
{
107
Other
,
108
112
ParticipantNickChange
,
113
};
114
115
enum class
EscapePolicy
: uint8_t
116
{
117
Escape
,
118
NoEscape
119
};
120
123
virtual
QObject*
GetQObject
() = 0;
124
133
virtual
void
Store
() = 0;
134
139
virtual
Direction
GetDirection
()
const
= 0;
140
145
virtual
Type
GetMessageType
()
const
= 0;
146
154
virtual
SubType
GetMessageSubType
()
const
= 0;
155
170
virtual
QObject*
OtherPart
()
const
= 0;
171
186
virtual
QObject*
ParentCLEntry
()
const
187
{
188
return
OtherPart
();
189
}
190
197
virtual
QString
GetOtherVariant
()
const
= 0;
198
206
virtual
QString
GetBody
()
const
= 0;
207
214
virtual
void
SetBody
(
const
QString& body) = 0;
215
225
virtual
EscapePolicy
GetEscapePolicy
()
const
226
{
227
return
EscapePolicy::Escape
;
228
}
229
234
virtual
QDateTime
GetDateTime
()
const
= 0;
235
240
virtual
void
SetDateTime
(
const
QDateTime& timestamp) = 0;
241
};
242
}
243
}
244
245
Q_DECLARE_INTERFACE (
LC::Azoth::IMessage
,
246
"org.LeechCraft.Azoth.IMessage/1.0"
)
LC::Azoth::ICLEntry
Represents a single entry in contact list.
Definition
iclentry.h:49
LC::Azoth::IMessage
This interface is used to represent a message.
Definition
imessage.h:40
LC::Azoth::IMessage::GetDirection
virtual Direction GetDirection() const =0
Returns the direction of this message.
LC::Azoth::IMessage::GetEscapePolicy
virtual EscapePolicy GetEscapePolicy() const
Returns the escape policy of the body.
Definition
imessage.h:225
LC::Azoth::IMessage::GetDateTime
virtual QDateTime GetDateTime() const =0
Returns the timestamp of the message.
LC::Azoth::IMessage::Type
Type
Represents possible message types.
Definition
imessage.h:60
LC::Azoth::IMessage::Type::StatusMessage
@ StatusMessage
Status changes in a chat.
Definition
imessage.h:79
LC::Azoth::IMessage::Type::ServiceMessage
@ ServiceMessage
Other.
Definition
imessage.h:92
LC::Azoth::IMessage::Type::EventMessage
@ EventMessage
Various events in a chat.
Definition
imessage.h:88
LC::Azoth::IMessage::Type::ChatMessage
@ ChatMessage
Standard one-to-one message.
Definition
imessage.h:63
LC::Azoth::IMessage::Type::MUCMessage
@ MUCMessage
Message in a multiuser conference.
Definition
imessage.h:72
LC::Azoth::IMessage::GetMessageType
virtual Type GetMessageType() const =0
Returns the type of this message.
LC::Azoth::IMessage::GetBody
virtual QString GetBody() const =0
Returns the body of the message.
LC::Azoth::IMessage::~IMessage
virtual ~IMessage()
Definition
imessage.h:42
LC::Azoth::IMessage::GetOtherVariant
virtual QString GetOtherVariant() const =0
The variant of the other part.
LC::Azoth::IMessage::SetBody
virtual void SetBody(const QString &body)=0
Updates the body of the message.
LC::Azoth::IMessage::Store
virtual void Store()=0
Stores the message.
LC::Azoth::IMessage::GetMessageSubType
virtual SubType GetMessageSubType() const =0
Returns the subtype of this message.
LC::Azoth::IMessage::SetDateTime
virtual void SetDateTime(const QDateTime ×tamp)=0
Updates the timestamp of the message.
LC::Azoth::IMessage::OtherPart
virtual QObject * OtherPart() const =0
Returns the CL entry from which this message is.
LC::Azoth::IMessage::SubType
SubType
This enum is used for more precise classification of chat types messages.
Definition
imessage.h:103
LC::Azoth::IMessage::SubType::ParticipantNickChange
@ ParticipantNickChange
Notifies about participant in a MUC changing the nick.
Definition
imessage.h:112
LC::Azoth::IMessage::SubType::Other
@ Other
Definition
imessage.h:107
LC::Azoth::IMessage::Direction
Direction
Represents the direction of the message.
Definition
imessage.h:47
LC::Azoth::IMessage::Direction::Out
@ Out
The message is from us to the remote party.
Definition
imessage.h:54
LC::Azoth::IMessage::Direction::In
@ In
The message is from the remote party to us.
Definition
imessage.h:50
LC::Azoth::IMessage::ParentCLEntry
virtual QObject * ParentCLEntry() const
Returns the parent CL entry of this message.
Definition
imessage.h:186
LC::Azoth::IMessage::GetQObject
virtual QObject * GetQObject()=0
Returns this message as a QObject.
LC::Azoth::IMessage::EscapePolicy
EscapePolicy
Definition
imessage.h:116
LC::Azoth::IMessage::EscapePolicy::Escape
@ Escape
Definition
imessage.h:117
LC::Azoth::IMessage::EscapePolicy::NoEscape
@ NoEscape
Definition
imessage.h:118
LC::Azoth::MessageBase
Definition
messagebase.h:16
messagebase.h
LC::Azoth
Definition
activityinfo.h:16
LC
Definition
activityinfo.h:14
src
plugins
azoth
interfaces
azoth
imessage.h
Generated by
1.17.0