Version 0.7-0
[vicar] / src / vicar-telepathy / cpp / connectioninterfacecapabilitiestypes.cpp
1 /*
2 @version: 0.6
3 @author: Sudheer K. <scifi1947 at gmail.com>
4 @license: GNU General Public License
5
6 Based on QtTelepathy with copyright notice below.
7 */
8
9 /*
10  * QtTelepathy, the Tapioca Qt4 Telepathy Client Library
11  * Copyright (C) 2006 by INdT
12  *  @author Andre Moreira Magalhaes <andre.magalhaes@indt.org>
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27  */
28
29 #include "connectioninterfacecapabilitiestypes.h"
30
31 using namespace org::freedesktop::Telepathy;
32
33 const QDBusArgument &operator>>(const QDBusArgument &argument, ContactCapabilities &val)
34 {
35     argument.beginStructure();
36     argument >> val.handle >> val.channelType >> val.genericCapabilityFlags >> val.typeSpecificFlags;
37     argument.endStructure();
38     return argument;
39 }
40
41 QDBusArgument &operator<<(QDBusArgument &argument, const ContactCapabilities &val)
42 {
43     argument.beginStructure();
44     argument << val.handle << val.channelType << val.genericCapabilityFlags << val.typeSpecificFlags;
45     argument.endStructure();
46     return argument;
47 }
48
49 QDebug &operator<<(QDebug arg,const ContactCapabilities &val)
50 {
51     arg.space() << "[" << val.handle << "," << val.channelType << "," <<  val.genericCapabilityFlags << "," <<  val.typeSpecificFlags << "]";
52     return arg.space();
53 }
54
55
56 const QDBusArgument &operator>>(const QDBusArgument &argument, CapabilityPair &val)
57 {
58     argument.beginStructure();
59     argument >> val.channelType >> val.typeSpecificFlags;
60     argument.endStructure();
61     return argument;
62 }
63
64 QDBusArgument &operator<<(QDBusArgument &argument, const CapabilityPair &val)
65 {
66     argument.beginStructure();
67     argument << val.channelType << val.typeSpecificFlags;
68     argument.endStructure();
69     return argument;
70 }
71
72 QDebug &operator<<(QDebug arg,const CapabilityPair &val)
73 {
74     arg.space() << "[" << val.channelType << "," <<  val.typeSpecificFlags << "]";
75     return arg.space();
76 }
77
78 const QDBusArgument &operator>>(const QDBusArgument &argument, CapabilityChange &val)
79 {
80     argument.beginStructure();
81     argument >> val.handle >> val.channelType >> val.oldGenericFlags >> val.newGenericFlags >> val.oldTypeSpecificFlags >> val.newTypeSpecificFlags;
82     argument.endStructure();
83     return argument;
84 }
85
86 QDBusArgument &operator<<(QDBusArgument &argument, const CapabilityChange &val)
87 {
88     argument.beginStructure();
89     argument << val.handle << val.channelType << val.oldGenericFlags << val.newGenericFlags << val.oldTypeSpecificFlags << val.newTypeSpecificFlags;
90     argument.endStructure();
91     return argument;
92 }
93
94 QDebug &operator<<(QDebug arg,const CapabilityChange &val)
95 {
96     arg.space() << "[" << val.handle << "," << val.channelType << "," <<  val.oldGenericFlags << "," <<  val.newGenericFlags << "," <<  val.oldTypeSpecificFlags << "," <<  val.newTypeSpecificFlags << "]";
97     return arg.space();
98 }