not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / solid / networkmanager-0.6 / tests / nmobject.h
blob435aba4d28504d1c93fe7e2880fa738c1a1daf2f
1 // object to handle network manager events
2 #ifndef WILL_NM_OBJECT
3 #define WILL_NM_OBJECT
5 #include <QCoreApplication>
6 #include <QStringList>
7 #include <qdbusextratypes.h>
9 class QDBusInterface;
11 struct NMDevice {
12 QDBusObjectPath path;
13 QString interface;
14 uint type;
15 QString udi;
16 bool active;
17 uint activationStage;
18 QString ipv4Address;
19 QString subnetMask;
20 QString broadcast;
21 QString hardwareAddress;
22 QString route;
23 QString primaryDNS;
24 QString secondaryDNS;
25 int mode;
26 int strength;
27 bool linkActive;
28 int speed;
29 uint capabilities;
30 uint capabilitiesType;
31 QString activeNetPath;
32 QStringList networks;
34 Q_DECLARE_METATYPE(NMDevice)
36 class NMObject : public QCoreApplication
38 Q_OBJECT
39 public:
40 NMObject(int argc, char ** argv);
41 ~NMObject();
43 void showDevices();
44 public slots:
45 void updateNetwork(QDBusObjectPath,QDBusObjectPath);
46 void deviceStrengthChanged(QDBusObjectPath,int);
47 void netStrengthChanged(QDBusObjectPath,QDBusObjectPath,int);
48 void wirelessNetworkAppeared(QDBusObjectPath,QDBusObjectPath);
49 void wirelessNetworkDisappeared(QDBusObjectPath,QDBusObjectPath);
50 private:
51 QDBusInterface * nmIface;
52 QDBusInterface * nmDeviceIface;
55 #endif