9#ifndef BLUEZQT_PROFILE_H
10#define BLUEZQT_PROFILE_H
14#include "bluezqt_export.h"
20class QDBusUnixFileDescriptor;
46class BLUEZQT_EXPORT
Profile :
public QObject
50 Q_PROPERTY(QString uuid READ uuid)
66 explicit Profile(QObject *parent =
nullptr);
89 virtual QString
uuid()
const = 0;
197 QSharedPointer<QLocalSocket>
createSocket(
const QDBusUnixFileDescriptor &fd);
223 virtual void newConnection(DevicePtr device,
const QDBusUnixFileDescriptor &fd,
const QVariantMap &properties,
const Request<> &request);
249 class ProfilePrivate *
const d;
Bluetooth manager.
Definition manager.h:78
Bluetooth profile.
Definition profile.h:47
virtual void newConnection(DevicePtr device, const QDBusUnixFileDescriptor &fd, const QVariantMap &properties, const Request<> &request)
Requests the new connection.
void setServiceRecord(const QString &serviceRecord)
Sets a SDP record.
void setLocalRole(LocalRole role)
Sets the local role to identify side.
QSharedPointer< QLocalSocket > createSocket(const QDBusUnixFileDescriptor &fd)
Creates a socket from file descriptor.
void setRequireAuthorization(bool require)
Sets whether the authorization is required to connect.
virtual void release()
Indicates that the profile was unregistered.
Profile(QObject *parent=nullptr)
Creates a new Profile object.
void setName(const QString &name)
Sets the human readable name of the profile.
void setAutoConnect(bool autoConnect)
Sets whether the profile is automatically connected.
void setRequireAuthentication(bool require)
Sets whether the pairing is required to connect.
virtual QString uuid() const =0
UUID of the profile.
void setFeatures(quint16 features)
Sets the profile features.
void setService(const QString &service)
Sets the primary service class UUID (if different from profile UUID).
virtual void requestDisconnection(DevicePtr device, const Request<> &request)
Requests the disconnection of the profile.
void setPsm(quint16 psm)
Sets the L2CAP port number.
LocalRole
Local role to identify sides in asymmetric profiles.
Definition profile.h:54
@ ClientRole
Indicates that this is a client.
Definition profile.h:56
@ ServerRole
Indicates that this is a server.
Definition profile.h:58
void setVersion(quint16 version)
Sets the profile version.
~Profile() override
Destroys a Profile object.
virtual QDBusObjectPath objectPath() const =0
D-Bus object path of the profile.
void setChannel(quint16 channel)
Sets the RFCOMM channel number.
D-Bus request.
Definition request.h:39