libsolidcontrol
networkmanager.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2006 Will Stephenson <wstephenson@kde.org> 00003 Copyright (C) 2006-2007 Kevin Ottens <ervin@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 00019 */ 00020 00021 #ifndef SOLID_CONTROL_NETWORKMANAGER 00022 #define SOLID_CONTROL_NETWORKMANAGER 00023 00024 #include <QtCore/QObject> 00025 #include <QtCore/QVariant> 00026 00027 #include <solid/networking.h> 00028 #include "solid_control_export.h" 00029 00030 namespace Solid 00031 { 00032 namespace Control 00033 { 00034 namespace Ifaces 00035 { 00036 class NetworkManager; 00037 } 00038 class Network; 00039 class NetworkInterface; 00040 typedef QList<NetworkInterface*> NetworkInterfaceList; 00041 00052 namespace NetworkManager 00053 { 00057 SOLIDCONTROL_EXPORT Solid::Networking::Status status(); 00064 SOLIDCONTROL_EXPORT NetworkInterfaceList networkInterfaces(); 00065 00073 SOLIDCONTROL_EXPORT NetworkInterface * findNetworkInterface(const QString &uni); 00074 00082 SOLIDCONTROL_EXPORT bool isNetworkingEnabled(); 00083 00089 SOLIDCONTROL_EXPORT bool isWirelessEnabled(); 00090 00091 00097 SOLIDCONTROL_EXPORT void setNetworkingEnabled(bool enabled); 00098 00106 SOLIDCONTROL_EXPORT bool isWirelessHardwareEnabled(); 00107 00113 SOLIDCONTROL_EXPORT void setWirelessEnabled(bool enabled); 00114 00121 SOLIDCONTROL_EXPORT void activateConnection(const QString & deviceUni, const QString & connectionUni, 00122 const QVariantMap & connectionParameters ); 00127 SOLIDCONTROL_EXPORT void deactivateConnection(const QString & activeConnectionUni); 00128 00132 QStringList SOLIDCONTROL_EXPORT activeConnections(); 00133 00134 class SOLIDCONTROL_EXPORT Notifier : public QObject 00135 { 00136 Q_OBJECT 00137 Q_SIGNALS: 00141 void statusChanged(Solid::Networking::Status status); 00147 void networkInterfaceAdded(const QString &uni); 00148 00154 void networkInterfaceRemoved(const QString &uni); 00158 void wirelessEnabledChanged(bool enabled); 00162 void wirelessHardwareEnabledChanged(bool enabled); 00166 void activeConnectionsChanged(); 00167 }; 00168 00169 SOLIDCONTROL_EXPORT Notifier *notifier(); 00170 } 00171 00172 } // Control 00173 } // Solid 00174 00175 #endif