Solid
networking.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2006-2007 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_NETWORKING 00022 #define SOLID_NETWORKING 00023 00024 #include <QtCore/QObject> 00025 00026 #include <solid/solid_export.h> 00027 00028 namespace Solid 00029 { 00040 namespace Networking 00041 { 00045 enum Status { 00046 Unknown, 00047 Unconnected, 00048 Disconnecting, 00049 Connecting, 00050 Connected 00051 }; 00052 00056 enum ManagementPolicy { 00057 Manual, 00058 OnNextStatusChange, 00059 Managed 00060 }; 00061 00067 SOLID_EXPORT Status status(); 00068 00073 void setConnectPolicy( ManagementPolicy policy ); 00074 00079 ManagementPolicy connectPolicy(); 00080 00085 void setDisconnectPolicy( ManagementPolicy policy ); 00086 00091 ManagementPolicy disconnectPolicy(); 00092 00097 class Notifier : public QObject 00098 { 00099 Q_OBJECT 00100 Q_SIGNALS: 00105 void statusChanged( Solid::Networking::Status status ); 00112 void shouldConnect(); 00119 void shouldDisconnect(); 00120 00121 }; 00122 00123 SOLID_EXPORT Notifier *notifier(); 00124 } 00125 00126 } // Solid 00127 00128 #endif