LeechCraft Azoth
0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
Toggle main menu visibility
Loading...
Searching...
No Matches
message.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 <optional>
12
#include <QDateTime>
13
#include <QString>
14
#include <util/sll/taintedstring.h>
15
16
namespace
LC::Azoth
17
{
21
struct
OutgoingMessage
22
{
23
std::optional<QString>
Variant_
{};
24
QString
Body_
;
25
std::optional<QString>
RichTextBody_
{};
26
27
bool
AllowServerArchival_
=
true
;
28
bool
Hidden_
=
false
;
29
};
30
31
struct
InjectedMessage
32
{
33
std::optional<QString>
Variant_
{};
34
QDateTime
TS_
= QDateTime::currentDateTime ();
35
QString
Body_
;
36
std::optional<QString>
RichTextBody_
{};
37
38
enum class
Direction
: uint8_t
39
{
40
In
,
41
Out
,
42
};
43
44
struct
Chat
{
Direction
Dir_
; };
45
struct
Service
{};
46
using
Kind
= std::variant<Chat, Service>;
47
Kind
Kind_
;
48
49
static
InjectedMessage
FromOutgoing
(
const
OutgoingMessage
& msg)
50
{
51
return
52
{
53
.Body_ = msg.
Body_
,
54
.RichTextBody_ = msg.
RichTextBody_
,
55
.Kind_ =
Chat
{
Direction::Out
},
56
};
57
}
58
};
59
60
struct
ChatEvent
61
{
62
QDateTime
TS_
= QDateTime::currentDateTime ();
63
Util::TaintedString
Text_
;
64
};
65
}
LC::Azoth
Definition
activityinfo.h:16
LC::Azoth::ChatEvent
Definition
message.h:61
LC::Azoth::ChatEvent::Text_
Util::TaintedString Text_
Definition
message.h:63
LC::Azoth::ChatEvent::TS_
QDateTime TS_
Definition
message.h:62
LC::Azoth::InjectedMessage::Chat
Definition
message.h:44
LC::Azoth::InjectedMessage::Chat::Dir_
Direction Dir_
Definition
message.h:44
LC::Azoth::InjectedMessage::Service
Definition
message.h:45
LC::Azoth::InjectedMessage
Definition
message.h:32
LC::Azoth::InjectedMessage::Body_
QString Body_
Definition
message.h:35
LC::Azoth::InjectedMessage::Kind_
Kind Kind_
Definition
message.h:47
LC::Azoth::InjectedMessage::Kind
std::variant< Chat, Service > Kind
Definition
message.h:46
LC::Azoth::InjectedMessage::Variant_
std::optional< QString > Variant_
Definition
message.h:33
LC::Azoth::InjectedMessage::FromOutgoing
static InjectedMessage FromOutgoing(const OutgoingMessage &msg)
Definition
message.h:49
LC::Azoth::InjectedMessage::RichTextBody_
std::optional< QString > RichTextBody_
Definition
message.h:36
LC::Azoth::InjectedMessage::Direction
Direction
Definition
message.h:39
LC::Azoth::InjectedMessage::Direction::Out
@ Out
Definition
message.h:41
LC::Azoth::InjectedMessage::Direction::In
@ In
Definition
message.h:40
LC::Azoth::InjectedMessage::TS_
QDateTime TS_
Definition
message.h:34
LC::Azoth::OutgoingMessage
Describes a message to be sent, as formed by the user and before it has been sent to the wire.
Definition
message.h:22
LC::Azoth::OutgoingMessage::Variant_
std::optional< QString > Variant_
Definition
message.h:23
LC::Azoth::OutgoingMessage::AllowServerArchival_
bool AllowServerArchival_
Definition
message.h:27
LC::Azoth::OutgoingMessage::RichTextBody_
std::optional< QString > RichTextBody_
Definition
message.h:25
LC::Azoth::OutgoingMessage::Body_
QString Body_
Definition
message.h:24
LC::Azoth::OutgoingMessage::Hidden_
bool Hidden_
Definition
message.h:28
src
plugins
azoth
interfaces
azoth
message.h
Generated by
1.17.0