1/*
2 * BluezQt - Asynchronous BlueZ wrapper library
3 *
4 * SPDX-FileCopyrightText: 2015 David Rosca <nowrep@gmail.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#ifndef BLUEZQT_INPUT_H
10#define BLUEZQT_INPUT_H
11
12#include <QObject>
13
14#include "bluezqt_export.h"
15#include "types.h"
16
17#include <memory>
18
19namespace BluezQt
20{
21/**
22 * @class BluezQt::Input input.h <BluezQt/Input>
23 *
24 * %Device input.
25 *
26 * This class represents an input interface.
27 */
28class BLUEZQT_EXPORT Input : public QObject
29{
30 Q_OBJECT
31 Q_PROPERTY(ReconnectMode reconnectMode READ reconnectMode NOTIFY reconnectModeChanged)
32
33public:
34 /** Reconnect mode. */
35 enum ReconnectMode {
36 /** Device and host are not required to automatically restore the connection. */
37 NoReconnect,
38 /** Host restores the connection. */
39 HostReconnect,
40 /** Device restores the connection. */
41 DeviceReconnect,
42 /** Device shall attempt to restore the lost connection, but host may also restore the connection. */
43 AnyReconnect,
44 };
45 Q_ENUM(ReconnectMode)
46
47 /**
48 * Destroys an Input object.
49 */
50 ~Input() override;
51
52 /**
53 * Returns a shared pointer from this.
54 *
55 * @return InputPtr
56 */
57 InputPtr toSharedPtr() const;
58
59 /**
60 * Returns the reconnect mode.
61 *
62 * @return reconnect mode
63 */
64 ReconnectMode reconnectMode() const;
65
66Q_SIGNALS:
67 /**
68 * Indicates that input's reconnect mode have changed.
69 */
70 void reconnectModeChanged(ReconnectMode mode);
71
72private:
73 BLUEZQT_NO_EXPORT explicit Input(const QString &path, const QVariantMap &properties);
74
75 std::unique_ptr<class InputPrivate> const d;
76
77 friend class InputPrivate;
78 friend class DevicePrivate;
79};
80
81} // namespace BluezQt
82
83#endif // BLUEZQT_INPUT_H
84

source code of bluez-qt/src/input.h