BluezQt

obexsession.h
1 /*
2  * BluezQt - Asynchronous BlueZ wrapper library
3  *
4  * SPDX-FileCopyrightText: 2014-2015 David Rosca <[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_OBEXSESSION_H
10 #define BLUEZQT_OBEXSESSION_H
11 
12 #include <QObject>
13 
14 #include "bluezqt_export.h"
15 #include "types.h"
16 
17 class QDBusObjectPath;
18 
19 namespace BluezQt
20 {
21 class PendingCall;
22 
23 /**
24  * @class BluezQt::ObexSession obexsession.h <BluezQt/ObexSession>
25  *
26  * OBEX session.
27  *
28  * This class represents an OBEX session.
29  */
30 class BLUEZQT_EXPORT ObexSession : public QObject
31 {
32  Q_OBJECT
33 
34  Q_PROPERTY(QString source READ source)
35  Q_PROPERTY(QString destination READ destination)
36  Q_PROPERTY(quint8 channel READ channel)
37  Q_PROPERTY(QString target READ target)
38  Q_PROPERTY(QString root READ root)
39 
40 public:
41  /**
42  * Destroys an ObexSession object.
43  */
44  ~ObexSession() override;
45 
46  /**
47  * Returns a shared pointer from this.
48  *
49  * @return ObexSessionPtr
50  */
51  ObexSessionPtr toSharedPtr() const;
52 
53  /**
54  * D-Bus object path of the session.
55  *
56  * @return object path of session
57  */
58  QDBusObjectPath objectPath() const;
59 
60  /**
61  * Returns address of the Bluetooth adapter.
62  *
63  * @see Manager::adapterForAddress() const
64  *
65  * @return address of adapter
66  */
67  QString source() const;
68 
69  /**
70  * Returns address of the Bluetooth device.
71  *
72  * @see Manager::deviceForAddress() const
73  *
74  * @return address of device
75  */
76  QString destination() const;
77 
78  /**
79  * Returns the Bluetooth channel.
80  *
81  * @return channel
82  */
83  quint8 channel() const;
84 
85  /**
86  * Returns the target UUID.
87  *
88  * @return target UUID
89  */
90  QString target() const;
91 
92  /**
93  * Returns the root path.
94  *
95  * @return root path
96  */
97  QString root() const;
98 
99  /**
100  * Returns the remote device capabilities.
101  *
102  * Possible errors: PendingCall::NotSupported, PendingCall::Failed
103  *
104  * @return QString pending call
105  */
106  PendingCall *getCapabilities();
107 
108 private:
109  explicit ObexSession(const QString &path, const QVariantMap &properties);
110 
111  class ObexSessionPrivate *const d;
112 
113  friend class ObexSessionPrivate;
114  friend class ObexManagerPrivate;
115 };
116 
117 } // namespace BluezQt
118 
119 #endif // BLUEZQT_OBEXSESSION_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.