Akonadi

filetracer.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_FILETRACER_H
21 #define AKONADI_FILETRACER_H
22 
23 #include "tracerinterface.h"
24 
25 #include <QFile>
26 
27 namespace Akonadi
28 {
29 namespace Server
30 {
31 
37 {
38 public:
39  explicit FileTracer(const QString &fileName);
40  ~FileTracer() override;
41 
42  void beginConnection(const QString &identifier, const QString &msg) override;
43  void endConnection(const QString &identifier, const QString &msg) override;
44  void connectionInput(const QString &identifier, const QByteArray &msg) override;
45  void connectionOutput(const QString &identifier, const QByteArray &msg) override;
46  void signal(const QString &signalName, const QString &msg) override;
47  void warning(const QString &componentName, const QString &msg) override;
48  void error(const QString &componentName, const QString &msg) override;
49 
50 private:
51  void output(const QString &id, const QString &msg);
52 
53  QFile m_file;
54 };
55 
56 } // namespace Server
57 } // namespace Akonadi
58 
59 #endif
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: filetracer.cpp:49
void warning(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output a warning.
Definition: filetracer.cpp:59
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: filetracer.cpp:34
void connectionInput(const QString &identifier, const QByteArray &msg) override
This method is called whenever the akonadi server retrieves some data from the outside.
Definition: filetracer.cpp:44
void signal(const QString &signalName, const QString &msg) override
This method is called whenever a dbus signal is emitted on the bus.
Definition: filetracer.cpp:54
A tracer which forwards all tracing information to a log file.
Definition: filetracer.h:36
void error(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output an error.
Definition: filetracer.cpp:64
void endConnection(const QString &identifier, const QString &msg) override
This method is called whenever a data (imap) connection to akonadi server is closed.
Definition: filetracer.cpp:39
Helper integration between Akonadi and Qt.
This interface can be reimplemented to deliver tracing information of the akonadi server to the outsi...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon May 25 2020 22:46:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.