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

KDE's Doxygen guidelines are available online.