BluezQt

media.h
1 /*
2  * BluezQt - Asynchronous BlueZ wrapper library
3  *
4  * SPDX-FileCopyrightText: 2018 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_MEDIA_H
10 #define BLUEZQT_MEDIA_H
11 
12 #include <QObject>
13 
14 #include "bluezqt_export.h"
15 
16 namespace BluezQt
17 {
18 class MediaEndpoint;
19 class PendingCall;
20 
21 /**
22  * @class BluezQt::Media Media.h <BluezQt/Media>
23  *
24  * Bluetooth Media.
25  *
26  * This allows media endpoints to be established in accordance with the
27  * capabilities of a specific media service profile.
28  *
29  * For example, an A2DP media endpoint could be created allowing data from a
30  * remote device to be streamed to/from the sender.
31  *
32  * Each media endpoint is associated with a service object instance that
33  * implements the required behaviours of the endpoint. The service object
34  * must be created at a given path before it is registered.
35  *
36  * @see MediaEndpoint
37  */
38 class BLUEZQT_EXPORT Media : public QObject
39 {
40  Q_OBJECT
41 
42 public:
43  /**
44  * Destroys a Media object.
45  */
46  ~Media() override;
47 
48  /**
49  * Registers endpoint.
50  *
51  * Register a local end point to sender, the sender can register as many end points as it likes.
52  *
53  * Note: If the sender disconnects the end points are automatically unregistered.
54  *
55  * Possible errors: PendingCall::InvalidArguments, PendingCall::NotSupported
56  *
57  * @param endpoint endpoint to be registered
58  * @return void pending call
59  */
60  PendingCall *registerEndpoint(MediaEndpoint *endpoint);
61 
62  /**
63  * Unregisters endpoint.
64  *
65  * @param endpoint endpoint to be unregistered
66  * @return void pending call
67  */
68  PendingCall *unregisterEndpoint(MediaEndpoint *endpoint);
69 
70 private:
71  explicit Media(const QString &path, QObject *parent = nullptr);
72 
73  class MediaPrivate *const d;
74 
75  friend class AdapterPrivate;
76 };
77 
78 } // namespace BluezQt
79 
80 #endif // BLUEZQT_MEDIA_H
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.