1 /***************************************************************************
2 * Copyright (C) 2005-2019 by the Quassel Project *
3 * devel@quassel-irc.org *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) version 3. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
23 #include <QDataStream>
24 #include <QHostAddress>
26 #include <QVariantList>
29 #include "bufferinfo.h"
35 namespace Serializers {
37 enum class VariantType : quint32 {
66 enum class QuasselType {
80 VariantType variantType(QuasselType type);
81 QString toName(QuasselType type);
82 Types::QuasselType fromName(::QByteArray &name);
85 bool deserialize(QDataStream &stream, const Quassel::Features &features, QVariant &data);
86 bool deserialize(QDataStream &stream, const Quassel::Features &features, QVariantList &list);
87 bool deserialize(QDataStream &stream, const Quassel::Features &features, QVariantMap &data);
88 bool deserialize(QDataStream &stream, const Quassel::Features &features, QVariant &data, Types::VariantType type);
89 bool deserialize(QDataStream &stream, const Quassel::Features &features, QVariant &data, Types::QuasselType type);
90 bool deserialize(QDataStream &stream, const Quassel::Features &features, bool &data);
91 bool deserialize(QDataStream &stream, const Quassel::Features &features, int8_t &data);
92 bool deserialize(QDataStream &stream, const Quassel::Features &features, uint8_t &data);
93 bool deserialize(QDataStream &stream, const Quassel::Features &features, int16_t &data);
94 bool deserialize(QDataStream &stream, const Quassel::Features &features, uint16_t &data);
95 bool deserialize(QDataStream &stream, const Quassel::Features &features, int32_t &data);
96 bool deserialize(QDataStream &stream, const Quassel::Features &features, uint32_t &data);
97 bool deserialize(QDataStream &stream, const Quassel::Features &features, qlonglong &data);
98 bool deserialize(QDataStream &stream, const Quassel::Features &features, qulonglong &data);
99 bool deserialize(QDataStream &stream, const Quassel::Features &features, Types::VariantType &data);
100 bool deserialize(QDataStream &stream, const Quassel::Features &features, QChar &data);
101 bool deserialize(QDataStream &stream, const Quassel::Features &features, QString &data);
102 bool deserialize(QDataStream &stream, const Quassel::Features &features, QTime &data);
103 bool deserialize(QDataStream &stream, const Quassel::Features &features, QDate &data);
104 bool deserialize(QDataStream &stream, const Quassel::Features &features, QDateTime &data);
105 bool deserialize(QDataStream &stream, const Quassel::Features &features, QByteArray &data);
106 bool deserialize(QDataStream &stream, const Quassel::Features &features, QStringList &data);
107 bool deserialize(QDataStream &stream, const Quassel::Features &features, Message &data);
108 bool deserialize(QDataStream &stream, const Quassel::Features &features, BufferInfo &data);
109 bool deserialize(QDataStream &stream, const Quassel::Features &features, BufferId &data);
110 bool deserialize(QDataStream &stream, const Quassel::Features &features, IdentityId &data);
111 bool deserialize(QDataStream &stream, const Quassel::Features &features, NetworkId &data);
112 bool deserialize(QDataStream &stream, const Quassel::Features &features, MsgId &data);
113 bool deserialize(QDataStream &stream, const Quassel::Features &features, PeerPtr &data);
114 bool deserialize(QDataStream &stream, const Quassel::Features &features, NetworkInfo &data);
115 bool deserialize(QDataStream &stream, const Quassel::Features &features, Identity &data);
116 bool deserialize(QDataStream &stream, const Quassel::Features &features, Network::Server &data);