mailtransport
socket.h
00001 /* 00002 Copyright (C) 2006-2007 KovoKs <info@kovoks.nl> 00003 00004 This library is free software; you can redistribute it and/or modify it 00005 under the terms of the GNU Library General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or (at your 00007 option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, but WITHOUT 00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 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 the 00016 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 02110-1301, USA. 00018 */ 00019 00020 #ifndef MAILTRANSPORT_SOCKET_H 00021 #define MAILTRANSPORT_SOCKET_H 00022 00023 #include <mailtransport/mailtransport_export.h> 00024 00025 #include <QtNetwork/QSslSocket> 00026 00027 namespace MailTransport 00028 { 00029 class SocketPrivate; 00030 00037 class MAILTRANSPORT_EXPORT Socket : public QObject 00038 { 00039 Q_OBJECT 00040 00041 public: 00042 00048 explicit Socket( QObject *parent ); 00049 00053 ~Socket(); 00054 00059 virtual void reconnect(); 00060 00064 virtual void write( const QString &text ); 00065 00069 virtual bool available(); 00070 00074 void setProtocol( const QString &proto ); 00075 00079 void setServer( const QString &server ); 00080 00085 void setPort( int port ); 00086 00090 void setSecure( bool what ); 00091 00095 void startTLS(); 00096 00097 private: 00098 Q_DECLARE_PRIVATE( Socket ) 00099 SocketPrivate *const d; 00100 00101 Q_PRIVATE_SLOT( d, void slotConnected() ) 00102 Q_PRIVATE_SLOT( d, void slotStateChanged( QAbstractSocket::SocketState state ) ) 00103 Q_PRIVATE_SLOT( d, void slotModeChanged( QSslSocket::SslMode state ) ) 00104 Q_PRIVATE_SLOT( d, void slotSocketRead() ) 00105 Q_PRIVATE_SLOT( d, void slotSslErrors( const QList<QSslError> &errors ) ) 00106 00107 Q_SIGNALS: 00111 void data( const QString & ); 00112 00116 void connected(); 00117 00121 void failed(); 00122 00126 void tlsDone(); 00127 }; 00128 } // namespace MailTransport 00129 00130 #endif // MAILTRANSPORT_SOCKET_H 00131
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:25:02 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:25:02 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.