• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 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#include <QFile>
34
35class QIODevice;
36
37namespace Akonadi {
38
42class AKONADI_TESTS_EXPORT SessionPrivate
43{
44public:
45 explicit SessionPrivate(Session *parent);
46
47 virtual ~SessionPrivate()
48 {
49 delete parser;
50 }
51
52 virtual void init(const QByteArray &sessionId);
53
54 void startNext();
56 void forceReconnect();
58 virtual void reconnect();
59 void serverStateChanged(ServerManager::State);
60 void socketDisconnected();
61 void socketError(QLocalSocket::LocalSocketError error);
62 void socketError(QAbstractSocket::SocketError error);
63 void dataReceived();
64 void doStartNext();
65 void startJob(Job *job);
66
71 void endJob(Job *job);
72
73 void jobDone(KJob *job);
74 void jobWriteFinished(Akonadi::Job *job);
75 void jobDestroyed(QObject *job);
76
77 bool canPipelineNext();
78
89 static void createDefaultSession(const QByteArray &sessionId);
90
95 static void setDefaultSession(Session *session);
96
100 virtual void addJob(Job *job);
101
105 int nextTag();
106
110 void writeData(const QByteArray &data);
111
115 void itemRevisionChanged(Akonadi::Item::Id itemId, int oldRevision, int newRevision);
116
117 static int minimumProtocolVersion()
118 {
119 return 44;
120 }
121
125 static QString connectionFile();
126
127 Session *mParent;
128 QByteArray sessionId;
129 QIODevice *socket;
130 bool connected;
131 int theNextTag;
132 int protocolVersion;
133
134 // job management
135 QQueue<Job *> queue;
136 QQueue<Job *> pipeline;
137 Job *currentJob;
138 bool jobRunning;
139
140 // parser stuff
141 ImapParser *parser;
142
143 QFile *logFile;
144};
145
146}
147
148#endif
Akonadi::Job
Base class for all actions in the Akonadi storage.
Definition: job.h:87
Akonadi::ServerManager::State
State
Enum for the various states the server can be in.
Definition: servermanager.h:50
Akonadi::SessionPrivate
Definition: session_p.h:43
Akonadi::SessionPrivate::addJob
virtual void addJob(Job *job)
Associates the given Job object with this session.
Akonadi::SessionPrivate::writeData
void writeData(const QByteArray &data)
Sends the given raw data.
Akonadi::SessionPrivate::connectionFile
static QString connectionFile()
Default location for akonadiconnectionrc.
Akonadi::SessionPrivate::endJob
void endJob(Job *job)
Akonadi::SessionPrivate::itemRevisionChanged
void itemRevisionChanged(Akonadi::Item::Id itemId, int oldRevision, int newRevision)
Propagate item revision changes to following jobs.
Akonadi::SessionPrivate::nextTag
int nextTag()
Returns the next IMAP tag.
Akonadi::SessionPrivate::reconnect
virtual void reconnect()
Attemps to establish a connections to the Akonadi server.
Akonadi::Session
A communication session with the Akonadi storage.
Definition: session.h:60
Akonadi
FreeBusyManager::Singleton.
Definition: actionstatemanager_p.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 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.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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