• Skip to content
  • Skip to link menu
KDE 4.4 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 
00027 #include <QtNetwork/QLocalSocket>
00028 
00029 #include <QtCore/QQueue>
00030 #include <QtCore/QSettings>
00031 #include <QtCore/QThreadStorage>
00032 
00033 class QLocalSocket;
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       delete mConnectionSettings;
00049     }
00050 
00051     virtual void init( const QByteArray &sessionId );
00052 
00053     void startNext();
00054     void reconnect();
00055     void socketDisconnected();
00056     void socketError( QLocalSocket::LocalSocketError error );
00057     void dataReceived();
00058     void doStartNext();
00059     void startJob( Job* job );
00060 
00064     void endJob( Job* job );
00065 
00066     void jobDone( KJob* job );
00067     void jobWriteFinished( Akonadi::Job* job );
00068     void jobDestroyed( QObject *job );
00069 
00070     bool canPipelineNext();
00071 
00081     static void createDefaultSession( const QByteArray &sessionId );
00082 
00086     virtual void addJob( Job* job );
00087 
00091     int nextTag();
00092 
00096     void writeData( const QByteArray &data );
00097 
00098     static int minimumProtocolVersion() { return 23; }
00099 
00100     Session *mParent;
00101     QByteArray sessionId;
00102     QSettings *mConnectionSettings;
00103     QLocalSocket* 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.6.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