1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/****************************************************************************
* delayedmessage.cpp
* Copyright © 2012, Vsevolod Velichko <torkvema@gmail.com>.
* Licence: GPLv3 or later
*
****************************************************************************
* *
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
****************************************************************************/
#include "delayedmessage.h"
QDataStream& operator<<(QDataStream &out, const DelayedMessage &msg)
{
out << msg.from << msg.timeAdded << msg.message;
return out;
}
QDataStream& operator>>(QDataStream &in, DelayedMessage &msg)
{
in >> msg.from >> msg.timeAdded >> msg.message;
return in;
}
QDataStream& operator<<(QDataStream &out, const DelayedMessages &msgs)
{
out << (*msgs);
return out;
}
QDataStream& operator>>(QDataStream &in, DelayedMessages &msgs)
{
in >> (*msgs);
return in;
}
|