• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
session_p.h
1 /*
2  Copyright (c) 2007 Volker Krause <vkrause@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef AKONADI_SESSION_P_H
21 #define AKONADI_SESSION_P_H
22 
23 #include "akonadiprivate_export.h"
24 #include "session.h"
25 #include "imapparser_p.h"
26 #include "item.h"
27 #include "servermanager.h"
28 
29 #include <QtNetwork/QLocalSocket>
30 
31 #include <QtCore/QQueue>
32 #include <QtCore/QThreadStorage>
33 
34 class QIODevice;
35 
36 namespace Akonadi {
37 
41 class AKONADI_TESTS_EXPORT SessionPrivate
42 {
43  public:
44  SessionPrivate( Session *parent );
45 
46  virtual ~SessionPrivate()
47  {
48  delete parser;
49  }
50 
51  virtual void init( const QByteArray &sessionId );
52 
53  void startNext();
55  void forceReconnect();
57  virtual void reconnect();
58  void serverStateChanged( ServerManager::State );
59  void socketDisconnected();
60  void socketError( QLocalSocket::LocalSocketError error );
61  void socketError( QAbstractSocket::SocketError error );
62  void dataReceived();
63  void doStartNext();
64  void startJob( Job* job );
65 
69  void endJob( Job* job );
70 
71  void jobDone( KJob* job );
72  void jobWriteFinished( Akonadi::Job* job );
73  void jobDestroyed( QObject *job );
74 
75  bool canPipelineNext();
76 
86  static void createDefaultSession( const QByteArray &sessionId );
87 
92  static void setDefaultSession( Session *session );
93 
97  virtual void addJob( Job* job );
98 
102  int nextTag();
103 
107  void writeData( const QByteArray &data );
108 
112  void itemRevisionChanged( Akonadi::Item::Id itemId, int oldRevision, int newRevision );
113 
114  static int minimumProtocolVersion() { return 29; }
115 
119  static QString connectionFile();
120 
121  Session *mParent;
122  QByteArray sessionId;
123  QIODevice* socket;
124  bool connected;
125  int theNextTag;
126  int protocolVersion;
127 
128  // job management
129  QQueue<Job*> queue;
130  QQueue<Job*> pipeline;
131  Job* currentJob;
132  bool jobRunning;
133 
134  // parser stuff
135  ImapParser *parser;
136 };
137 
138 }
139 
140 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:41 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal