Dokit
dev
v0.6.0
v0.5.8
v0.5.7
v0.5.6
v0.5.5
v0.5.4
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.2
v0.1.1
v0.1.0
User docs
Internal
Coverage
Internal development documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
infocommand.h
1
// SPDX-FileCopyrightText: 2022-2026 Paul Colby <git@colby.id.au>
2
// SPDX-License-Identifier: LGPL-3.0-or-later
3
4
#include "devicecommand.h"
5
6
QTPOKIT_FORWARD_DECLARE_CLASS
(
DeviceInfoService
)
7
8
class
InfoCommand
: public
DeviceCommand
9
{
10
Q_OBJECT
11
12
public
:
13
explicit
InfoCommand
(
QObject
*
const
parent
=
nullptr
);
14
15
QStringList
requiredOptions
(
const
QCommandLineParser
&parser)
const override
;
16
QStringList
supportedOptions
(
const
QCommandLineParser
&parser)
const override
;
17
18
public
slots:
19
QStringList
processOptions
(
const
QCommandLineParser
&parser)
override
;
20
21
protected
:
22
AbstractPokitService
*
getService
()
override
;
23
24
protected
slots:
25
void
serviceDetailsDiscovered
()
override
;
26
27
private
:
28
DeviceInfoService
*
service
{
nullptr
};
///< Bluetooth service this command interacts with.
29
30
QTPOKIT_BEFRIEND_TEST
(
InfoCommand
)
31
};
AbstractPokitService
The AbstractPokitService class provides a common base for Pokit services classes.
Definition
abstractpokitservice.h:27
DeviceCommand::DeviceCommand
DeviceCommand(QObject *const parent=nullptr)
Construct a new DeviceCommand object with parent.
Definition
devicecommand.cpp:21
DeviceInfoService
The DeviceInfoService class accesses the Device Info service of Pokit devices.
Definition
deviceinfoservice.h:23
InfoCommand
The InfoCommand class implements the info CLI command.
Definition
infocommand.h:9
InfoCommand::requiredOptions
QStringList requiredOptions(const QCommandLineParser &parser) const override
Returns a list of CLI option names required by this command.
Definition
infocommand.cpp:31
InfoCommand::serviceDetailsDiscovered
void serviceDetailsDiscovered() override
Handles service detail discovery events.
Definition
infocommand.cpp:78
InfoCommand::supportedOptions
QStringList supportedOptions(const QCommandLineParser &parser) const override
Returns a list of CLI option names supported by this command.
Definition
infocommand.cpp:37
InfoCommand::service
DeviceInfoService * service
Bluetooth service this command interacts with.
Definition
infocommand.h:28
InfoCommand::getService
AbstractPokitService * getService() override
Returns a Pokit service object for the derived command class.
Definition
infocommand.cpp:63
InfoCommand::processOptions
QStringList processOptions(const QCommandLineParser &parser) override
Processes the relevant options from the command line parser.
Definition
infocommand.cpp:48
InfoCommand::InfoCommand
InfoCommand(QObject *const parent=nullptr)
Construct a new InfoCommand object with parent.
Definition
infocommand.cpp:26
QCommandLineParser
QObject::QObject
QObject(QObject *parent)
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QStringList
QTPOKIT_FORWARD_DECLARE_CLASS
#define QTPOKIT_FORWARD_DECLARE_CLASS(name)
Macro for forward declaring classes in the QtPokit library's top-most namespace (if one is defined).
Definition
qtpokit_global.h:94
QTPOKIT_BEFRIEND_TEST
#define QTPOKIT_BEFRIEND_TEST(Class)
Macro for befriending a related unit test class, but only when QT_TESTLIB_LIB is defined.
Definition
qtpokit_global.h:118
dokit
dokit
src
cli
infocommand.h
Generated by
1.18.0