BluezQt

gattapplication.h
1 /*
2  * BluezQt - Asynchronous BlueZ wrapper library
3  *
4  * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <[email protected]>
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7  */
8 
9 #ifndef BLUEZQT_GATTAPPLICATION_H
10 #define BLUEZQT_GATTAPPLICATION_H
11 
12 #include <QObject>
13 
14 #include "bluezqt_export.h"
15 
16 class QDBusObjectPath;
17 
18 namespace BluezQt
19 {
20 /**
21  * @class BluezQt::GattApplication GattApplication.h <BluezQt/GattApplication>
22  *
23  * Bluetooth GattApplication.
24  *
25  * This class represents a Bluetooth GattApplication, which is the root node of
26  * a GATT object hierarchy. Its child nodes can be GattServices,
27  * GattCharacteristics and GattDescriptors that belong to that GattApplication.
28  * The object path prefix for GattApplications is freely definable and its
29  * children's paths follow the application path hierarchy automatically, while
30  * all instances are enumerated automatically as well.
31  *
32  * Object path: [variable prefix]/appXX/serviceYY/charZZ
33  *
34  */
35 class BLUEZQT_EXPORT GattApplication : public QObject
36 {
37  Q_OBJECT
38 
39 public:
40  /**
41  * Creates a new GattApplication object with default object path prefix.
42  *
43  * Object path: /org/kde/bluezqt/appXX/serviceYY/charZZ
44  *
45  * @param parent
46  */
47  explicit GattApplication(QObject *parent = nullptr);
48 
49  /**
50  * Creates a new GattApplication object with custom object path prefix.
51  *
52  * Object path: [objectPathPrefix]/appXX/serviceYY/charZZ
53  *
54  * @param objectPathPrefix
55  * @param parent
56  */
57  explicit GattApplication(const QString &objectPathPrefix, QObject *parent = nullptr);
58 
59  /**
60  * Destroys a GattApplication object.
61  */
62  ~GattApplication() override;
63 
64 private:
65  /**
66  * D-Bus object path of the GATT application.
67  *
68  * The path where the GATT application will be registered.
69  *
70  * @note You must provide valid object path!
71  *
72  * @return object path of GATT application
73  */
74  virtual QDBusObjectPath objectPath() const;
75 
76  class GattApplicationPrivate *const d;
77 
78  friend class GattManager;
79  friend class GattService;
80  friend class ObjectManagerAdaptor;
81 };
82 
83 } // namespace BluezQt
84 
85 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jun 4 2023 04:06:01 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.