Akonadi

dbustracer.h
1 /***************************************************************************
2  * SPDX-FileCopyrightText: 2006 Tobias Koenig <[email protected]> *
3  * *
4  * SPDX-License-Identifier: LGPL-2.0-or-later *
5  ***************************************************************************/
6 
7 #pragma once
8 
9 #include <QObject>
10 
11 #include "tracerinterface.h"
12 
13 namespace Akonadi
14 {
15 namespace Server
16 {
17 /**
18  * A tracer which forwards all tracing information as dbus signals.
19  */
20 class DBusTracer : public QObject, public TracerInterface
21 {
22  Q_OBJECT
23 
24 public:
25  DBusTracer();
26  ~DBusTracer() override;
27 
28  void beginConnection(const QString &identifier, const QString &msg) override;
29  void endConnection(const QString &identifier, const QString &msg) override;
30  void connectionInput(const QString &identifier, const QByteArray &msg) override;
31  void connectionOutput(const QString &identifier, const QByteArray &msg) override;
32  void signal(const QString &signalName, const QString &msg) override;
33  void warning(const QString &componentName, const QString &msg) override;
34  void error(const QString &componentName, const QString &msg) override;
35 
36  TracerInterface::ConnectionFormat connectionFormat() const override
37  {
38  return TracerInterface::Json;
39  }
40 
41 Q_SIGNALS:
42  void connectionStarted(const QString &identifier, const QString &msg);
43  void connectionEnded(const QString &identifier, const QString &msg);
44  void connectionDataInput(const QString &identifier, const QString &msg);
45  void connectionDataOutput(const QString &identifier, const QString &msg);
46  void signalEmitted(const QString &signalName, const QString &msg);
47  void warningEmitted(const QString &componentName, const QString &msg);
48  void errorEmitted(const QString &componentName, const QString &msg);
49 };
50 
51 } // namespace Server
52 } // namespace Akonadi
53 
Q_OBJECTQ_OBJECT
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:27
void error(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output an error.
Definition: dbustracer.cpp:52
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:32
void warning(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output a warning.
Definition: dbustracer.cpp:47
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:42
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:37
Q_SIGNALSQ_SIGNALS
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:22
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.