Akonadi

core/session.h
1 /*
2  SPDX-FileCopyrightText: 2007 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef AKONADI_SESSION_H
8 #define AKONADI_SESSION_H
9 
10 #include "akonadicore_export.h"
11 #include <QObject>
12 
13 class KJob;
14 class FakeSession;
15 class FakeNotificationConnection;
16 
17 namespace Akonadi
18 {
19 namespace Protocol
20 {
21 class Command;
22 using CommandPtr = QSharedPointer<Command>;
23 }
24 
25 class Job;
26 class SessionPrivate;
27 class ChangeNotificationDependenciesFactory;
28 
54 class AKONADICORE_EXPORT Session : public QObject
55 {
56  Q_OBJECT
57 
58  friend class Job;
59  friend class JobPrivate;
60  friend class SessionPrivate;
61 
62 public:
72  explicit Session(const QByteArray &sessionId = QByteArray(), QObject *parent = nullptr);
73 
77  ~Session();
78 
82  Q_REQUIRED_RESULT QByteArray sessionId() const;
83 
87  static Session *defaultSession();
88 
92  void clear();
93 
94 Q_SIGNALS:
101  void reconnected();
102 
103 protected:
114  explicit Session(SessionPrivate *d, const QByteArray &sessionId = QByteArray(), QObject *parent = nullptr);
115 
116 private:
117  //@cond PRIVATE
118  SessionPrivate *const d;
119  friend class ::FakeSession;
120  friend class ::FakeNotificationConnection;
121  friend class ChangeNotificationDependenciesFactory;
122 
123  Q_PRIVATE_SLOT(d, bool handleCommands())
124  //@endcond PRIVATE
125 };
126 
127 }
128 
129 #endif
Base class for all actions in the Akonadi storage.
Definition: job.h:80
A communication session with the Akonadi storage.
Definition: core/session.h:54
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 23:18:05 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.