BluezQt

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

KDE's Doxygen guidelines are available online.