Akonadi

dbustracer.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_DBUSTRACER_H
21 #define AKONADI_DBUSTRACER_H
22 
23 #include <QObject>
24 
25 #include "tracerinterface.h"
26 
27 namespace Akonadi
28 {
29 namespace Server
30 {
31 
35 class DBusTracer : public QObject, public TracerInterface
36 {
37  Q_OBJECT
38 
39 public:
40  DBusTracer();
41  ~DBusTracer() override;
42 
43  void beginConnection(const QString &identifier, const QString &msg) override;
44  void endConnection(const QString &identifier, const QString &msg) override;
45  void connectionInput(const QString &identifier, const QByteArray &msg) override;
46  void connectionOutput(const QString &identifier, const QByteArray &msg) override;
47  void signal(const QString &signalName, const QString &msg) override;
48  void warning(const QString &componentName, const QString &msg) override;
49  void error(const QString &componentName, const QString &msg) override;
50 
51  TracerInterface::ConnectionFormat connectionFormat() const override {return TracerInterface::Json;}
52 
53 Q_SIGNALS:
54  void connectionStarted(const QString &identifier, const QString &msg);
55  void connectionEnded(const QString &identifier, const QString &msg);
56  void connectionDataInput(const QString &identifier, const QString &msg);
57  void connectionDataOutput(const QString &identifier, const QString &msg);
58  void signalEmitted(const QString &signalName, const QString &msg);
59  void warningEmitted(const QString &componentName, const QString &msg);
60  void errorEmitted(const QString &componentName, const QString &msg);
61 };
62 
63 } // namespace Server
64 } // namespace Akonadi
65 
66 #endif
void warning(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output a warning.
Definition: dbustracer.cpp:60
A tracer which forwards all tracing information as dbus signals.
Definition: dbustracer.h:35
Q_SIGNALSQ_SIGNALS
Q_OBJECTQ_OBJECT
void connectionOutput(const QString &identifier, const QByteArray &msg) override
This method is called whenever the akonadi server sends some data out to a client.
Definition: dbustracer.cpp:50
void endConnection(const QString &identifier, const QString &msg) override
This method is called whenever a data (imap) connection to akonadi server is closed.
Definition: dbustracer.cpp:40
void error(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output an error.
Definition: dbustracer.cpp:65
Helper integration between Akonadi and Qt.
This interface can be reimplemented to deliver tracing information of the akonadi server to the outsi...
void connectionInput(const QString &identifier, const QByteArray &msg) override
This method is called whenever the akonadi server retrieves some data from the outside.
Definition: dbustracer.cpp:45
void signal(const QString &signalName, const QString &msg) override
This method is called whenever a dbus signal is emitted on the bus.
Definition: dbustracer.cpp:55
void beginConnection(const QString &identifier, const QString &msg) override
This method is called whenever a new data (imap) connection to the akonadi server is established...
Definition: dbustracer.cpp:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue May 26 2020 22:46:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.