Mercurial > bellaciao
comparison dbus_types.cpp @ 4:220e5619bf87
Profiles selection now fill contact list + new Jid class
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 11 Aug 2011 00:02:25 +0200 |
parents | 22b44846b04b |
children | 48045176d1c6 |
comparison
equal
deleted
inserted
replaced
3:2195295a2058 | 4:220e5619bf87 |
---|---|
1 /* | 1 /* |
2 Mignonne: a Salut à Toi frontend | 2 Bellaciao: a Salut à Toi frontend |
3 Copyright (C) 2011 Jérôme Poisson (goffi@goffi.org) | 3 Copyright (C) 2011 Jérôme Poisson (goffi@goffi.org) |
4 | 4 |
5 This program is free software: you can redistribute it and/or modify | 5 This program is free software: you can redistribute it and/or modify |
6 it under the terms of the GNU Affero General Public License as published by | 6 it under the terms of the GNU Affero General Public License as published by |
7 the Free Software Foundation, either version 3 of the License, or | 7 the Free Software Foundation, either version 3 of the License, or |
15 You should have received a copy of the GNU Affero General Public License | 15 You should have received a copy of the GNU Affero General Public License |
16 along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 */ | 17 */ |
18 | 18 |
19 #include "dbus_types.h" | 19 #include "dbus_types.h" |
20 #include <QtGlobal> | |
21 | |
22 QDBusArgument &operator<<(QDBusArgument &argument, const Jid &jid) | |
23 { | |
24 return argument << jid.getString(); | |
25 } | |
26 | |
27 const QDBusArgument &operator>>(const QDBusArgument &argument, Jid &jid) | |
28 { | |
29 QString _str = QString(); | |
30 argument >> _str; | |
31 jid.fromString(_str); | |
32 return argument; | |
33 } | |
20 | 34 |
21 QDBusArgument &operator<<(QDBusArgument &argument, const ContactT &contact) | 35 QDBusArgument &operator<<(QDBusArgument &argument, const ContactT &contact) |
22 { | 36 { |
23 argument.beginStructure(); | 37 argument.beginStructure(); |
24 argument << contact.jid << contact.attributes << contact.groups; | 38 argument << contact.jid << contact.attributes << contact.groups; |