BluezQt

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