libsolidcontrol
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_CONTROL_NETWORKING_H 00022 #define SOLID_CONTROL_NETWORKING_H 00023 00024 #include <QtCore/QObject> 00025 00026 #include "solid_control_export.h" 00027 class QAbstractSocket; 00028 00029 namespace Solid 00030 { 00031 namespace Control 00032 { 00043 namespace Networking 00044 { 00051 enum Result { Accepted, AlreadyConnected, Denied }; 00052 00065 SOLIDCONTROL_EXPORT Result beginManagingSocket( QAbstractSocket * socket, uint autoDisconnectTimeout = 0 ); 00066 00071 SOLIDCONTROL_EXPORT void stopManagingSocket( QAbstractSocket * socket ); 00072 00086 SOLIDCONTROL_EXPORT Result requestConnection( QObject * receiver = 0, const char * member = 0 ); 00087 00093 SOLIDCONTROL_EXPORT void releaseConnection(); 00094 } // Networking 00095 00096 } // namespace Control 00097 } // Solid 00098 00099 #endif