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

akonadi

  • sources
  • kde-4.12
  • kdepimlibs
  • 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  explicit 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 
70  void endJob( Job* job );
71 
72  void jobDone( KJob* job );
73  void jobWriteFinished( Akonadi::Job* job );
74  void jobDestroyed( QObject *job );
75 
76  bool canPipelineNext();
77 
88  static void createDefaultSession( const QByteArray &sessionId );
89 
94  static void setDefaultSession( Session *session );
95 
99  virtual void addJob( Job* job );
100 
104  int nextTag();
105 
109  void writeData( const QByteArray &data );
110 
114  void itemRevisionChanged( Akonadi::Item::Id itemId, int oldRevision, int newRevision );
115 
116  static int minimumProtocolVersion() { return 33; }
117 
121  static QString connectionFile();
122 
123  Session *mParent;
124  QByteArray sessionId;
125  QIODevice* socket;
126  bool connected;
127  int theNextTag;
128  int protocolVersion;
129 
130  // job management
131  QQueue<Job*> queue;
132  QQueue<Job*> pipeline;
133  Job* currentJob;
134  bool jobRunning;
135 
136  // parser stuff
137  ImapParser *parser;
138 };
139 
140 }
141 
142 #endif
Akonadi::Job
Base class for all actions in the Akonadi storage.
Definition: job.h:86
Akonadi::Session
A communication session with the Akonadi storage.
Definition: session.h:59
Akonadi::SessionPrivate
Definition: session_p.h:41
Akonadi::ServerManager::State
State
Enum for the various states the server can be in.
Definition: servermanager.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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