Akonadi

tracerinterface.h
1 /***************************************************************************
2  * Copyright (C) 2006 by Tobias Koenig <[email protected]> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU Library General Public License as *
6  * published by the Free Software Foundation; either version 2 of the *
7  * License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU Library General Public *
15  * License along with this program; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18  ***************************************************************************/
19 
20 #ifndef AKONADI_TRACERINTERFACE_H
21 #define AKONADI_TRACERINTERFACE_H
22 
23 class QByteArray;
24 class QString;
25 
26 namespace Akonadi
27 {
28 namespace Server
29 {
30 
41 {
42 public:
43  enum ConnectionFormat {
44  DebugString,
45  Json
46  };
47 
48  virtual ~TracerInterface()
49  {
50  }
51 
61  virtual void beginConnection(const QString &identifier, const QString &msg) = 0;
62 
70  virtual void endConnection(const QString &identifier, const QString &msg) = 0;
71 
80  virtual void connectionInput(const QString &identifier, const QByteArray &msg) = 0;
81 
89  virtual void connectionOutput(const QString &identifier, const QByteArray &msg) = 0;
90 
97  virtual void signal(const QString &signalName, const QString &msg) = 0;
98 
102  virtual void warning(const QString &componentName, const QString &msg) = 0;
103 
107  virtual void error(const QString &componentName, const QString &msg) = 0;
108 
109  virtual ConnectionFormat connectionFormat() const {return DebugString;}
110 };
111 
112 } // namespace Server
113 } // namespace Akonadi
114 
115 #endif
virtual void warning(const QString &componentName, const QString &msg)=0
This method is called whenever a component wants to output a warning.
virtual void signal(const QString &signalName, const QString &msg)=0
This method is called whenever a dbus signal is emitted on the bus.
virtual void connectionInput(const QString &identifier, const QByteArray &msg)=0
This method is called whenever the akonadi server retrieves some data from the outside.
virtual void beginConnection(const QString &identifier, const QString &msg)=0
This method is called whenever a new data (imap) connection to the akonadi server is established...
Helper integration between Akonadi and Qt.
This interface can be reimplemented to deliver tracing information of the akonadi server to the outsi...
virtual void connectionOutput(const QString &identifier, const QByteArray &msg)=0
This method is called whenever the akonadi server sends some data out to a client.
virtual void endConnection(const QString &identifier, const QString &msg)=0
This method is called whenever a data (imap) connection to akonadi server is closed.
virtual void error(const QString &componentName, const QString &msg)=0
This method is called whenever a component wants to output an error.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun May 24 2020 22:46:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.