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

akonadi

session_p.h

00001 /*
00002     Copyright (c) 2007 Volker Krause <vkrause@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 AKONADI_SESSION_P_H
00021 #define AKONADI_SESSION_P_H
00022 
00023 #include "session.h"
00024 #include "imapparser_p.h"
00025 #include "akonadiprivate_export.h"
00026 #include "servermanager.h"
00027 
00028 #include <QtNetwork/QLocalSocket>
00029 
00030 #include <QtCore/QQueue>
00031 #include <QtCore/QThreadStorage>
00032 
00033 class QIODevice;
00034 
00035 namespace Akonadi {
00036 
00040 class AKONADI_TESTS_EXPORT SessionPrivate
00041 {
00042   public:
00043     SessionPrivate( Session *parent );
00044 
00045     virtual ~SessionPrivate()
00046     {
00047       delete parser;
00048     }
00049 
00050     virtual void init( const QByteArray &sessionId );
00051 
00052     void startNext();
00053     void reconnect();
00054     void serverStateChanged( ServerManager::State );
00055     void socketDisconnected();
00056     void socketError( QLocalSocket::LocalSocketError error );
00057     void socketError( QAbstractSocket::SocketError error );
00058     void dataReceived();
00059     void doStartNext();
00060     void startJob( Job* job );
00061 
00065     void endJob( Job* job );
00066 
00067     void jobDone( KJob* job );
00068     void jobWriteFinished( Akonadi::Job* job );
00069     void jobDestroyed( QObject *job );
00070 
00071     bool canPipelineNext();
00072 
00082     static void createDefaultSession( const QByteArray &sessionId );
00083 
00087     virtual void addJob( Job* job );
00088 
00092     int nextTag();
00093 
00097     void writeData( const QByteArray &data );
00098 
00099     static int minimumProtocolVersion() { return 26; }
00100 
00101     Session *mParent;
00102     QByteArray sessionId;
00103     QIODevice* socket;
00104     bool connected;
00105     int theNextTag;
00106     int protocolVersion;
00107 
00108     // job management
00109     QQueue<Job*> queue;
00110     QQueue<Job*> pipeline;
00111     Job* currentJob;
00112     bool jobRunning;
00113 
00114     // parser stuff
00115     ImapParser *parser;
00116 };
00117 
00118 }
00119 
00120 #endif

akonadi

Skip menu "akonadi"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • 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.7.1
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