Merge lp:~unity-api-team/indicator-network/simplify-sniffer into lp:indicator-network/15.04

Proposed by Pete Woods
Status: Superseded
Proposed branch: lp:~unity-api-team/indicator-network/simplify-sniffer
Merge into: lp:indicator-network/15.04
Prerequisite: lp:~unity-api-team/indicator-network/flight-mode-toggle-crash
Diff against target: 2015 lines (+175/-1505)
33 files modified
CMakeLists.txt (+0/-2)
data/nm-manager.xml (+6/-0)
sniffer/nmaccesspoint.cpp (+0/-24)
sniffer/nmaccesspoint.h (+0/-83)
sniffer/nmactiveconnection.cpp (+0/-24)
sniffer/nmactiveconnection.h (+0/-80)
sniffer/nmconnsettings.cpp (+0/-24)
sniffer/nmconnsettings.h (+0/-71)
sniffer/nmroot.cpp (+0/-25)
sniffer/nmroot.h (+0/-198)
sniffer/nmsettings.cpp (+0/-25)
sniffer/nmsettings.h (+0/-80)
sniffer/nmwirelessdevice.cpp (+0/-24)
sniffer/nmwirelessdevice.h (+0/-84)
sniffer/ofonomodemmodem.cpp (+0/-25)
sniffer/ofonomodemmodem.h (+0/-56)
sniffer/ofonomodemnetworkregistration.cpp (+0/-24)
sniffer/ofonomodemnetworkregistration.h (+0/-68)
sniffer/ofonomodemsimmanager.cpp (+0/-25)
sniffer/ofonomodemsimmanager.h (+0/-98)
sniffer/ofonoroot.cpp (+0/-25)
sniffer/ofonoroot.h (+0/-54)
sniffer/qdbusdatatypes.h (+0/-31)
sniffer/urfkillroot.cpp (+0/-24)
sniffer/urfkillroot.h (+0/-109)
sniffer/urfkillswitch.cpp (+0/-25)
sniffer/urfkillswitch.h (+0/-47)
src/CMakeLists.txt (+1/-2)
src/sniffer/CMakeLists.txt (+10/-24)
src/sniffer/dbusdata.h (+0/-4)
src/sniffer/eventprinter.cpp (+66/-44)
src/sniffer/eventprinter.h (+25/-25)
src/sniffer/i-n-extractor.cpp (+67/-51)
To merge this branch: bzr merge lp:~unity-api-team/indicator-network/simplify-sniffer
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Indicator Applet Developers Pending
Review via email: mp+255484@code.launchpad.net

This proposal has been superseded by a proposal from 2015-04-20.

Commit message

Simplify sniffer code

Description of the change

Simplify sniffer code

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-03-24 13:08:26 +0000
3+++ CMakeLists.txt 2015-04-08 10:22:41 +0000
4@@ -123,8 +123,6 @@
5 enable_testing()
6 add_subdirectory(tests)
7
8-add_subdirectory(sniffer)
9-
10 ADD_CUSTOM_TARGET(
11 check
12 ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure
13
14=== modified file 'data/nm-manager.xml'
15--- data/nm-manager.xml 2015-03-11 13:25:40 +0000
16+++ data/nm-manager.xml 2015-04-08 10:22:41 +0000
17@@ -326,6 +326,12 @@
18 </tp:docstring>
19 </arg>
20 </signal>
21+
22+ <property name="Connectivity" type="u" access="read" tp:type="NM_CONNECTIVITY">
23+ <tp:docstring>
24+ The network connectivity state.
25+ </tp:docstring>
26+ </property>
27
28 <signal name="PropertiesChanged">
29 <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
30
31=== removed file 'sniffer/nmaccesspoint.cpp'
32--- sniffer/nmaccesspoint.cpp 2014-11-26 11:31:07 +0000
33+++ sniffer/nmaccesspoint.cpp 1970-01-01 00:00:00 +0000
34@@ -1,24 +0,0 @@
35-/*
36- * This file was generated by qdbusxml2cpp version 0.8
37- * Command line was: qdbusxml2cpp -N -p nmaccesspoint.h -c NetworkManagerAccessPoint nmaccesspoint.xml org.freedesktop.NetworkManager.AccessPoint
38- *
39- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
40- *
41- * This is an auto-generated file.
42- * Do not edit! All changes made to it will be lost.
43- */
44-
45-#include "nmaccesspoint.h"
46-
47-/*
48- * Implementation of interface class NetworkManagerAccessPoint
49- */
50-
51-NetworkManagerAccessPoint::NetworkManagerAccessPoint(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
52- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
53-{
54-}
55-
56-NetworkManagerAccessPoint::~NetworkManagerAccessPoint()
57-{
58-}
59
60=== removed file 'sniffer/nmaccesspoint.h'
61--- sniffer/nmaccesspoint.h 2014-11-26 11:31:07 +0000
62+++ sniffer/nmaccesspoint.h 1970-01-01 00:00:00 +0000
63@@ -1,83 +0,0 @@
64-/*
65- * This file was generated by qdbusxml2cpp version 0.8
66- * Command line was: qdbusxml2cpp -N -p nmaccesspoint.h -c NetworkManagerAccessPoint nmaccesspoint.xml org.freedesktop.NetworkManager.AccessPoint
67- *
68- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
69- *
70- * This is an auto-generated file.
71- * Do not edit! All changes made to it will be lost.
72- */
73-
74-#ifndef NMACCESSPOINT_H_1416391263
75-#define NMACCESSPOINT_H_1416391263
76-
77-#include <QtCore/QObject>
78-#include <QtCore/QByteArray>
79-#include <QtCore/QList>
80-#include <QtCore/QMap>
81-#include <QtCore/QString>
82-#include <QtCore/QStringList>
83-#include <QtCore/QVariant>
84-#include <QtDBus/QtDBus>
85-
86-/*
87- * Proxy class for interface org.freedesktop.NetworkManager.AccessPoint
88- */
89-class NetworkManagerAccessPoint: public QDBusAbstractInterface
90-{
91- Q_OBJECT
92-public:
93- static inline const char *staticInterfaceName()
94- { return "org.freedesktop.NetworkManager.AccessPoint"; }
95-
96-public:
97- NetworkManagerAccessPoint(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
98-
99- ~NetworkManagerAccessPoint();
100-
101- Q_PROPERTY(uint Flags READ flags)
102- inline uint flags() const
103- { return qvariant_cast< uint >(property("Flags")); }
104-
105- Q_PROPERTY(uint Frequency READ frequency)
106- inline uint frequency() const
107- { return qvariant_cast< uint >(property("Frequency")); }
108-
109- Q_PROPERTY(QString HwAddress READ hwAddress)
110- inline QString hwAddress() const
111- { return qvariant_cast< QString >(property("HwAddress")); }
112-
113- Q_PROPERTY(int LastSeen READ lastSeen)
114- inline int lastSeen() const
115- { return qvariant_cast< int >(property("LastSeen")); }
116-
117- Q_PROPERTY(uint MaxBitrate READ maxBitrate)
118- inline uint maxBitrate() const
119- { return qvariant_cast< uint >(property("MaxBitrate")); }
120-
121- Q_PROPERTY(uint Mode READ mode)
122- inline uint mode() const
123- { return qvariant_cast< uint >(property("Mode")); }
124-
125- Q_PROPERTY(uint RsnFlags READ rsnFlags)
126- inline uint rsnFlags() const
127- { return qvariant_cast< uint >(property("RsnFlags")); }
128-
129- Q_PROPERTY(QByteArray Ssid READ ssid)
130- inline QByteArray ssid() const
131- { return qvariant_cast< QByteArray >(property("Ssid")); }
132-
133- Q_PROPERTY(uchar Strength READ strength)
134- inline uchar strength() const
135- { return qvariant_cast< uchar >(property("Strength")); }
136-
137- Q_PROPERTY(uint WpaFlags READ wpaFlags)
138- inline uint wpaFlags() const
139- { return qvariant_cast< uint >(property("WpaFlags")); }
140-
141-public Q_SLOTS: // METHODS
142-Q_SIGNALS: // SIGNALS
143- void PropertiesChanged(const QVariantMap &in0);
144-};
145-
146-#endif
147
148=== removed file 'sniffer/nmactiveconnection.cpp'
149--- sniffer/nmactiveconnection.cpp 2014-11-26 11:31:07 +0000
150+++ sniffer/nmactiveconnection.cpp 1970-01-01 00:00:00 +0000
151@@ -1,24 +0,0 @@
152-/*
153- * This file was generated by qdbusxml2cpp version 0.8
154- * Command line was: qdbusxml2cpp -N -p nmactiveconnection.h -c NetworkManagerActiveConnection nmactiveconnection.xml org.freedesktop.NetworkManager.Connection.Active
155- *
156- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
157- *
158- * This is an auto-generated file.
159- * Do not edit! All changes made to it will be lost.
160- */
161-
162-#include "nmactiveconnection.h"
163-
164-/*
165- * Implementation of interface class NetworkManagerActiveConnection
166- */
167-
168-NetworkManagerActiveConnection::NetworkManagerActiveConnection(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
169- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
170-{
171-}
172-
173-NetworkManagerActiveConnection::~NetworkManagerActiveConnection()
174-{
175-}
176
177=== removed file 'sniffer/nmactiveconnection.h'
178--- sniffer/nmactiveconnection.h 2014-11-26 11:31:07 +0000
179+++ sniffer/nmactiveconnection.h 1970-01-01 00:00:00 +0000
180@@ -1,80 +0,0 @@
181-/*
182- * This file was generated by qdbusxml2cpp version 0.8
183- * Command line was: qdbusxml2cpp -N -p nmactiveconnection.h -c NetworkManagerActiveConnection nmactiveconnection.xml org.freedesktop.NetworkManager.Connection.Active
184- *
185- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
186- *
187- * This is an auto-generated file.
188- * Do not edit! All changes made to it will be lost.
189- */
190-
191-#ifndef NMACTIVECONNECTION_H_1416389726
192-#define NMACTIVECONNECTION_H_1416389726
193-
194-#include <QtCore/QObject>
195-#include <QtCore/QByteArray>
196-#include <QtCore/QList>
197-#include <QtCore/QMap>
198-#include <QtCore/QString>
199-#include <QtCore/QStringList>
200-#include <QtCore/QVariant>
201-#include <QtDBus/QtDBus>
202-
203-/*
204- * Proxy class for interface org.freedesktop.NetworkManager.Connection.Active
205- */
206-class NetworkManagerActiveConnection: public QDBusAbstractInterface
207-{
208- Q_OBJECT
209-public:
210- static inline const char *staticInterfaceName()
211- { return "org.freedesktop.NetworkManager.Connection.Active"; }
212-
213-public:
214- NetworkManagerActiveConnection(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
215-
216- ~NetworkManagerActiveConnection();
217-
218- Q_PROPERTY(QDBusObjectPath Connection READ connection)
219- inline QDBusObjectPath connection() const
220- { return qvariant_cast< QDBusObjectPath >(property("Connection")); }
221-
222- Q_PROPERTY(bool Default READ Default)
223- inline bool Default() const
224- { return qvariant_cast< bool >(property("Default")); }
225-
226- Q_PROPERTY(bool Default6 READ default6)
227- inline bool default6() const
228- { return qvariant_cast< bool >(property("Default6")); }
229-
230- Q_PROPERTY(QList<QDBusObjectPath> Devices READ devices)
231- inline QList<QDBusObjectPath> devices() const
232- { return qvariant_cast< QList<QDBusObjectPath> >(property("Devices")); }
233-
234- Q_PROPERTY(QDBusObjectPath Master READ master)
235- inline QDBusObjectPath master() const
236- { return qvariant_cast< QDBusObjectPath >(property("Master")); }
237-
238- Q_PROPERTY(QDBusObjectPath SpecificObject READ specificObject)
239- inline QDBusObjectPath specificObject() const
240- { return qvariant_cast< QDBusObjectPath >(property("SpecificObject")); }
241-
242- Q_PROPERTY(uint State READ state)
243- inline uint state() const
244- { return qvariant_cast< uint >(property("State")); }
245-
246- Q_PROPERTY(QString Uuid READ uuid)
247- inline QString uuid() const
248- { return qvariant_cast< QString >(property("Uuid")); }
249-
250- Q_PROPERTY(bool Vpn READ vpn)
251- inline bool vpn() const
252- { return qvariant_cast< bool >(property("Vpn")); }
253-
254-public Q_SLOTS: // METHODS
255-Q_SIGNALS: // SIGNALS
256- void PropertiesChanged(const QVariantMap &in0);
257-};
258-
259-#endif
260-
261
262=== removed file 'sniffer/nmconnsettings.cpp'
263--- sniffer/nmconnsettings.cpp 2014-11-26 11:31:07 +0000
264+++ sniffer/nmconnsettings.cpp 1970-01-01 00:00:00 +0000
265@@ -1,24 +0,0 @@
266-/*
267- * This file was generated by qdbusxml2cpp version 0.8
268- * Command line was: qdbusxml2cpp -N -p nmconnsettings.h -c NetworkManagerConnectionSettings nmconnsettings.xml org.freedesktop.NetworkManager.Settings.Connection
269- *
270- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
271- *
272- * This is an auto-generated file.
273- * Do not edit! All changes made to it will be lost.
274- */
275-
276-#include "nmconnsettings.h"
277-
278-/*
279- * Implementation of interface class NetworkManagerConnectionSettings
280- */
281-
282-NetworkManagerConnectionSettings::NetworkManagerConnectionSettings(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
283- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
284-{
285-}
286-
287-NetworkManagerConnectionSettings::~NetworkManagerConnectionSettings()
288-{
289-}
290
291=== removed file 'sniffer/nmconnsettings.h'
292--- sniffer/nmconnsettings.h 2014-11-26 11:31:07 +0000
293+++ sniffer/nmconnsettings.h 1970-01-01 00:00:00 +0000
294@@ -1,71 +0,0 @@
295-/*
296- * This file was generated by qdbusxml2cpp version 0.8
297- * Command line was: qdbusxml2cpp -N -p nmconnsettings.h -c NetworkManagerConnectionSettings nmconnsettings.xml org.freedesktop.NetworkManager.Settings.Connection
298- *
299- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
300- *
301- * This is an auto-generated file.
302- * Do not edit! All changes made to it will be lost.
303- */
304-
305-#ifndef NMCONNSETTINGS_H_1416388936
306-#define NMCONNSETTINGS_H_1416388936
307-
308-#include <QtCore/QObject>
309-#include <QtCore/QByteArray>
310-#include <QtCore/QList>
311-#include <QtCore/QMap>
312-#include <QtCore/QString>
313-#include <QtCore/QStringList>
314-#include <QtCore/QVariant>
315-#include <QtDBus/QtDBus>
316-#include "qdbusdatatypes.h"
317-
318-/*
319- * Proxy class for interface org.freedesktop.NetworkManager.Settings.Connection
320- */
321-class NetworkManagerConnectionSettings: public QDBusAbstractInterface
322-{
323- Q_OBJECT
324-public:
325- static inline const char *staticInterfaceName()
326- { return "org.freedesktop.NetworkManager.Settings.Connection"; }
327-
328-public:
329- NetworkManagerConnectionSettings(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
330-
331- ~NetworkManagerConnectionSettings();
332-
333-public Q_SLOTS: // METHODS
334- inline QDBusPendingReply<> Delete()
335- {
336- QList<QVariant> argumentList;
337- return asyncCallWithArgumentList(QLatin1String("Delete"), argumentList);
338- }
339-
340- inline QDBusPendingReply<QVariantDictMap> GetSecrets(const QString &setting_name)
341- {
342- QList<QVariant> argumentList;
343- argumentList << QVariant::fromValue(setting_name);
344- return asyncCallWithArgumentList(QLatin1String("GetSecrets"), argumentList);
345- }
346-
347- inline QDBusPendingReply<QVariantDictMap> GetSettings()
348- {
349- QList<QVariant> argumentList;
350- return asyncCallWithArgumentList(QLatin1String("GetSettings"), argumentList);
351- }
352-
353- inline QDBusPendingReply<> Update(const QVariantDictMap &properties)
354- {
355- QList<QVariant> argumentList;
356- argumentList << QVariant::fromValue(properties);
357- return asyncCallWithArgumentList(QLatin1String("Update"), argumentList);
358- }
359-
360-Q_SIGNALS: // SIGNALS
361- void Removed();
362- void Updated();
363-};
364-
365-#endif
366
367=== removed file 'sniffer/nmroot.cpp'
368--- sniffer/nmroot.cpp 2014-11-26 11:31:07 +0000
369+++ sniffer/nmroot.cpp 1970-01-01 00:00:00 +0000
370@@ -1,25 +0,0 @@
371-/*
372- * This file was generated by qdbusxml2cpp version 0.8
373- * Command line was: qdbusxml2cpp -N -p nmroot.h -c NetworkManagerRoot nmroot.xml org.freedesktop.NetworkManager
374- *
375- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
376- *
377- * This is an auto-generated file.
378- * Do not edit! All changes made to it will be lost.
379- */
380-
381-#include "nmroot.h"
382-
383-/*
384- * Implementation of interface class NetworkManagerRoot
385- */
386-
387-NetworkManagerRoot::NetworkManagerRoot(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
388- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
389-{
390-}
391-
392-NetworkManagerRoot::~NetworkManagerRoot()
393-{
394-}
395-
396
397=== removed file 'sniffer/nmroot.h'
398--- sniffer/nmroot.h 2014-11-26 11:31:07 +0000
399+++ sniffer/nmroot.h 1970-01-01 00:00:00 +0000
400@@ -1,198 +0,0 @@
401-/*
402- * This file was generated by qdbusxml2cpp version 0.8
403- * Command line was: qdbusxml2cpp -N -p nmroot.h -c NetworkManagerRoot nmroot.xml org.freedesktop.NetworkManager
404- *
405- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
406- *
407- * This is an auto-generated file.
408- * Do not edit! All changes made to it will be lost.
409- */
410-
411-#ifndef NMROOT_H_1416321839
412-#define NMROOT_H_1416321839
413-
414-#include <QtCore/QObject>
415-#include <QtCore/QByteArray>
416-#include <QtCore/QList>
417-#include <QtCore/QMap>
418-#include <QtCore/QString>
419-#include <QtCore/QStringList>
420-#include <QtCore/QVariant>
421-#include <QtDBus/QtDBus>
422-#include "qdbusdatatypes.h"
423-
424-/*
425- * Proxy class for interface org.freedesktop.NetworkManager
426- */
427-class NetworkManagerRoot: public QDBusAbstractInterface
428-{
429- Q_OBJECT
430-public:
431- static inline const char *staticInterfaceName()
432- { return "org.freedesktop.NetworkManager"; }
433-
434-public:
435- NetworkManagerRoot(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
436-
437- ~NetworkManagerRoot();
438-
439- Q_PROPERTY(QDBusObjectPath ActivatingConnection READ activatingConnection)
440- inline QDBusObjectPath activatingConnection() const
441- { return qvariant_cast< QDBusObjectPath >(property("ActivatingConnection")); }
442-
443- Q_PROPERTY(QList<QDBusObjectPath> ActiveConnections READ activeConnections)
444- inline QList<QDBusObjectPath> activeConnections() const
445- { return qvariant_cast< QList<QDBusObjectPath> >(property("ActiveConnections")); }
446-
447- Q_PROPERTY(uint Connectivity READ connectivity)
448- inline uint connectivity() const
449- { return qvariant_cast< uint >(property("Connectivity")); }
450-
451- Q_PROPERTY(bool NetworkingEnabled READ networkingEnabled)
452- inline bool networkingEnabled() const
453- { return qvariant_cast< bool >(property("NetworkingEnabled")); }
454-
455- Q_PROPERTY(QDBusObjectPath PrimaryConnection READ primaryConnection)
456- inline QDBusObjectPath primaryConnection() const
457- { return qvariant_cast< QDBusObjectPath >(property("PrimaryConnection")); }
458-
459- Q_PROPERTY(uint State READ state)
460- inline uint state() const
461- { return qvariant_cast< uint >(property("State")); }
462-
463- Q_PROPERTY(QString Version READ version)
464- inline QString version() const
465- { return qvariant_cast< QString >(property("Version")); }
466-
467- Q_PROPERTY(bool WimaxEnabled READ wimaxEnabled WRITE setWimaxEnabled)
468- inline bool wimaxEnabled() const
469- { return qvariant_cast< bool >(property("WimaxEnabled")); }
470- inline void setWimaxEnabled(bool value)
471- { setProperty("WimaxEnabled", QVariant::fromValue(value)); }
472-
473- Q_PROPERTY(bool WimaxHardwareEnabled READ wimaxHardwareEnabled)
474- inline bool wimaxHardwareEnabled() const
475- { return qvariant_cast< bool >(property("WimaxHardwareEnabled")); }
476-
477- Q_PROPERTY(bool WirelessEnabled READ wirelessEnabled WRITE setWirelessEnabled)
478- inline bool wirelessEnabled() const
479- { return qvariant_cast< bool >(property("WirelessEnabled")); }
480- inline void setWirelessEnabled(bool value)
481- { setProperty("WirelessEnabled", QVariant::fromValue(value)); }
482-
483- Q_PROPERTY(bool WirelessHardwareEnabled READ wirelessHardwareEnabled)
484- inline bool wirelessHardwareEnabled() const
485- { return qvariant_cast< bool >(property("WirelessHardwareEnabled")); }
486-
487- Q_PROPERTY(bool WwanEnabled READ wwanEnabled WRITE setWwanEnabled)
488- inline bool wwanEnabled() const
489- { return qvariant_cast< bool >(property("WwanEnabled")); }
490- inline void setWwanEnabled(bool value)
491- { setProperty("WwanEnabled", QVariant::fromValue(value)); }
492-
493- Q_PROPERTY(bool WwanHardwareEnabled READ wwanHardwareEnabled)
494- inline bool wwanHardwareEnabled() const
495- { return qvariant_cast< bool >(property("WwanHardwareEnabled")); }
496-
497-public Q_SLOTS: // METHODS
498- inline QDBusPendingReply<QDBusObjectPath> ActivateConnection(const QDBusObjectPath &connection, const QDBusObjectPath &device, const QDBusObjectPath &specific_object)
499- {
500- QList<QVariant> argumentList;
501- argumentList << QVariant::fromValue(connection) << QVariant::fromValue(device) << QVariant::fromValue(specific_object);
502- return asyncCallWithArgumentList(QLatin1String("ActivateConnection"), argumentList);
503- }
504-
505- inline QDBusPendingReply<QDBusObjectPath, QDBusObjectPath> AddAndActivateConnection(const QVariantDictMap &connection, const QDBusObjectPath &device, const QDBusObjectPath &specific_object)
506- {
507- QList<QVariant> argumentList;
508- argumentList << QVariant::fromValue(connection) << QVariant::fromValue(device) << QVariant::fromValue(specific_object);
509- return asyncCallWithArgumentList(QLatin1String("AddAndActivateConnection"), argumentList);
510- }
511- inline QDBusReply<QDBusObjectPath> AddAndActivateConnection(const QVariantDictMap &connection, const QDBusObjectPath &device, const QDBusObjectPath &specific_object, QDBusObjectPath &active_connection)
512- {
513- QList<QVariant> argumentList;
514- argumentList << QVariant::fromValue(connection) << QVariant::fromValue(device) << QVariant::fromValue(specific_object);
515- QDBusMessage reply = callWithArgumentList(QDBus::Block, QLatin1String("AddAndActivateConnection"), argumentList);
516- if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) {
517- active_connection = qdbus_cast<QDBusObjectPath>(reply.arguments().at(1));
518- }
519- return reply;
520- }
521-
522- inline QDBusPendingReply<uint> CheckConnectivity()
523- {
524- QList<QVariant> argumentList;
525- return asyncCallWithArgumentList(QLatin1String("CheckConnectivity"), argumentList);
526- }
527-
528- inline QDBusPendingReply<> DeactivateConnection(const QDBusObjectPath &active_connection)
529- {
530- QList<QVariant> argumentList;
531- argumentList << QVariant::fromValue(active_connection);
532- return asyncCallWithArgumentList(QLatin1String("DeactivateConnection"), argumentList);
533- }
534-
535- inline QDBusPendingReply<> Enable(bool enable)
536- {
537- QList<QVariant> argumentList;
538- argumentList << QVariant::fromValue(enable);
539- return asyncCallWithArgumentList(QLatin1String("Enable"), argumentList);
540- }
541-
542- inline QDBusPendingReply<QDBusObjectPath> GetDeviceByIpIface(const QString &iface)
543- {
544- QList<QVariant> argumentList;
545- argumentList << QVariant::fromValue(iface);
546- return asyncCallWithArgumentList(QLatin1String("GetDeviceByIpIface"), argumentList);
547- }
548-
549- inline QDBusPendingReply<QList<QDBusObjectPath> > GetDevices()
550- {
551- QList<QVariant> argumentList;
552- return asyncCallWithArgumentList(QLatin1String("GetDevices"), argumentList);
553- }
554-
555- inline QDBusPendingReply<QString, QString> GetLogging()
556- {
557- QList<QVariant> argumentList;
558- return asyncCallWithArgumentList(QLatin1String("GetLogging"), argumentList);
559- }
560- inline QDBusReply<QString> GetLogging(QString &domains)
561- {
562- QList<QVariant> argumentList;
563- QDBusMessage reply = callWithArgumentList(QDBus::Block, QLatin1String("GetLogging"), argumentList);
564- if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) {
565- domains = qdbus_cast<QString>(reply.arguments().at(1));
566- }
567- return reply;
568- }
569-
570- inline QDBusPendingReply<> SetLogging(const QString &level, const QString &domains)
571- {
572- QList<QVariant> argumentList;
573- argumentList << QVariant::fromValue(level) << QVariant::fromValue(domains);
574- return asyncCallWithArgumentList(QLatin1String("SetLogging"), argumentList);
575- }
576-
577- inline QDBusPendingReply<> Sleep(bool sleep)
578- {
579- QList<QVariant> argumentList;
580- argumentList << QVariant::fromValue(sleep);
581- return asyncCallWithArgumentList(QLatin1String("Sleep"), argumentList);
582- }
583-
584- inline QDBusPendingReply<uint> state()
585- {
586- QList<QVariant> argumentList;
587- return asyncCallWithArgumentList(QLatin1String("state"), argumentList);
588- }
589-
590-Q_SIGNALS: // SIGNALS
591- void CheckPermissions();
592- void DeviceAdded(const QDBusObjectPath &in0);
593- void DeviceRemoved(const QDBusObjectPath &in0);
594- void PropertiesChanged(const QVariantMap &in0);
595- void StateChanged(uint in0);
596-};
597-
598-#endif
599
600=== removed file 'sniffer/nmsettings.cpp'
601--- sniffer/nmsettings.cpp 2014-11-26 11:31:07 +0000
602+++ sniffer/nmsettings.cpp 1970-01-01 00:00:00 +0000
603@@ -1,25 +0,0 @@
604-/*
605- * This file was generated by qdbusxml2cpp version 0.8
606- * Command line was: qdbusxml2cpp -N -p nmsettings.h -c NetworkManagerSettings nmsettings.xml org.freedesktop.NetworkManager.Settings
607- *
608- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
609- *
610- * This is an auto-generated file.
611- * Do not edit! All changes made to it will be lost.
612- */
613-
614-#include "nmsettings.h"
615-
616-/*
617- * Implementation of interface class NetworkManagerSettings
618- */
619-
620-NetworkManagerSettings::NetworkManagerSettings(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
621- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
622-{
623-}
624-
625-NetworkManagerSettings::~NetworkManagerSettings()
626-{
627-}
628-
629
630=== removed file 'sniffer/nmsettings.h'
631--- sniffer/nmsettings.h 2014-11-26 11:31:07 +0000
632+++ sniffer/nmsettings.h 1970-01-01 00:00:00 +0000
633@@ -1,80 +0,0 @@
634-/*
635- * This file was generated by qdbusxml2cpp version 0.8
636- * Command line was: qdbusxml2cpp -N -p nmsettings.h -c NetworkManagerSettings nmsettings.xml org.freedesktop.NetworkManager.Settings
637- *
638- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
639- *
640- * This is an auto-generated file.
641- * Do not edit! All changes made to it will be lost.
642- */
643-
644-#ifndef NMSETTINGS_H_1416387935
645-#define NMSETTINGS_H_1416387935
646-
647-#include <QtCore/QObject>
648-#include <QtCore/QByteArray>
649-#include <QtCore/QList>
650-#include <QtCore/QMap>
651-#include <QtCore/QString>
652-#include <QtCore/QStringList>
653-#include <QtCore/QVariant>
654-#include <QtDBus/QtDBus>
655-#include "qdbusdatatypes.h"
656-
657-/*
658- * Proxy class for interface org.freedesktop.NetworkManager.Settings
659- */
660-class NetworkManagerSettings: public QDBusAbstractInterface
661-{
662- Q_OBJECT
663-public:
664- static inline const char *staticInterfaceName()
665- { return "org.freedesktop.NetworkManager.Settings"; }
666-
667-public:
668- NetworkManagerSettings(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
669-
670- ~NetworkManagerSettings();
671-
672- Q_PROPERTY(bool CanModify READ canModify)
673- inline bool canModify() const
674- { return qvariant_cast< bool >(property("CanModify")); }
675-
676- Q_PROPERTY(QString Hostname READ hostname)
677- inline QString hostname() const
678- { return qvariant_cast< QString >(property("Hostname")); }
679-
680-public Q_SLOTS: // METHODS
681- inline QDBusPendingReply<QDBusObjectPath> AddConnection(const QVariantDictMap &connection)
682- {
683- QList<QVariant> argumentList;
684- argumentList << QVariant::fromValue(connection);
685- return asyncCallWithArgumentList(QLatin1String("AddConnection"), argumentList);
686- }
687-
688- inline QDBusPendingReply<QDBusObjectPath> GetConnectionByUuid(const QString &uuid)
689- {
690- QList<QVariant> argumentList;
691- argumentList << QVariant::fromValue(uuid);
692- return asyncCallWithArgumentList(QLatin1String("GetConnectionByUuid"), argumentList);
693- }
694-
695- inline QDBusPendingReply<QList<QDBusObjectPath> > ListConnections()
696- {
697- QList<QVariant> argumentList;
698- return asyncCallWithArgumentList(QLatin1String("ListConnections"), argumentList);
699- }
700-
701- inline QDBusPendingReply<> SaveHostname(const QString &hostname)
702- {
703- QList<QVariant> argumentList;
704- argumentList << QVariant::fromValue(hostname);
705- return asyncCallWithArgumentList(QLatin1String("SaveHostname"), argumentList);
706- }
707-
708-Q_SIGNALS: // SIGNALS
709- void NewConnection(const QDBusObjectPath &in0);
710- void PropertiesChanged(const QVariantMap &in0);
711-};
712-
713-#endif
714
715=== removed file 'sniffer/nmwirelessdevice.cpp'
716--- sniffer/nmwirelessdevice.cpp 2014-11-26 11:31:07 +0000
717+++ sniffer/nmwirelessdevice.cpp 1970-01-01 00:00:00 +0000
718@@ -1,24 +0,0 @@
719-/*
720- * This file was generated by qdbusxml2cpp version 0.8
721- * Command line was: qdbusxml2cpp -N -p nmwirelessdevice.h -c NetworkManagerWirelessDevice nmwirelessdevice.xml org.freedesktop.NetworkManager.Device.Wireless
722- *
723- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
724- *
725- * This is an auto-generated file.
726- * Do not edit! All changes made to it will be lost.
727- */
728-
729-#include "nmwirelessdevice.h"
730-
731-/*
732- * Implementation of interface class NetworkManagerWirelessDevice
733- */
734-
735-NetworkManagerWirelessDevice::NetworkManagerWirelessDevice(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
736- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
737-{
738-}
739-
740-NetworkManagerWirelessDevice::~NetworkManagerWirelessDevice()
741-{
742-}
743
744=== removed file 'sniffer/nmwirelessdevice.h'
745--- sniffer/nmwirelessdevice.h 2014-11-26 11:31:07 +0000
746+++ sniffer/nmwirelessdevice.h 1970-01-01 00:00:00 +0000
747@@ -1,84 +0,0 @@
748-/*
749- * This file was generated by qdbusxml2cpp version 0.8
750- * Command line was: qdbusxml2cpp -N -p nmwirelessdevice.h -c NetworkManagerWirelessDevice nmwirelessdevice.xml org.freedesktop.NetworkManager.Device.Wireless
751- *
752- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
753- *
754- * This is an auto-generated file.
755- * Do not edit! All changes made to it will be lost.
756- */
757-
758-#ifndef NMWIRELESSDEVICE_H_1416390426
759-#define NMWIRELESSDEVICE_H_1416390426
760-
761-#include <QtCore/QObject>
762-#include <QtCore/QByteArray>
763-#include <QtCore/QList>
764-#include <QtCore/QMap>
765-#include <QtCore/QString>
766-#include <QtCore/QStringList>
767-#include <QtCore/QVariant>
768-#include <QtDBus/QtDBus>
769-
770-/*
771- * Proxy class for interface org.freedesktop.NetworkManager.Device.Wireless
772- */
773-class NetworkManagerWirelessDevice: public QDBusAbstractInterface
774-{
775- Q_OBJECT
776-public:
777- static inline const char *staticInterfaceName()
778- { return "org.freedesktop.NetworkManager.Device.Wireless"; }
779-
780-public:
781- NetworkManagerWirelessDevice(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
782-
783- ~NetworkManagerWirelessDevice();
784-
785- Q_PROPERTY(QDBusObjectPath ActiveAccessPoint READ activeAccessPoint)
786- inline QDBusObjectPath activeAccessPoint() const
787- { return qvariant_cast< QDBusObjectPath >(property("ActiveAccessPoint")); }
788-
789- Q_PROPERTY(uint Bitrate READ bitrate)
790- inline uint bitrate() const
791- { return qvariant_cast< uint >(property("Bitrate")); }
792-
793- Q_PROPERTY(QString HwAddress READ hwAddress)
794- inline QString hwAddress() const
795- { return qvariant_cast< QString >(property("HwAddress")); }
796-
797- Q_PROPERTY(uint Mode READ mode)
798- inline uint mode() const
799- { return qvariant_cast< uint >(property("Mode")); }
800-
801- Q_PROPERTY(QString PermHwAddress READ permHwAddress)
802- inline QString permHwAddress() const
803- { return qvariant_cast< QString >(property("PermHwAddress")); }
804-
805- Q_PROPERTY(uint WirelessCapabilities READ wirelessCapabilities)
806- inline uint wirelessCapabilities() const
807- { return qvariant_cast< uint >(property("WirelessCapabilities")); }
808-
809-public Q_SLOTS: // METHODS
810- inline QDBusPendingReply<QList<QDBusObjectPath> > GetAccessPoints()
811- {
812- QList<QVariant> argumentList;
813- return asyncCallWithArgumentList(QLatin1String("GetAccessPoints"), argumentList);
814- }
815-
816- inline QDBusPendingReply<> RequestScan(const QVariantMap &options)
817- {
818- QList<QVariant> argumentList;
819- argumentList << QVariant::fromValue(options);
820- return asyncCallWithArgumentList(QLatin1String("RequestScan"), argumentList);
821- }
822-
823-Q_SIGNALS: // SIGNALS
824- void AccessPointAdded(const QDBusObjectPath &in0);
825- void AccessPointRemoved(const QDBusObjectPath &in0);
826- void PropertiesChanged(const QVariantMap &in0);
827- void ScanDone();
828-};
829-
830-#endif
831-
832
833=== removed file 'sniffer/ofonomodemmodem.cpp'
834--- sniffer/ofonomodemmodem.cpp 2014-11-26 11:31:07 +0000
835+++ sniffer/ofonomodemmodem.cpp 1970-01-01 00:00:00 +0000
836@@ -1,25 +0,0 @@
837-/*
838- * This file was generated by qdbusxml2cpp version 0.8
839- * Command line was: qdbusxml2cpp -N -p ofonomodemmodem.h -c OfonoModemModem ofonomodem.xml org.ofono.Modem
840- *
841- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
842- *
843- * This is an auto-generated file.
844- * Do not edit! All changes made to it will be lost.
845- */
846-
847-#include "ofonomodemmodem.h"
848-
849-/*
850- * Implementation of interface class OfonoModemModem
851- */
852-
853-OfonoModemModem::OfonoModemModem(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
854- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
855-{
856-}
857-
858-OfonoModemModem::~OfonoModemModem()
859-{
860-}
861-
862
863=== removed file 'sniffer/ofonomodemmodem.h'
864--- sniffer/ofonomodemmodem.h 2014-11-26 11:31:07 +0000
865+++ sniffer/ofonomodemmodem.h 1970-01-01 00:00:00 +0000
866@@ -1,56 +0,0 @@
867-/*
868- * This file was generated by qdbusxml2cpp version 0.8
869- * Command line was: qdbusxml2cpp -N -p ofonomodemmodem.h -c OfonoModemModem ofonomodem.xml org.ofono.Modem
870- *
871- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
872- *
873- * This is an auto-generated file.
874- * Do not edit! All changes made to it will be lost.
875- */
876-
877-#ifndef OFONOMODEMMODEM_H_1416473283
878-#define OFONOMODEMMODEM_H_1416473283
879-
880-#include <QtCore/QObject>
881-#include <QtCore/QByteArray>
882-#include <QtCore/QList>
883-#include <QtCore/QMap>
884-#include <QtCore/QString>
885-#include <QtCore/QStringList>
886-#include <QtCore/QVariant>
887-#include <QtDBus/QtDBus>
888-
889-/*
890- * Proxy class for interface org.ofono.Modem
891- */
892-class OfonoModemModem: public QDBusAbstractInterface
893-{
894- Q_OBJECT
895-public:
896- static inline const char *staticInterfaceName()
897- { return "org.ofono.Modem"; }
898-
899-public:
900- OfonoModemModem(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
901-
902- ~OfonoModemModem();
903-
904-public Q_SLOTS: // METHODS
905- inline QDBusPendingReply<QVariantMap> GetProperties()
906- {
907- QList<QVariant> argumentList;
908- return asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList);
909- }
910-
911- inline QDBusPendingReply<> SetProperty(const QString &property, const QDBusVariant &value)
912- {
913- QList<QVariant> argumentList;
914- argumentList << QVariant::fromValue(property) << QVariant::fromValue(value);
915- return asyncCallWithArgumentList(QLatin1String("SetProperty"), argumentList);
916- }
917-
918-Q_SIGNALS: // SIGNALS
919- void PropertyChanged(const QString &name, const QDBusVariant &value);
920-};
921-
922-#endif
923
924=== removed file 'sniffer/ofonomodemnetworkregistration.cpp'
925--- sniffer/ofonomodemnetworkregistration.cpp 2014-11-26 11:31:07 +0000
926+++ sniffer/ofonomodemnetworkregistration.cpp 1970-01-01 00:00:00 +0000
927@@ -1,24 +0,0 @@
928-/*
929- * This file was generated by qdbusxml2cpp version 0.8
930- * Command line was: qdbusxml2cpp -N -p ofonomodemnetworkregistration.h -c OfonoModemNetworkRegistration ofonomodem.xml org.ofono.NetworkRegistration
931- *
932- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
933- *
934- * This is an auto-generated file.
935- * Do not edit! All changes made to it will be lost.
936- */
937-
938-#include "ofonomodemnetworkregistration.h"
939-
940-/*
941- * Implementation of interface class OfonoModemNetworkRegistration
942- */
943-
944-OfonoModemNetworkRegistration::OfonoModemNetworkRegistration(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
945- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
946-{
947-}
948-
949-OfonoModemNetworkRegistration::~OfonoModemNetworkRegistration()
950-{
951-}
952
953=== removed file 'sniffer/ofonomodemnetworkregistration.h'
954--- sniffer/ofonomodemnetworkregistration.h 2014-11-26 11:31:07 +0000
955+++ sniffer/ofonomodemnetworkregistration.h 1970-01-01 00:00:00 +0000
956@@ -1,68 +0,0 @@
957-/*
958- * This file was generated by qdbusxml2cpp version 0.8
959- * Command line was: qdbusxml2cpp -N -p ofonomodemnetworkregistration.h -c OfonoModemNetworkRegistration ofonomodem.xml org.ofono.NetworkRegistration
960- *
961- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
962- *
963- * This is an auto-generated file.
964- * Do not edit! All changes made to it will be lost.
965- */
966-
967-#ifndef OFONOMODEMNETWORKREGISTRATION_H_1416489111
968-#define OFONOMODEMNETWORKREGISTRATION_H_1416489111
969-
970-#include <QtCore/QObject>
971-#include <QtCore/QByteArray>
972-#include <QtCore/QList>
973-#include <QtCore/QMap>
974-#include <QtCore/QString>
975-#include <QtCore/QStringList>
976-#include <QtCore/QVariant>
977-#include <QtDBus/QtDBus>
978-#include "qdbusdatatypes.h"
979-
980-/*
981- * Proxy class for interface org.ofono.NetworkRegistration
982- */
983-class OfonoModemNetworkRegistration: public QDBusAbstractInterface
984-{
985- Q_OBJECT
986-public:
987- static inline const char *staticInterfaceName()
988- { return "org.ofono.NetworkRegistration"; }
989-
990-public:
991- OfonoModemNetworkRegistration(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
992-
993- ~OfonoModemNetworkRegistration();
994-
995-public Q_SLOTS: // METHODS
996- inline QDBusPendingReply<OfonoObjectPropertyList> GetOperators()
997- {
998- QList<QVariant> argumentList;
999- return asyncCallWithArgumentList(QLatin1String("GetOperators"), argumentList);
1000- }
1001-
1002- inline QDBusPendingReply<QVariantMap> GetProperties()
1003- {
1004- QList<QVariant> argumentList;
1005- return asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList);
1006- }
1007-
1008- inline QDBusPendingReply<> Register()
1009- {
1010- QList<QVariant> argumentList;
1011- return asyncCallWithArgumentList(QLatin1String("Register"), argumentList);
1012- }
1013-
1014- inline QDBusPendingReply<OfonoObjectPropertyList> Scan()
1015- {
1016- QList<QVariant> argumentList;
1017- return asyncCallWithArgumentList(QLatin1String("Scan"), argumentList);
1018- }
1019-
1020-Q_SIGNALS: // SIGNALS
1021- void PropertyChanged(const QString &name, const QDBusVariant &value);
1022-};
1023-
1024-#endif
1025
1026=== removed file 'sniffer/ofonomodemsimmanager.cpp'
1027--- sniffer/ofonomodemsimmanager.cpp 2014-11-26 11:31:07 +0000
1028+++ sniffer/ofonomodemsimmanager.cpp 1970-01-01 00:00:00 +0000
1029@@ -1,25 +0,0 @@
1030-/*
1031- * This file was generated by qdbusxml2cpp version 0.8
1032- * Command line was: qdbusxml2cpp -N -p ofonomodemsimmanager.h -c OfonoModemSimManager ofonomodem.xml org.ofono.SimManager
1033- *
1034- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
1035- *
1036- * This is an auto-generated file.
1037- * Do not edit! All changes made to it will be lost.
1038- */
1039-
1040-#include "ofonomodemsimmanager.h"
1041-
1042-/*
1043- * Implementation of interface class OfonoModemSimManager
1044- */
1045-
1046-OfonoModemSimManager::OfonoModemSimManager(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
1047- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
1048-{
1049-}
1050-
1051-OfonoModemSimManager::~OfonoModemSimManager()
1052-{
1053-}
1054-
1055
1056=== removed file 'sniffer/ofonomodemsimmanager.h'
1057--- sniffer/ofonomodemsimmanager.h 2014-11-26 11:31:07 +0000
1058+++ sniffer/ofonomodemsimmanager.h 1970-01-01 00:00:00 +0000
1059@@ -1,98 +0,0 @@
1060-/*
1061- * This file was generated by qdbusxml2cpp version 0.8
1062- * Command line was: qdbusxml2cpp -N -p ofonomodemsimmanager.h -c OfonoModemSimManager ofonomodem.xml org.ofono.SimManager
1063- *
1064- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
1065- *
1066- * This is an auto-generated file.
1067- * Do not edit! All changes made to it will be lost.
1068- */
1069-
1070-#ifndef OFONOMODEMSIMMANAGER_H_1416485549
1071-#define OFONOMODEMSIMMANAGER_H_1416485549
1072-
1073-#include <QtCore/QObject>
1074-#include <QtCore/QByteArray>
1075-#include <QtCore/QList>
1076-#include <QtCore/QMap>
1077-#include <QtCore/QString>
1078-#include <QtCore/QStringList>
1079-#include <QtCore/QVariant>
1080-#include <QtDBus/QtDBus>
1081-
1082-/*
1083- * Proxy class for interface org.ofono.SimManager
1084- */
1085-class OfonoModemSimManager: public QDBusAbstractInterface
1086-{
1087- Q_OBJECT
1088-public:
1089- static inline const char *staticInterfaceName()
1090- { return "org.ofono.SimManager"; }
1091-
1092-public:
1093- OfonoModemSimManager(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
1094-
1095- ~OfonoModemSimManager();
1096-
1097-public Q_SLOTS: // METHODS
1098- inline QDBusPendingReply<> ChangePin(const QString &type, const QString &oldpin, const QString &newpin)
1099- {
1100- QList<QVariant> argumentList;
1101- argumentList << QVariant::fromValue(type) << QVariant::fromValue(oldpin) << QVariant::fromValue(newpin);
1102- return asyncCallWithArgumentList(QLatin1String("ChangePin"), argumentList);
1103- }
1104-
1105- inline QDBusPendingReply<> EnterPin(const QString &type, const QString &pin)
1106- {
1107- QList<QVariant> argumentList;
1108- argumentList << QVariant::fromValue(type) << QVariant::fromValue(pin);
1109- return asyncCallWithArgumentList(QLatin1String("EnterPin"), argumentList);
1110- }
1111-
1112- inline QDBusPendingReply<QByteArray> GetIcon(uchar id)
1113- {
1114- QList<QVariant> argumentList;
1115- argumentList << QVariant::fromValue(id);
1116- return asyncCallWithArgumentList(QLatin1String("GetIcon"), argumentList);
1117- }
1118-
1119- inline QDBusPendingReply<QVariantMap> GetProperties()
1120- {
1121- QList<QVariant> argumentList;
1122- return asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList);
1123- }
1124-
1125- inline QDBusPendingReply<> LockPin(const QString &type, const QString &pin)
1126- {
1127- QList<QVariant> argumentList;
1128- argumentList << QVariant::fromValue(type) << QVariant::fromValue(pin);
1129- return asyncCallWithArgumentList(QLatin1String("LockPin"), argumentList);
1130- }
1131-
1132- inline QDBusPendingReply<> ResetPin(const QString &type, const QString &puk, const QString &newpin)
1133- {
1134- QList<QVariant> argumentList;
1135- argumentList << QVariant::fromValue(type) << QVariant::fromValue(puk) << QVariant::fromValue(newpin);
1136- return asyncCallWithArgumentList(QLatin1String("ResetPin"), argumentList);
1137- }
1138-
1139- inline QDBusPendingReply<> SetProperty(const QString &property, const QDBusVariant &value)
1140- {
1141- QList<QVariant> argumentList;
1142- argumentList << QVariant::fromValue(property) << QVariant::fromValue(value);
1143- return asyncCallWithArgumentList(QLatin1String("SetProperty"), argumentList);
1144- }
1145-
1146- inline QDBusPendingReply<> UnlockPin(const QString &type, const QString &pin)
1147- {
1148- QList<QVariant> argumentList;
1149- argumentList << QVariant::fromValue(type) << QVariant::fromValue(pin);
1150- return asyncCallWithArgumentList(QLatin1String("UnlockPin"), argumentList);
1151- }
1152-
1153-Q_SIGNALS: // SIGNALS
1154- void PropertyChanged(const QString &name, const QDBusVariant &value);
1155-};
1156-
1157-#endif
1158
1159=== removed file 'sniffer/ofonoroot.cpp'
1160--- sniffer/ofonoroot.cpp 2014-11-26 11:31:07 +0000
1161+++ sniffer/ofonoroot.cpp 1970-01-01 00:00:00 +0000
1162@@ -1,25 +0,0 @@
1163-/*
1164- * This file was generated by qdbusxml2cpp version 0.8
1165- * Command line was: qdbusxml2cpp -N -p ofonoroot.h -c OfonoRoot ofonoroot.xml org.ofono.Manager
1166- *
1167- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
1168- *
1169- * This is an auto-generated file.
1170- * Do not edit! All changes made to it will be lost.
1171- */
1172-
1173-#include "ofonoroot.h"
1174-
1175-/*
1176- * Implementation of interface class OfonoRoot
1177- */
1178-
1179-OfonoRoot::OfonoRoot(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
1180- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
1181-{
1182-}
1183-
1184-OfonoRoot::~OfonoRoot()
1185-{
1186-}
1187-
1188
1189=== removed file 'sniffer/ofonoroot.h'
1190--- sniffer/ofonoroot.h 2014-11-26 11:31:07 +0000
1191+++ sniffer/ofonoroot.h 1970-01-01 00:00:00 +0000
1192@@ -1,54 +0,0 @@
1193-/*
1194- * This file was generated by qdbusxml2cpp version 0.8
1195- * Command line was: qdbusxml2cpp -N -p ofonoroot.h -c OfonoRoot ofonoroot.xml org.ofono.Manager
1196- *
1197- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
1198- *
1199- * This is an auto-generated file.
1200- * Do not edit! All changes made to it will be lost.
1201- */
1202-
1203-#ifndef OFONOROOT_H_1416325045
1204-#define OFONOROOT_H_1416325045
1205-
1206-#include <QtCore/QObject>
1207-#include <QtCore/QByteArray>
1208-#include <QtCore/QList>
1209-#include <QtCore/QMap>
1210-#include <QtCore/QString>
1211-#include <QtCore/QStringList>
1212-#include <QtCore/QVariant>
1213-#include <QtDBus/QtDBus>
1214-
1215-#include <QDBusMetaType>
1216-#include "qdbusdatatypes.h"
1217-
1218-/*
1219- * Proxy class for interface org.ofono.Manager
1220- */
1221-class OfonoRoot: public QDBusAbstractInterface
1222-{
1223- Q_OBJECT
1224-public:
1225- static inline const char *staticInterfaceName()
1226- { return "org.ofono.Manager"; }
1227-
1228-public:
1229- OfonoRoot(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
1230-
1231- ~OfonoRoot();
1232-
1233-public Q_SLOTS: // METHODS
1234- inline QDBusPendingReply<ModemPropertyList> GetModems()
1235- {
1236- QList<QVariant> argumentList;
1237- return asyncCallWithArgumentList(QLatin1String("GetModems"), argumentList);
1238- }
1239-
1240-Q_SIGNALS: // SIGNALS
1241- void ModemAdded(const QDBusObjectPath &path, const QVariantMap &properties);
1242- void ModemRemoved(const QDBusObjectPath &path);
1243-};
1244-
1245-#endif
1246-
1247
1248=== removed file 'sniffer/qdbusdatatypes.h'
1249--- sniffer/qdbusdatatypes.h 2014-11-26 11:31:07 +0000
1250+++ sniffer/qdbusdatatypes.h 1970-01-01 00:00:00 +0000
1251@@ -1,31 +0,0 @@
1252-/*
1253- * Copyright (C) 2014 Canonical, Ltd.
1254- *
1255- * This program is free software: you can redistribute it and/or modify it
1256- * under the terms of the GNU General Public License version 3, as published
1257- * by the Free Software Foundation.
1258- *
1259- * This program is distributed in the hope that it will be useful, but
1260- * WITHOUT ANY WARRANTY; without even the implied warranties of
1261- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1262- * PURPOSE. See the GNU General Public License for more details.
1263- *
1264- * You should have received a copy of the GNU General Public License along
1265- * with this program. If not, see <http://www.gnu.org/licenses/>.
1266- *
1267- * Authors:
1268- * Jussi Pakkanen <jussi.pakkanen@canonical.com>
1269- */
1270-
1271-#pragma once
1272-
1273-#include <QDBusMetaType>
1274-#include <QMap>
1275-
1276-typedef QMap<QString, QVariantMap> QVariantDictMap;
1277-Q_DECLARE_METATYPE(QVariantDictMap)
1278-
1279-typedef QVector<QPair<QDBusObjectPath, QVariantMap>> ModemPropertyList;
1280-Q_DECLARE_METATYPE(ModemPropertyList)
1281-
1282-typedef ModemPropertyList OfonoObjectPropertyList;
1283
1284=== removed file 'sniffer/urfkillroot.cpp'
1285--- sniffer/urfkillroot.cpp 2014-11-26 11:31:07 +0000
1286+++ sniffer/urfkillroot.cpp 1970-01-01 00:00:00 +0000
1287@@ -1,24 +0,0 @@
1288-/*
1289- * This file was generated by qdbusxml2cpp version 0.8
1290- * Command line was: qdbusxml2cpp -p urfkillroot.h -c UrfkillRoot urfkill.xml org.freedesktop.URfkill
1291- *
1292- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
1293- *
1294- * This is an auto-generated file.
1295- * Do not edit! All changes made to it will be lost.
1296- */
1297-
1298-#include "urfkillroot.h"
1299-
1300-/*
1301- * Implementation of interface class UrfkillRoot
1302- */
1303-
1304-UrfkillRoot::UrfkillRoot(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
1305- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
1306-{
1307-}
1308-
1309-UrfkillRoot::~UrfkillRoot()
1310-{
1311-}
1312
1313=== removed file 'sniffer/urfkillroot.h'
1314--- sniffer/urfkillroot.h 2014-11-26 11:31:07 +0000
1315+++ sniffer/urfkillroot.h 1970-01-01 00:00:00 +0000
1316@@ -1,109 +0,0 @@
1317-/*
1318- * This file was generated by qdbusxml2cpp version 0.8
1319- * Command line was: qdbusxml2cpp -p urfkillroot.h -c UrfkillRoot urfkill.xml org.freedesktop.URfkill
1320- *
1321- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
1322- *
1323- * This is an auto-generated file.
1324- * Do not edit! All changes made to it will be lost.
1325- */
1326-
1327-#ifndef URFKILLROOT_H_1416318290
1328-#define URFKILLROOT_H_1416318290
1329-
1330-#include <QtCore/QObject>
1331-#include <QtCore/QByteArray>
1332-#include <QtCore/QList>
1333-#include <QtCore/QMap>
1334-#include <QtCore/QString>
1335-#include <QtCore/QStringList>
1336-#include <QtCore/QVariant>
1337-#include <QtDBus/QtDBus>
1338-
1339-/*
1340- * Proxy class for interface org.freedesktop.URfkill
1341- */
1342-class UrfkillRoot: public QDBusAbstractInterface
1343-{
1344- Q_OBJECT
1345-public:
1346- static inline const char *staticInterfaceName()
1347- { return "org.freedesktop.URfkill"; }
1348-
1349-public:
1350- UrfkillRoot(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
1351-
1352- ~UrfkillRoot();
1353-
1354- Q_PROPERTY(QString DaemonVersion READ daemonVersion)
1355- inline QString daemonVersion() const
1356- { return qvariant_cast< QString >(property("DaemonVersion")); }
1357-
1358- Q_PROPERTY(bool KeyControl READ keyControl)
1359- inline bool keyControl() const
1360- { return qvariant_cast< bool >(property("KeyControl")); }
1361-
1362-public Q_SLOTS: // METHODS
1363- inline QDBusPendingReply<bool> Block(uint type, bool block)
1364- {
1365- QList<QVariant> argumentList;
1366- argumentList << QVariant::fromValue(type) << QVariant::fromValue(block);
1367- return asyncCallWithArgumentList(QLatin1String("Block"), argumentList);
1368- }
1369-
1370- inline QDBusPendingReply<bool> BlockIdx(uint index, bool block)
1371- {
1372- QList<QVariant> argumentList;
1373- argumentList << QVariant::fromValue(index) << QVariant::fromValue(block);
1374- return asyncCallWithArgumentList(QLatin1String("BlockIdx"), argumentList);
1375- }
1376-
1377- inline QDBusPendingReply<QList<QDBusObjectPath> > EnumerateDevices()
1378- {
1379- QList<QVariant> argumentList;
1380- return asyncCallWithArgumentList(QLatin1String("EnumerateDevices"), argumentList);
1381- }
1382-
1383- inline QDBusPendingReply<bool> FlightMode(bool block)
1384- {
1385- QList<QVariant> argumentList;
1386- argumentList << QVariant::fromValue(block);
1387- return asyncCallWithArgumentList(QLatin1String("FlightMode"), argumentList);
1388- }
1389-
1390- inline QDBusPendingReply<uint> Inhibit(const QString &reason)
1391- {
1392- QList<QVariant> argumentList;
1393- argumentList << QVariant::fromValue(reason);
1394- return asyncCallWithArgumentList(QLatin1String("Inhibit"), argumentList);
1395- }
1396-
1397- inline QDBusPendingReply<bool> IsFlightMode()
1398- {
1399- QList<QVariant> argumentList;
1400- return asyncCallWithArgumentList(QLatin1String("IsFlightMode"), argumentList);
1401- }
1402-
1403- inline QDBusPendingReply<bool> IsInhibited()
1404- {
1405- QList<QVariant> argumentList;
1406- return asyncCallWithArgumentList(QLatin1String("IsInhibited"), argumentList);
1407- }
1408-
1409- inline QDBusPendingReply<> Uninhibit(uint inhibit_cookie)
1410- {
1411- QList<QVariant> argumentList;
1412- argumentList << QVariant::fromValue(inhibit_cookie);
1413- return asyncCallWithArgumentList(QLatin1String("Uninhibit"), argumentList);
1414- }
1415-
1416-Q_SIGNALS: // SIGNALS
1417- void DeviceAdded(const QDBusObjectPath &device);
1418- void DeviceChanged(const QDBusObjectPath &device);
1419- void DeviceRemoved(const QDBusObjectPath &device);
1420- void FlightModeChanged(bool flight_mode);
1421- void UrfkeyPressed(int keycode);
1422-};
1423-
1424-#endif
1425-
1426
1427=== removed file 'sniffer/urfkillswitch.cpp'
1428--- sniffer/urfkillswitch.cpp 2014-11-26 11:31:07 +0000
1429+++ sniffer/urfkillswitch.cpp 1970-01-01 00:00:00 +0000
1430@@ -1,25 +0,0 @@
1431-/*
1432- * This file was generated by qdbusxml2cpp version 0.8
1433- * Command line was: qdbusxml2cpp -p urfkillwlan.h -c UrfkillWlan urfkillwlan.xml org.freedesktop.URfkill.Killswitch
1434- *
1435- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
1436- *
1437- * This is an auto-generated file.
1438- * Do not edit! All changes made to it will be lost.
1439- */
1440-
1441-#include "urfkillswitch.h"
1442-
1443-/*
1444- * Implementation of interface class UrfkillWlan
1445- */
1446-
1447-UrfkillSwitch::UrfkillSwitch(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
1448- : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
1449-{
1450-}
1451-
1452-UrfkillSwitch::~UrfkillSwitch()
1453-{
1454-}
1455-
1456
1457=== removed file 'sniffer/urfkillswitch.h'
1458--- sniffer/urfkillswitch.h 2014-11-26 11:31:07 +0000
1459+++ sniffer/urfkillswitch.h 1970-01-01 00:00:00 +0000
1460@@ -1,47 +0,0 @@
1461-/*
1462- * This file was generated by qdbusxml2cpp version 0.8
1463- * Command line was: qdbusxml2cpp -p urfkillwlan.h -c UrfkillWlan urfkillwlan.xml org.freedesktop.URfkill.Killswitch
1464- *
1465- * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
1466- *
1467- * This is an auto-generated file.
1468- * Do not edit! All changes made to it will be lost.
1469- */
1470-
1471-#ifndef URFKILLWLAN_H_1416319828
1472-#define URFKILLWLAN_H_1416319828
1473-
1474-#include <QtCore/QObject>
1475-#include <QtCore/QByteArray>
1476-#include <QtCore/QList>
1477-#include <QtCore/QMap>
1478-#include <QtCore/QString>
1479-#include <QtCore/QStringList>
1480-#include <QtCore/QVariant>
1481-#include <QtDBus/QtDBus>
1482-
1483-/*
1484- * Proxy class for interface org.freedesktop.URfkill.Killswitch
1485- */
1486-class UrfkillSwitch: public QDBusAbstractInterface
1487-{
1488- Q_OBJECT
1489-public:
1490- static inline const char *staticInterfaceName()
1491- { return "org.freedesktop.URfkill.Killswitch"; }
1492-
1493-public:
1494- UrfkillSwitch(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
1495-
1496- ~UrfkillSwitch();
1497-
1498- Q_PROPERTY(int state READ state)
1499- inline int state() const
1500- { return qvariant_cast< int >(property("state")); }
1501-
1502-public Q_SLOTS: // METHODS
1503-Q_SIGNALS: // SIGNALS
1504- void StateChanged();
1505-};
1506-
1507-#endif
1508
1509=== modified file 'src/CMakeLists.txt'
1510--- src/CMakeLists.txt 2015-03-20 15:24:02 +0000
1511+++ src/CMakeLists.txt 2015-04-08 10:22:41 +0000
1512@@ -3,11 +3,10 @@
1513 set(COMMON_FLAGS "${COMMON_FLAGS} -Werror")
1514 endif()
1515
1516-#add_subdirectory(dbus-cpp)
1517-#add_subdirectory(connectivity-cpp)
1518 add_subdirectory(indicator)
1519 add_subdirectory(menumodel-cpp)
1520 add_subdirectory(qdbus-stubs)
1521 add_subdirectory(notify-cpp)
1522 add_subdirectory(secret-agent)
1523+add_subdirectory(sniffer)
1524 add_subdirectory(url-dispatcher-cpp)
1525
1526=== renamed directory 'sniffer' => 'src/sniffer'
1527=== modified file 'src/sniffer/CMakeLists.txt'
1528--- sniffer/CMakeLists.txt 2015-03-12 14:59:57 +0000
1529+++ src/sniffer/CMakeLists.txt 2015-04-08 10:22:41 +0000
1530@@ -1,35 +1,21 @@
1531+
1532+include_directories("${CMAKE_BINARY_DIR}/src/qdbus-stubs")
1533+include_directories("${CMAKE_SOURCE_DIR}/src/qdbus-stubs")
1534+
1535 add_executable(i-n-sniffer
1536 eventprinter.cpp
1537 eventprinter.h
1538 i-n-extractor.cpp
1539-nmaccesspoint.cpp
1540-nmaccesspoint.h
1541-nmactiveconnection.cpp
1542-nmactiveconnection.h
1543-nmconnsettings.cpp
1544-nmconnsettings.h
1545-nmroot.cpp
1546-nmroot.h
1547-nmsettings.cpp
1548-nmsettings.h
1549-nmwirelessdevice.cpp
1550-nmwirelessdevice.h
1551-ofonomodemmodem.cpp
1552-ofonomodemmodem.h
1553-ofonomodemnetworkregistration.cpp
1554-ofonomodemnetworkregistration.h
1555-ofonomodemsimmanager.cpp
1556-ofonomodemsimmanager.h
1557-ofonoroot.cpp
1558-ofonoroot.h
1559-urfkillroot.cpp
1560-urfkillroot.h
1561-urfkillswitch.cpp
1562-urfkillswitch.h
1563 )
1564
1565 qt5_use_modules(i-n-sniffer Core DBus)
1566
1567+target_link_libraries(
1568+ i-n-sniffer
1569+ qdbus-stubs
1570+ ${QOFONO_LIBRARIES}
1571+)
1572+
1573 install(
1574 TARGETS i-n-sniffer
1575 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1576
1577=== modified file 'src/sniffer/dbusdata.h'
1578--- sniffer/dbusdata.h 2014-11-26 11:31:07 +0000
1579+++ src/sniffer/dbusdata.h 2015-04-08 10:22:41 +0000
1580@@ -19,10 +19,6 @@
1581
1582 #pragma once
1583
1584-#define NM_SERVICE "org.freedesktop.NetworkManager"
1585-#define NM_OBJECT "/org/freedesktop/NetworkManager"
1586-#define NM_SETTINGS_OBJECT "/org/freedesktop/NetworkManager/Settings"
1587-
1588 #define URFKILL_SERVICE "org.freedesktop.URfkill"
1589 #define URFKILL_OBJECT "/org/freedesktop/URfkill"
1590 #define URFKILL_WLAN_OBJECT "/org/freedesktop/URfkill/WLAN"
1591
1592=== modified file 'src/sniffer/eventprinter.cpp'
1593--- sniffer/eventprinter.cpp 2014-11-26 11:31:07 +0000
1594+++ src/sniffer/eventprinter.cpp 2015-04-08 10:22:41 +0000
1595@@ -20,19 +20,34 @@
1596 #include "eventprinter.h"
1597
1598 #include "dbusdata.h"
1599-#include "nmroot.h"
1600-#include "ofonomodemmodem.h"
1601-#include "ofonomodemnetworkregistration.h"
1602-#include "ofonomodemsimmanager.h"
1603-#include "ofonoroot.h"
1604-#include "urfkillroot.h"
1605-#include "urfkillswitch.h"
1606+#include <NetworkManager.h>
1607+#include <NetworkManagerInterface.h>
1608+#include <URfkillInterface.h>
1609+#include <URfkillKillswitchInterface.h>
1610+
1611+#define slots
1612+#include <qofono-qt5/qofonomanager.h>
1613+#include <qofono-qt5/qofonomodem.h>
1614+#include <qofono-qt5/qofononetworkregistration.h>
1615+#include <qofono-qt5/qofonosimmanager.h>
1616+#undef slots
1617+
1618+// Lo-fi way of waiting for properties to populate
1619+static void wait_for_a_bit()
1620+{
1621+ QEventLoop q;
1622+ QTimer tT;
1623+ tT.setSingleShot(true);
1624+ QObject::connect(&tT, &QTimer::timeout, &q, &QEventLoop::quit);
1625+ tT.start(50);
1626+ q.exec();
1627+}
1628
1629 EventPrinter::EventPrinter(QObject *parent) : QObject(parent) {
1630- urfkill = new UrfkillRoot(URFKILL_SERVICE, URFKILL_OBJECT, QDBusConnection::systemBus(), this);
1631- btkill = new UrfkillSwitch(URFKILL_SERVICE, URFKILL_BLUETOOTH_OBJECT, QDBusConnection::systemBus(), this);
1632- wlankill = new UrfkillSwitch(URFKILL_SERVICE, URFKILL_WLAN_OBJECT, QDBusConnection::systemBus(), this);
1633- nmroot = new NetworkManagerRoot(NM_SERVICE, NM_OBJECT, QDBusConnection::systemBus(), this);
1634+ urfkill = new OrgFreedesktopURfkillInterface(URFKILL_SERVICE, URFKILL_OBJECT, QDBusConnection::systemBus(), this);
1635+ btkill = new OrgFreedesktopURfkillKillswitchInterface(URFKILL_SERVICE, URFKILL_BLUETOOTH_OBJECT, QDBusConnection::systemBus(), this);
1636+ wlankill = new OrgFreedesktopURfkillKillswitchInterface(URFKILL_SERVICE, URFKILL_WLAN_OBJECT, QDBusConnection::systemBus(), this);
1637+ nmroot = new OrgFreedesktopNetworkManagerInterface(NM_DBUS_SERVICE, NM_DBUS_PATH, QDBusConnection::systemBus(), this);
1638
1639 connect(urfkill, SIGNAL(FlightModeChanged(bool)), this, SLOT(flightModeChanged(bool)));
1640 connect(btkill, SIGNAL(StateChanged()), this, SLOT(btKillswitchChanged()));
1641@@ -40,33 +55,40 @@
1642 connect(nmroot, SIGNAL(StateChanged(uint)), this, SLOT(nmStateChanged(uint)));
1643 connect(nmroot, SIGNAL(PropertiesChanged(const QVariantMap&)), this, SLOT(nmPropertiesChanged(const QVariantMap&)));
1644
1645- OfonoRoot ofono(OFONO_SERVICE, OFONO_OBJECT, QDBusConnection::systemBus(), nullptr);
1646- auto modems = ofono.GetModems().value();
1647+ QOfonoManager ofono;
1648+ wait_for_a_bit();
1649+ auto modems = ofono.modems();
1650 if(modems.length() > 0) {
1651- modem1 = new OfonoModemModem(OFONO_SERVICE, modems[0].first.path(), QDBusConnection::systemBus(), this);
1652- connect(modem1, SIGNAL(PropertyChanged(const QString, const QDBusVariant)), this,
1653- SLOT(modem1PropertyChanged(const QString, const QDBusVariant)));
1654- simman1 = new OfonoModemSimManager(OFONO_SERVICE, modems[0].first.path(), QDBusConnection::systemBus(), this);
1655- connect(simman1, SIGNAL(PropertyChanged(const QString, const QDBusVariant)), this,
1656- SLOT(simman1PropertyChanged(const QString, const QDBusVariant)));
1657- netreg1 = new OfonoModemNetworkRegistration(OFONO_SERVICE, modems[0].first.path(), QDBusConnection::systemBus(), this);
1658- connect(netreg1, SIGNAL(PropertyChanged(const QString, const QDBusVariant)), this,
1659- SLOT(netreg1PropertyChanged(const QString, const QDBusVariant)));
1660+ modem1 = new QOfonoModem(this);
1661+ modem1->setModemPath(modems[0]);
1662+ connect(modem1, SIGNAL(propertyChanged(const QString&, const QVariant&)), this,
1663+ SLOT(modem1PropertyChanged(const QString&, const QVariant&)));
1664+ simman1 = new QOfonoSimManager(this);
1665+ simman1->setModemPath(modems[0]);
1666+ connect(simman1, SIGNAL(propertyChanged(const QString&, const QVariant&)), this,
1667+ SLOT(simman1PropertyChanged(const QString&, const QVariant&)));
1668+ netreg1 = new QOfonoNetworkRegistration(this);
1669+ netreg1->setModemPath(modems[0]);
1670+ connect(netreg1, SIGNAL(propertyChanged(const QString&, const QVariant&)), this,
1671+ SLOT(netreg1PropertyChanged(const QString&, const QVariant&)));
1672 } else {
1673 modem1 = nullptr;
1674 simman1 = nullptr;
1675 netreg1 = nullptr;
1676 }
1677 if(modems.length() > 1) {
1678- modem2 = new OfonoModemModem(OFONO_SERVICE, modems[1].first.path(), QDBusConnection::systemBus(), this);
1679- connect(modem2, SIGNAL(PropertyChanged(const QString, const QDBusVariant)), this,
1680- SLOT(modem2PropertyChanged(const QString, const QDBusVariant)));
1681- simman2 = new OfonoModemSimManager(OFONO_SERVICE, modems[1].first.path(), QDBusConnection::systemBus(), this);
1682- connect(simman2, SIGNAL(PropertyChanged(const QString, const QDBusVariant)), this,
1683- SLOT(simman2PropertyChanged(const QString, const QDBusVariant)));
1684- netreg2 = new OfonoModemNetworkRegistration(OFONO_SERVICE, modems[1].first.path(), QDBusConnection::systemBus(), this);
1685- connect(netreg2, SIGNAL(PropertyChanged(const QString, const QDBusVariant)), this,
1686- SLOT(netreg2PropertyChanged(const QString, const QDBusVariant)));
1687+ modem2 = new QOfonoModem(this);
1688+ modem2->setModemPath(modems[1]);
1689+ connect(modem2, SIGNAL(propertyChanged(const QString&, const QVariant&)), this,
1690+ SLOT(modem2PropertyChanged(const QString&, const QVariant&)));
1691+ simman2 = new QOfonoSimManager(this);
1692+ simman2->setModemPath(modems[1]);
1693+ connect(simman2, SIGNAL(propertyChanged(const QString&, const QVariant&)), this,
1694+ SLOT(simman2PropertyChanged(const QString&, const QVariant&)));
1695+ netreg2 = new QOfonoNetworkRegistration(this);
1696+ netreg2->setModemPath(modems[1]);
1697+ connect(netreg2, SIGNAL(propertyChanged(const QString&, const QVariant&)), this,
1698+ SLOT(netreg2PropertyChanged(const QString&, const QVariant&)));
1699 } else {
1700 modem2 = nullptr;
1701 simman2 = nullptr;
1702@@ -122,50 +144,50 @@
1703 printf(" ActiveConnections (now have %d)\n", nmroot->activeConnections().size());
1704 }
1705
1706-void EventPrinter::modem1PropertyChanged(const QString name, const QDBusVariant value) {
1707+void EventPrinter::modem1PropertyChanged(const QString &name, const QVariant &value) {
1708 modemPropertyChanged(1, name, value);
1709 }
1710
1711-void EventPrinter::modem2PropertyChanged(const QString name, const QDBusVariant value) {
1712+void EventPrinter::modem2PropertyChanged(const QString &name, const QVariant &value) {
1713 modemPropertyChanged(2, name, value);
1714 }
1715
1716-void EventPrinter::modemPropertyChanged(const int modem, const QString &name, const QDBusVariant &value) {
1717- auto str = value.variant().toString();
1718+void EventPrinter::modemPropertyChanged(const int modem, const QString &name, const QVariant &value) {
1719+ auto str = value.toString();
1720 if(str.length() > 0) {
1721 str = " to " + str;
1722 }
1723 printf("Ofono modem %d property %s changed%s.\n", modem, name.toUtf8().data(), str.toUtf8().data());
1724 }
1725
1726-void EventPrinter::simman1PropertyChanged(const QString name, const QDBusVariant value) {
1727+void EventPrinter::simman1PropertyChanged(const QString &name, const QVariant &value) {
1728 simmanPropertyChanged(1, name, value);
1729 }
1730
1731-void EventPrinter::simman2PropertyChanged(const QString name, const QDBusVariant value) {
1732+void EventPrinter::simman2PropertyChanged(const QString &name, const QVariant &value) {
1733 simmanPropertyChanged(2, name, value);
1734 }
1735
1736-void EventPrinter::simmanPropertyChanged(const int simman, const QString &name, const QDBusVariant &value) {
1737+void EventPrinter::simmanPropertyChanged(const int simman, const QString &name, const QVariant &value) {
1738 if(name == "PinRequired") {
1739- printf("Ofono modem %d pin required changed to %s.\n", simman, value.variant().toString().toUtf8().data());
1740+ printf("Ofono modem %d pin required changed to %s.\n", simman, value.toString().toUtf8().data());
1741 }
1742 }
1743
1744-void EventPrinter::netreg1PropertyChanged(const QString name, const QDBusVariant value) {
1745+void EventPrinter::netreg1PropertyChanged(const QString &name, const QVariant &value) {
1746 netregPropertyChanged(1, name, value);
1747 }
1748
1749-void EventPrinter::netreg2PropertyChanged(const QString name, const QDBusVariant value) {
1750+void EventPrinter::netreg2PropertyChanged(const QString &name, const QVariant &value) {
1751 netregPropertyChanged(2, name, value);
1752 }
1753
1754-void EventPrinter::netregPropertyChanged(const int netreg, const QString &name, const QDBusVariant &value) {
1755+void EventPrinter::netregPropertyChanged(const int netreg, const QString &name, const QVariant &value) {
1756 QString valuetext;
1757 if(name == "Strength") {
1758- valuetext = QString::number(value.variant().toInt());
1759+ valuetext = QString::number(value.toInt());
1760 } else {
1761- valuetext = value.variant().toString();
1762+ valuetext = value.toString();
1763 }
1764
1765 printf("Ofono network registration %d property %s changed to %s.\n", netreg, name.toUtf8().data(), valuetext.toUtf8().data());
1766
1767=== modified file 'src/sniffer/eventprinter.h'
1768--- sniffer/eventprinter.h 2015-03-13 06:46:08 +0000
1769+++ src/sniffer/eventprinter.h 2015-04-08 10:22:41 +0000
1770@@ -22,12 +22,12 @@
1771 #include <QObject>
1772 #include <QDBusVariant>
1773
1774-class UrfkillRoot;
1775-class UrfkillSwitch;
1776-class NetworkManagerRoot;
1777-class OfonoModemModem;
1778-class OfonoModemSimManager;
1779-class OfonoModemNetworkRegistration;
1780+class OrgFreedesktopURfkillInterface;
1781+class OrgFreedesktopURfkillKillswitchInterface;
1782+class OrgFreedesktopNetworkManagerInterface;
1783+class QOfonoModem;
1784+class QOfonoSimManager;
1785+class QOfonoNetworkRegistration;
1786
1787 class EventPrinter : QObject {
1788 Q_OBJECT
1789@@ -42,29 +42,29 @@
1790 void wlanKillswitchChanged();
1791 void nmStateChanged(uint new_state);
1792 void nmPropertiesChanged(const QVariantMap &props);
1793- void modem1PropertyChanged(const QString name, const QDBusVariant value);
1794- void modem2PropertyChanged(const QString name, const QDBusVariant value);
1795- void simman1PropertyChanged(const QString name, const QDBusVariant value);
1796- void simman2PropertyChanged(const QString name, const QDBusVariant value);
1797- void netreg1PropertyChanged(const QString name, const QDBusVariant value);
1798- void netreg2PropertyChanged(const QString name, const QDBusVariant value);
1799+ void modem1PropertyChanged(const QString &name, const QVariant &value);
1800+ void modem2PropertyChanged(const QString &name, const QVariant &value);
1801+ void simman1PropertyChanged(const QString &name, const QVariant &value);
1802+ void simman2PropertyChanged(const QString &name, const QVariant &value);
1803+ void netreg1PropertyChanged(const QString &name, const QVariant &value);
1804+ void netreg2PropertyChanged(const QString &name, const QVariant &value);
1805
1806 private:
1807
1808- void modemPropertyChanged(const int modem, const QString &name, const QDBusVariant &value);
1809- void simmanPropertyChanged(const int simman, const QString &name, const QDBusVariant &value);
1810- void netregPropertyChanged(const int modem, const QString &name, const QDBusVariant &value);
1811+ void modemPropertyChanged(const int modem, const QString &name, const QVariant &value);
1812+ void simmanPropertyChanged(const int simman, const QString &name, const QVariant &value);
1813+ void netregPropertyChanged(const int modem, const QString &name, const QVariant &value);
1814 void activeConnectionsChanged(const QVariant &list);
1815 void primaryConnectionTypeChanged(const QString &type);
1816
1817- UrfkillRoot *urfkill;
1818- UrfkillSwitch *btkill;
1819- UrfkillSwitch *wlankill;
1820- NetworkManagerRoot *nmroot;
1821- OfonoModemModem *modem1;
1822- OfonoModemModem *modem2;
1823- OfonoModemSimManager *simman1;
1824- OfonoModemSimManager *simman2;
1825- OfonoModemNetworkRegistration *netreg1;
1826- OfonoModemNetworkRegistration *netreg2;
1827+ OrgFreedesktopURfkillInterface *urfkill;
1828+ OrgFreedesktopURfkillKillswitchInterface *btkill;
1829+ OrgFreedesktopURfkillKillswitchInterface *wlankill;
1830+ OrgFreedesktopNetworkManagerInterface *nmroot;
1831+ QOfonoModem *modem1;
1832+ QOfonoModem *modem2;
1833+ QOfonoSimManager *simman1;
1834+ QOfonoSimManager *simman2;
1835+ QOfonoNetworkRegistration *netreg1;
1836+ QOfonoNetworkRegistration *netreg2;
1837 };
1838
1839=== modified file 'src/sniffer/i-n-extractor.cpp'
1840--- sniffer/i-n-extractor.cpp 2015-03-13 06:46:08 +0000
1841+++ src/sniffer/i-n-extractor.cpp 2015-04-08 10:22:41 +0000
1842@@ -22,17 +22,21 @@
1843
1844 #include "dbusdata.h"
1845 #include "eventprinter.h"
1846-#include "nmaccesspoint.h"
1847-#include "nmactiveconnection.h"
1848-#include "nmconnsettings.h"
1849-#include "nmroot.h"
1850-#include "nmsettings.h"
1851-#include "nmwirelessdevice.h"
1852-#include "ofonomodemnetworkregistration.h"
1853-#include "ofonomodemsimmanager.h"
1854-#include "ofonoroot.h"
1855-#include "urfkillroot.h"
1856-#include "urfkillswitch.h"
1857+#include <NetworkManager.h>
1858+#include <NetworkManagerAccessPointInterface.h>
1859+#include <NetworkManagerActiveConnectionInterface.h>
1860+#include <NetworkManagerSettingsConnectionInterface.h>
1861+#include <NetworkManagerInterface.h>
1862+#include <NetworkManagerDeviceWirelessInterface.h>
1863+#include <URfkillInterface.h>
1864+#include <URfkillKillswitchInterface.h>
1865+
1866+#define slots
1867+#include <qofono-qt5/qofonomanager.h>
1868+#include <qofono-qt5/qofonomodem.h>
1869+#include <qofono-qt5/qofonosimmanager.h>
1870+#include <qofono-qt5/qofononetworkregistration.h>
1871+#undef slots
1872
1873 static std::map<const int, const char*> nm_active_connection_strings = {{0, "Unknown"}, {1, "Activating"},
1874 {2, "Activated"}, {3, "Deactivating"}, {4, "Deactivated"}};
1875@@ -42,19 +46,30 @@
1876 {30, "Disconnecting"}, {40, "Connecting"}, {50, "Connected local"}, {60, "Connected site"}, {70, "Connected global"}};
1877 static std::map<const int, const char*> nm_ap_mode_strings = {{0, "Unknown"}, {1, "Adhoc"}, {2, "Infra"}, {3, "Access point"}};
1878
1879-void print_nm_wlans(NetworkManagerRoot *nmroot) {
1880+// Lo-fi way of waiting for properties to populate
1881+static void wait_for_a_bit()
1882+{
1883+ QEventLoop q;
1884+ QTimer tT;
1885+ tT.setSingleShot(true);
1886+ QObject::connect(&tT, &QTimer::timeout, &q, &QEventLoop::quit);
1887+ tT.start(50);
1888+ q.exec();
1889+}
1890+
1891+static void print_nm_wlans(OrgFreedesktopNetworkManagerInterface *nmroot) {
1892 auto paths = nmroot->activeConnections();
1893 for(const auto &path : paths) {
1894- NetworkManagerActiveConnection ac(NM_SERVICE, path.path(), QDBusConnection::systemBus(), nullptr);
1895+ OrgFreedesktopNetworkManagerConnectionActiveInterface ac(NM_DBUS_SERVICE, path.path(), QDBusConnection::systemBus(), nullptr);
1896 auto devices = ac.devices();
1897 // FIXME, should check all but most connections only have one.
1898- NetworkManagerWirelessDevice dev(NM_SERVICE, devices[0].path(), QDBusConnection::systemBus(), nullptr);
1899+ OrgFreedesktopNetworkManagerDeviceWirelessInterface dev(NM_DBUS_SERVICE, devices[0].path(), QDBusConnection::systemBus(), nullptr);
1900 auto reply = dev.GetAccessPoints();
1901 reply.waitForFinished();
1902 if(reply.isValid()) {
1903 // FIXME and the same here.
1904 // FIXME also that active access point might not exist
1905- NetworkManagerAccessPoint ap(NM_SERVICE, dev.activeAccessPoint().path(), QDBusConnection::systemBus(), nullptr);
1906+ OrgFreedesktopNetworkManagerAccessPointInterface ap(NM_DBUS_SERVICE, dev.activeAccessPoint().path(), QDBusConnection::systemBus(), nullptr);
1907 printf("Connection %s:\n", path.path().toUtf8().data());
1908 auto raw_ssid = ap.ssid();
1909 std::string ssid(raw_ssid.cbegin(), raw_ssid.cend());
1910@@ -62,7 +77,7 @@
1911 printf(" mode: %d (%s)\n", ap.mode(), nm_ap_mode_strings[ap.mode()]);
1912 printf(" visible networks:\n");
1913 for(const auto &c : reply.value()) {
1914- NetworkManagerAccessPoint i(NM_SERVICE, c.path(), QDBusConnection::systemBus(), nullptr);
1915+ OrgFreedesktopNetworkManagerAccessPointInterface i(NM_DBUS_SERVICE, c.path(), QDBusConnection::systemBus(), nullptr);
1916 auto i_raw_ssid = i.ssid();
1917 std::string i_ssid(i_raw_ssid.cbegin(), i_raw_ssid.cend());
1918 printf(" %s %d\n", i_ssid.c_str(), (int)i.strength());
1919@@ -73,19 +88,19 @@
1920 }
1921 }
1922
1923-void print_info(QCoreApplication &app) {
1924- UrfkillRoot *urfkill = new UrfkillRoot(URFKILL_SERVICE, URFKILL_OBJECT,
1925- QDBusConnection::systemBus(), &app);
1926- UrfkillSwitch *urfkillwlan = new UrfkillSwitch(URFKILL_SERVICE, URFKILL_WLAN_OBJECT,
1927- QDBusConnection::systemBus(), &app);
1928- UrfkillSwitch *urfkillbt = new UrfkillSwitch(URFKILL_SERVICE, URFKILL_BLUETOOTH_OBJECT,
1929- QDBusConnection::systemBus(), &app);
1930- UrfkillSwitch *urfkillgps = new UrfkillSwitch(URFKILL_SERVICE, URFKILL_GPS_OBJECT,
1931- QDBusConnection::systemBus(), &app);
1932- NetworkManagerRoot *nmroot = new NetworkManagerRoot(NM_SERVICE, NM_OBJECT,
1933- QDBusConnection::systemBus(), &app);
1934- OfonoRoot *ofonoroot = new OfonoRoot(OFONO_SERVICE, OFONO_OBJECT,
1935- QDBusConnection::systemBus(), &app);
1936+static void print_info(QCoreApplication &app) {
1937+ OrgFreedesktopURfkillInterface *urfkill = new OrgFreedesktopURfkillInterface(URFKILL_SERVICE, URFKILL_OBJECT,
1938+ QDBusConnection::systemBus(), &app);
1939+ OrgFreedesktopURfkillKillswitchInterface *urfkillwlan = new OrgFreedesktopURfkillKillswitchInterface(URFKILL_SERVICE, URFKILL_WLAN_OBJECT,
1940+ QDBusConnection::systemBus(), &app);
1941+ OrgFreedesktopURfkillKillswitchInterface *urfkillbt = new OrgFreedesktopURfkillKillswitchInterface(URFKILL_SERVICE, URFKILL_BLUETOOTH_OBJECT,
1942+ QDBusConnection::systemBus(), &app);
1943+ OrgFreedesktopURfkillKillswitchInterface *urfkillgps = new OrgFreedesktopURfkillKillswitchInterface(URFKILL_SERVICE, URFKILL_GPS_OBJECT,
1944+ QDBusConnection::systemBus(), &app);
1945+ OrgFreedesktopNetworkManagerInterface *nmroot = new OrgFreedesktopNetworkManagerInterface(NM_DBUS_SERVICE, NM_DBUS_PATH,
1946+ QDBusConnection::systemBus(), &app);
1947+ QOfonoManager *ofonoroot = new QOfonoManager(&app);
1948+ wait_for_a_bit();
1949
1950 printf("Urfkill flightmode: %d\n", urfkill->IsFlightMode().value());
1951 printf("Urfkill WLAN killswitch: %d\n", urfkillwlan->state());
1952@@ -101,40 +116,41 @@
1953 printf("NetworkManager wireless hardware enabled: %d\n", nmroot->wirelessHardwareEnabled());
1954 print_nm_wlans(nmroot);
1955 printf("\n");
1956- auto modems = ofonoroot->GetModems().value();
1957+ auto modems = ofonoroot->modems();
1958 printf("Ofono modem count: %d\n", modems.size());
1959 for(const auto &m : modems) {
1960- OfonoModemSimManager man(OFONO_SERVICE, m.first.path(), QDBusConnection::systemBus(), nullptr);
1961- OfonoModemNetworkRegistration netreg(OFONO_SERVICE, m.first.path(), QDBusConnection::systemBus(), nullptr);
1962- auto mprops = man.GetProperties().value();
1963- auto regprops = netreg.GetProperties().value();
1964-
1965- const auto &props = m.second;
1966- printf("Modem %s:\n", m.first.path().toUtf8().data());
1967+ QOfonoModem modem;
1968+ modem.setModemPath(m);
1969+
1970+ QOfonoSimManager man;
1971+ man.setModemPath(m);
1972+
1973+ QOfonoNetworkRegistration netreg;
1974+ netreg.setModemPath(m);
1975+
1976+ wait_for_a_bit();
1977+
1978+ printf("Modem %s:\n", m.toUtf8().constData());
1979 // For proper usage should check for existance before indexing.
1980- printf(" Powered: %d\n", props["Powered"].toBool());
1981- printf(" Online: %d\n", props["Online"].toBool());
1982- printf(" Model: %s\n", props["Model"].toString().toUtf8().data());
1983- printf(" Manufacturer: %s\n", props["Manufacturer"].toString().toUtf8().data());
1984- printf(" Pin required: %s\n", mprops["PinRequired"].toString().toUtf8().data());
1985- printf(" Status: %s\n", regprops["Status"].toString().toUtf8().data());
1986- printf(" Strength: %d\n", regprops["Strength"].toInt());
1987- printf(" Operator: %s\n", regprops["Name"].toString().toUtf8().data());
1988+ printf(" Powered: %d\n", modem.powered());
1989+ printf(" Online: %d\n", modem.online());
1990+ printf(" Model: %s\n", modem.model().toUtf8().constData());
1991+ printf(" Manufacturer: %s\n", modem.manufacturer().toUtf8().constData());
1992+ printf(" Pin required: %d\n", man.pinRequired());
1993+ printf(" Status: %s\n", netreg.status().toUtf8().constData());
1994+ printf(" Strength: %d\n", netreg.strength());
1995+ printf(" Operator: %s\n", netreg.name().toUtf8().constData());
1996 }
1997 }
1998
1999-int run_daemon(QCoreApplication &app) {
2000+static int run_daemon(QCoreApplication &app) {
2001 new EventPrinter(&app);
2002 return app.exec();
2003 }
2004
2005 int main(int argc, char **argv) {
2006 QCoreApplication app(argc, argv);
2007- qRegisterMetaType<QVariantDictMap>("QVariantDictMap");
2008- qDBusRegisterMetaType<QVariantDictMap>();
2009- qRegisterMetaType<ModemPropertyList>("ModemPropertyList");
2010- qDBusRegisterMetaType<ModemPropertyList>();
2011- qDBusRegisterMetaType<QPair<QDBusObjectPath, QVariantMap>>();
2012+ DBusTypes::registerMetaTypes();
2013
2014 if(argc == 1) {
2015 print_info(app);

Subscribers

People subscribed via source and target branches