Baloo

monitorcommand.h
1/*
2 This file is part of the KDE Baloo Project
3 SPDX-FileCopyrightText: 2015 Pinak Ahuja <pinak.ahuja@gmail.com>
4 SPDX-FileCopyrightText: 2015 Vishesh Handa <vhanda@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef MONITOR_H
10#define MONITOR_H
11
12#include "command.h"
13#include "fileindexerinterface.h"
14#include "schedulerinterface.h"
15#include <QObject>
16#include <QTextStream>
17#include <KLocalizedString>
18
19namespace Baloo {
20
21class MonitorCommand : public QObject, public Command
22{
24public:
25 explicit MonitorCommand(QObject* parent = nullptr);
26
27 QString command() override {
28 return QStringLiteral("monitor");
29 }
30
31 QString description() override {
32 return i18n("CLI interface for monitoring Baloo");
33 }
34
35 int exec(const QCommandLineParser& parser) override;
36
37private Q_SLOTS:
38 void startedIndexingFile(const QString& filePath);
39 void finishedIndexingFile(const QString& filePath);
40 void stateChanged(int state);
41 void balooIsAvailable();
42 void balooIsNotAvailable();
43
44private:
45 QTextStream m_out;
46 QTextStream m_err;
47 org::kde::baloo::fileindexer* m_indexerDBusInterface;
48 org::kde::baloo::scheduler* m_schedulerDBusInterface;
49 QString m_currentFile;
50 QDBusServiceWatcher* m_dbusServiceWatcher;
51};
52}
53#endif // MONITOR_H
QString i18n(const char *text, const TYPE &arg...)
Implements storage for docIds without any associated data Instantiated for:
Definition coding.cpp:11
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.