qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
src
model
groupinvite.cpp
Go to the documentation of this file.
1
/*
2
Copyright © 2017-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
#include "
groupinvite.h
"
21
28
GroupInvite::GroupInvite
(uint32_t friendId, uint8_t inviteType,
const
QByteArray& data)
29
: friendId{
friendId
}
30
, type{inviteType}
31
, invite{data}
32
, date{QDateTime::currentDateTime()}
33
{
34
}
35
36
bool
GroupInvite::operator==
(
const
GroupInvite
& other)
const
37
{
38
return
friendId
== other.
friendId
&&
type
== other.
type
&&
invite
== other.
invite
39
&&
date
== other.
date
;
40
}
41
42
uint32_t
GroupInvite::getFriendId
()
const
43
{
44
return
friendId
;
45
}
46
47
uint8_t
GroupInvite::getType
()
const
48
{
49
return
type
;
50
}
51
52
QByteArray
GroupInvite::getInvite
()
const
53
{
54
return
invite
;
55
}
56
57
QDateTime
GroupInvite::getInviteDate
()
const
58
{
59
return
date
;
60
}
GroupInvite::getType
uint8_t getType() const
Definition:
groupinvite.cpp:47
GroupInvite::friendId
uint32_t friendId
Definition:
groupinvite.h:39
GroupInvite::date
QDateTime date
Definition:
groupinvite.h:42
GroupInvite
This class contains information needed to create a group invite.
Definition:
groupinvite.h:26
GroupInvite::GroupInvite
GroupInvite()=default
groupinvite.h
GroupInvite::invite
QByteArray invite
Definition:
groupinvite.h:41
GroupInvite::getFriendId
uint32_t getFriendId() const
Definition:
groupinvite.cpp:42
GroupInvite::operator==
bool operator==(const GroupInvite &other) const
Definition:
groupinvite.cpp:36
GroupInvite::getInvite
QByteArray getInvite() const
Definition:
groupinvite.cpp:52
GroupInvite::type
uint8_t type
Definition:
groupinvite.h:40
GroupInvite::getInviteDate
QDateTime getInviteDate() const
Definition:
groupinvite.cpp:57
Generated by
1.8.17