• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KIMAP Library

session_p.h

00001 /*
00002     Copyright (c) 2009 Kevin Ottens <ervin@kde.org>
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 KIMAP_SESSION_P_H
00021 #define KIMAP_SESSION_P_H
00022 
00023 #include "session.h"
00024 
00025 #include <ktcpsocket.h>
00026 
00027 #include <QtCore/QObject>
00028 #include <QtCore/QQueue>
00029 #include <QtCore/QString>
00030 
00031 class KJob;
00032 
00033 namespace KIMAP {
00034 
00035 class Job;
00036 struct Message;
00037 class SessionThread;
00038 class SessionUiProxy;
00039 
00040 class SessionPrivate : public QObject
00041 {
00042   Q_OBJECT
00043 
00044   friend class Session;
00045 
00046   public:
00047     SessionPrivate( Session *session );
00048 
00049     void addJob(Job *job);
00050     QByteArray sendCommand( const QByteArray &command, const QByteArray &args = QByteArray() );
00051     void startSsl(const KTcpSocket::SslVersion &version);
00052     void sendData( const QByteArray &data );
00053 
00054     QString selectedMailBox() const;
00055 
00056     void handleSslError( const KSslErrorUiData &errorData );
00057 
00058   Q_SIGNALS:
00059     void encryptionNegotiationResult(bool);
00060 
00061   private:
00062     void reconnect();
00063 
00064     void startNext();
00065     void doStartNext();
00066     void jobDone( KJob *job );
00067     void jobDestroyed( QObject *job );
00068     void responseReceived( const KIMAP::Message &response );
00069 
00070     void socketConnected();
00071     void socketDisconnected();
00072     void socketError();
00073 
00074     Session *const q;
00075 
00076     bool isSocketConnected;
00077     Session::State state;
00078 
00079     SessionThread *thread;
00080     SessionUiProxy *uiProxy;
00081 
00082     bool jobRunning;
00083     Job *currentJob;
00084     QQueue<Job*> queue;
00085 
00086     QByteArray authTag;
00087     QByteArray selectTag;
00088     QByteArray closeTag;
00089 
00090     QByteArray greeting;
00091     QByteArray currentMailBox;
00092     QByteArray upcomingMailBox;
00093     quint16 tagCount;
00094 };
00095 
00096 }
00097 
00098 #endif

KIMAP Library

Skip menu "KIMAP Library"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.2-20100208
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