• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/protocols/messenger/libpapillon

ipendpointconnector.h

Go to the documentation of this file.
00001 //
00002 // IpEndpointConnector class
00003 //
00004 // Authors:
00005 //   Gregg Edghill (Gregg.Edghill@gmail.com)
00006 //
00007 // Copyright (C) 2007, Kopete (http://kopete.kde.org)
00008 //
00009 // The above copyright notice and this permission notice shall be
00010 // included in all copies or substantial portions of this software.
00011 //
00012 // THIS LIBRARY IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR
00013 // MODIFY IT UNDER THE TERMS OF THE GNU LESSER GENERAL PUBLIC
00014 // LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; EITHER
00015 // VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.
00016 //
00017 
00018 #ifndef PAPILLON_IPENDPOINTCONNECTOR_H
00019 #define PAPILLON_IPENDPOINTCONNECTOR_H
00020 
00021 #include <QtCore/QObject>
00022 #include <QtCore/QList>
00023 #include <QtCore/QString>
00024 #include <QtNetwork/QAbstractSocket>
00025 #include <QtNetwork/QSslError>
00026 
00027 namespace Papillon
00028 {
00029 
00030 class NetworkStream;
00033 class IpEndpointConnector : public QObject
00034 {
00035     Q_OBJECT
00036 
00037     public:
00039         enum State { Created=0, Connecting=1, Connected=2, Closing=4, Closed=8, Faulted=0x10 };
00040 
00041     public:
00043         explicit IpEndpointConnector(bool enableTls, QObject *parent=0);
00045         ~IpEndpointConnector();
00046 
00047     public:
00049         void close();
00051         void connectWithAddressInfo(const QString& ipAddress, const quint16 port);
00053         NetworkStream * networkStream();
00055         const State & state() const;
00056 
00057     signals:
00059         void connecting();
00061         void connected();
00063         void closing();
00065         void closed();
00067         void faulted();
00068 
00069     private Q_SLOTS:
00071         void socket_OnClose();
00073         void socket_OnConnect();
00075         void socket_OnError(QAbstractSocket::SocketError socketError);
00077         void socket_OnTlsConnect();
00079         void socket_OnTlsError(const QList<QSslError>& errors);
00080 
00081     private:
00083         void closeConnector();
00084 
00085     private:
00086         class IpEndpointConnectorPrivate;
00087         IpEndpointConnectorPrivate *d;
00088 
00089 };  // IpEndpointConnector
00090 }
00091 
00092 #endif

kopete/protocols/messenger/libpapillon

Skip menu "kopete/protocols/messenger/libpapillon"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal