add more spacing
[personal-kdebase.git] / workspace / solid / networking / kded / networkstatus.h
blobe59ae840282e476795b7b779e9f1c891eef00282
1 /* This file is part of kdebase/workspace/solid
2 Copyright (C) 2005,2007 Will Stephenson <wstephenson@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library. If not, write to the Free Software
15 Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
18 As a special exception, permission is given to link this library
19 with any edition of Qt, and distribute the resulting executable,
20 without including the source code for Qt in the source distribution.
23 #ifndef KDED_NETWORKSTATUS_H
24 #define KDED_NETWORKSTATUS_H
26 #include <QStringList>
28 #include <KDEDModule>
30 #include "network.h"
32 class NetworkStatusModule : public KDEDModule
34 Q_OBJECT
35 Q_CLASSINFO( "D-Bus Interface", "org.kde.Solid.Networking" )
36 public:
37 NetworkStatusModule(QObject* parent, const QList<QVariant>&);
38 ~NetworkStatusModule();
39 // Client interface
40 public Q_SLOTS:
41 Q_SCRIPTABLE int status();
42 // Service interface
43 Q_SCRIPTABLE QStringList networks();
44 Q_SCRIPTABLE void setNetworkStatus( const QString & networkName, int status );
45 Q_SCRIPTABLE void registerNetwork( const QString & networkName, int status, const QString & serviceName );
46 Q_SCRIPTABLE void unregisterNetwork( const QString & networkName );
47 Q_SIGNALS:
48 // Client interface
49 /**
50 * A status change occurred affecting the overall connectivity
51 * @param status The new status
53 void statusChanged( uint status );
54 protected Q_SLOTS:
55 void serviceOwnerChanged( const QString & name ,const QString & oldOwner, const QString & newOwner );
56 void solidNetworkingStatusChanged( Solid::Networking::Status status );
57 protected:
58 // set up embedded backend
59 void init();
60 // recalculate cached status
61 void updateStatus();
63 private:
64 class Private;
65 Private *d;
68 #endif
69 // vim: sw=4 ts=4