BluezQt

gattservice.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_GATTSERVICE_H
10#define BLUEZQT_GATTSERVICE_H
11
12#include "bluezqt_export.h"
13#include "types.h"
14
15#include <QDBusObjectPath>
16
17#include <memory>
18
19namespace BluezQt
20{
21/**
22 * @class BluezQt::GattService GattService.h <BluezQt/GattService>
23 *
24 * Bluetooth GattService.
25 *
26 * This class represents a Bluetooth GattService.
27 */
28class GattApplication;
29class BLUEZQT_EXPORT GattService : public QObject
30{
31 Q_OBJECT
32
33public:
34 /**
35 * Creates a new GattService object.
36 *
37 * @param parent
38 */
39 explicit GattService(const QString &uuid, bool isPrimary, GattApplication *parent);
40
41 /**
42 * Destroys a GattService object.
43 */
44 ~GattService() override;
45
46 /**
47 * 128-bit service UUID.
48 *
49 * @return uuid of gatt service
50 */
51 QString uuid() const;
52
53 /**
54 * Indicates whether or not this GATT service is a
55 * primary service. If false, the service is secondary.
56 *
57 * @return true if gatt service is primary
58 */
59 bool isPrimary() const;
60
61protected:
62 /**
63 * D-Bus object path of the GattService.
64 *
65 * The path where the GattService will be registered.
66 *
67 * @note You must provide valid object path!
68 *
69 * @return object path of GattService
70 */
71 virtual QDBusObjectPath objectPath() const;
72
73private:
74 std::unique_ptr<class GattServicePrivate> const d;
75
76 friend class GattApplicationPrivate;
77 friend class GattCharacterisiticPrivate;
78 friend class GattCharacteristicAdaptor;
79 friend class GattManager;
80};
81
82} // namespace BluezQt
83
84#endif
Bluetooth GattManager.
~GattService() override
Destroys a GattService object.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:54:01 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.