Initial Import
[profile/ivi/hfdialer.git] / src / dbustypes.cpp
1 /*
2  * hfdialer - Hands Free Voice Call Manager
3  * Copyright (c) 2012, Intel Corporation.
4  *
5  * This program is licensed under the terms and conditions of the
6  * Apache License, version 2.0.  The full text of the Apache License is at
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  */
10
11 #include "dbustypes.h"
12
13 // Marshall the CallHistoryEvent data into a D-BUS argument
14 QDBusArgument & operator << (QDBusArgument &argument,
15                              const CallHistoryEvent &d)
16 {
17     argument.beginStructure();
18     argument << d.id << d.lineid << d.type << d.start << d.end;
19     argument.endStructure();
20     return argument;
21 }
22
23 // Retrieve the CallHistoryEvent data from the D-BUS argument
24 const QDBusArgument & operator >> (const QDBusArgument &argument,
25                                    CallHistoryEvent &d)
26 {
27     argument.beginStructure();
28     argument >> d.id >> d.lineid >> d.type >> d.start >> d.end;
29     argument.endStructure();
30     return argument;
31 }
32
33 // Marshall the OfonoPathProperties data into a D-BUS argument
34 QDBusArgument & operator << (QDBusArgument &argument,
35                              const OfonoPathProperties &d)
36 {
37     argument.beginStructure();
38     argument << d.path << d.properties;
39     argument.endStructure();
40     return argument;
41 }
42
43 // Retrieve the OfonoPathProperties data from the D-BUS argument
44 const QDBusArgument & operator >> (const QDBusArgument &argument,
45                                    OfonoPathProperties &d)
46 {
47     argument.beginStructure();
48     argument >> d.path >> d.properties;
49     argument.endStructure();
50     return argument;
51 }
52
53 /* Local Variables:      */
54 /* mode:c++              */
55 /* c-basic-offset:4      */
56 /* indent-tabs-mode: nil */
57 /* End:                  */