2 * hfdialer - Hands Free Voice Call Manager
3 * Copyright (c) 2012, Intel Corporation.
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
11 #ifndef DIALERDBUSTYPES_H
12 #define DIALERDBUSTYPES_H
14 #include <QtCore/QList>
15 #include <QtCore/QMetaType>
16 #include <QtDBus/QtDBus>
18 struct CallHistoryEvent
27 Q_DECLARE_METATYPE ( CallHistoryEvent )
29 // Marshall the CallHistoryEvent data into a D-BUS argument
30 QDBusArgument &operator<<(QDBusArgument &argument,
31 const CallHistoryEvent &mystruct);
33 // Retrieve the CallHistoryEvent data from the D-BUS argument
34 const QDBusArgument &operator>>(const QDBusArgument &argument,
35 CallHistoryEvent &mystruct);
37 typedef QList< CallHistoryEvent > QArrayOfHistoryEvent;
39 Q_DECLARE_METATYPE ( QArrayOfHistoryEvent )
42 * New DBus type needed for Ofono calls that expect an array of
43 * Object paths and that objects properties: "a(oa{sv})"
46 * org.ofono.VoiceCallManager.GetCalls()
47 * org.ofono.NetworkRegistraion.GetOperators()
48 * org.ofono.NetworkRegistration.Scan()
49 * org.ofono.ConnectionManager.GetContexts()
50 * org.ofono.MessageManager.GetMessages()
52 struct OfonoPathProperties
55 QVariantMap properties;
58 Q_DECLARE_METATYPE ( OfonoPathProperties )
60 // Marshall the OfonoPathProperties data into a D-BUS argument
61 QDBusArgument &operator<<(QDBusArgument &argument,
62 const OfonoPathProperties &mystruct);
64 // Retrieve the CallHistoryEvent data from the D-BUS argument
65 const QDBusArgument &operator>>(const QDBusArgument &argument,
66 OfonoPathProperties &mystruct);
68 typedef QList< OfonoPathProperties > QArrayOfPathProperties;
70 Q_DECLARE_METATYPE ( QArrayOfPathProperties )
72 inline void registerMyDataTypes() {
73 qDBusRegisterMetaType< OfonoPathProperties >();
74 qDBusRegisterMetaType< QArrayOfPathProperties >();
75 qDBusRegisterMetaType< CallHistoryEvent >();
76 qDBusRegisterMetaType< QArrayOfHistoryEvent >();
79 #endif //DIALERDBUSTYPES_H
81 /* Local Variables: */
83 /* c-basic-offset:4 */
84 /* indent-tabs-mode: nil */