qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
src
core
icoreextpacket.h
Go to the documentation of this file.
1
/*
2
Copyright © 2019 by The qTox Project Contributors
3
4
This file is part of qTox, a Qt-based graphical interface for Tox.
5
6
qTox is libre software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
qTox is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with qTox. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <QDateTime>
23
24
#include <cstdint>
25
#include <memory>
26
36
class
ICoreExtPacket
37
{
38
public
:
39
ICoreExtPacket
() =
default
;
40
virtual
~ICoreExtPacket
();
41
ICoreExtPacket
(
const
ICoreExtPacket
&) =
default
;
42
ICoreExtPacket
&
operator=
(
const
ICoreExtPacket
&) =
default
;
43
ICoreExtPacket
(
ICoreExtPacket
&&) =
default
;
44
ICoreExtPacket
&
operator=
(
ICoreExtPacket
&&) =
default
;
51
virtual
uint64_t
addExtendedMessage
(QString
message
) = 0;
52
57
virtual
bool
send
() = 0;
58
};
59
63
class
ICoreExtPacketAllocator
64
{
65
public
:
66
virtual
~ICoreExtPacketAllocator
();
67
71
virtual
std::unique_ptr<ICoreExtPacket>
getPacket
(uint32_t friendId) = 0;
72
};
ICoreExtPacket
Definition:
icoreextpacket.h:36
ICoreExtPacket::addExtendedMessage
virtual uint64_t addExtendedMessage(QString message)=0
Adds message to packet.
ICoreExtPacketAllocator::~ICoreExtPacketAllocator
virtual ~ICoreExtPacketAllocator()
HistMessageContentType::message
@ message
ICoreExtPacket::~ICoreExtPacket
virtual ~ICoreExtPacket()
ICoreExtPacket::ICoreExtPacket
ICoreExtPacket()=default
ICoreExtPacketAllocator::getPacket
virtual std::unique_ptr< ICoreExtPacket > getPacket(uint32_t friendId)=0
Gets a new packet builder for friend with core friend id friendId.
ICoreExtPacket::send
virtual bool send()=0
Consumes the packet constructed with PacketBuilder packet and sends it to toxext.
ICoreExtPacket::operator=
ICoreExtPacket & operator=(const ICoreExtPacket &)=default
ICoreExtPacketAllocator
Definition:
icoreextpacket.h:63
Generated by
1.8.17