LeechCraft Azoth 0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
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
16namespace LC::Azoth
17{
22 {
23 std::optional<QString> Variant_ {};
24 QString Body_;
25 std::optional<QString> RichTextBody_ {};
26
28 bool Hidden_ = false;
29 };
30
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 {
42 };
43
44 struct Chat { Direction Dir_; };
45 struct Service {};
46 using Kind = std::variant<Chat, Service>;
48
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}
Util::TaintedString Text_
Definition message.h:63
std::variant< Chat, Service > Kind
Definition message.h:46
std::optional< QString > Variant_
Definition message.h:33
static InjectedMessage FromOutgoing(const OutgoingMessage &msg)
Definition message.h:49
std::optional< QString > RichTextBody_
Definition message.h:36
Describes a message to be sent, as formed by the user and before it has been sent to the wire.
Definition message.h:22
std::optional< QString > Variant_
Definition message.h:23
std::optional< QString > RichTextBody_
Definition message.h:25