QBluetoothServiceInfo
#include <QtConnectivity/QBluetoothServiceInfo>
More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QBluetoothServiceInfo
The QBluetoothServiceInfo class provides information about services.
QtConnectivity
QBluetoothServiceInfo provides information about a service offered by a Bluetooth device.
Overview
Classes
Alternative |
The Alternative class provides a data type for Bluetooth Data Element Alternative attributes. |
Sequence |
The Sequence class provides a data type for Bluetooth Data Element Sequence attributes. |
Public Types Index
enum AttributeIdServiceRecordHandle 0x0000, ServiceClassIds 0x0001, ServiceId 0x0003, ProtocolDescriptorList 0x0004, BrowseGroupList 0x0005, ServiceAvailability 0x0008, PrimaryLanguageBase 0x0100, ServiceName PrimaryLanguageBase + 0x0000, ServiceDescription PrimaryLanguageBase + 0x0001, ServiceProvider PrimaryLanguageBase + 0x0002 | |
enum Protocol |
Protected Attributes Index
QBluetoothServiceInfoPrivate * | d_ptr |
Public Functions Index
QBluetoothServiceInfo () | |
QBluetoothServiceInfo (const QBluetoothServiceInfo &other) | |
~QBluetoothServiceInfo () | |
QVariant | attribute (quint16 attributeId) const |
QList< quint16 > | attributes () const |
bool | contains (quint16 attributeId) const |
QBluetoothDeviceInfo | device () const |
bool | isComplete () const |
bool | isRegistered () const |
bool | isValid () const |
QBluetoothServiceInfo & | operator= (const QBluetoothServiceInfo &other) |
QBluetoothServiceInfo::Sequence | protocolDescriptor (QBluetoothUuid::ProtocolUuid protocol) const |
int | protocolServiceMultiplexer () const |
bool | registerService () const |
void | removeAttribute (quint16 attributeId) |
int | serverChannel () const |
quint8 | serviceAvailability () const |
QList< QBluetoothUuid > | serviceClassUuids () const |
QString | serviceDescription () const |
QString | serviceName () const |
QString | serviceProvider () const |
QBluetoothUuid | serviceUuid () const |
void | setAttribute (quint16 attributeId, const QVariant &value) |
void | setAttribute (quint16 attributeId, const QBluetoothUuid &value) |
void | setAttribute (quint16 attributeId, const QBluetoothServiceInfo::Sequence &value) |
void | setAttribute (quint16 attributeId, const QBluetoothServiceInfo::Alternative &value) |
void | setDevice (const QBluetoothDeviceInfo &info) |
void | setServiceAvailability (quint8 availability) |
void | setServiceDescription (const QString &description) |
void | setServiceName (const QString &name) |
void | setServiceProvider (const QString &provider) |
void | setServiceUuid (const QBluetoothUuid &uuid) |
QBluetoothServiceInfo::Protocol | socketProtocol () const |
bool | unregisterService () const |
Public Types
Bluetooth service attributes.
ServiceClassIds UUIDs of service classes that the service conforms to. ServiceId UUID that uniquely identifies the service. ProtocolDescriptorList List of protocols used by the service. BrowseGroupList List of browse groups the service is in. ServiceAvailability Value indicating the availability of the service. PrimaryLanguageBase Base index for primary language text descriptors. ServiceRecordHandle Specifies a service record from which attributes can be retrieved ServiceName Name of the Bluetooth service in the primary language. ServiceDescription Description of the Bluetooth service in the primary language. ServiceProvider Name of the company / entity that provides the Bluetooth service primary language.
- ServiceRecordHandle 0x0000
- ServiceClassIds 0x0001
- ServiceId 0x0003
- ProtocolDescriptorList 0x0004
- BrowseGroupList 0x0005
- ServiceAvailability 0x0008
- PrimaryLanguageBase 0x0100
- ServiceName PrimaryLanguageBase + 0x0000
- ServiceDescription PrimaryLanguageBase + 0x0001
- ServiceProvider PrimaryLanguageBase + 0x0002
This enum describes the socket protocol used by the service.
UnknownProtocol The service uses an unknown socket protocol. L2capProtocol The service uses the L2CAP socket protocol. RfcommProtocol The service uses the RFCOMM socket protocol.
- UnknownProtocol
- L2capProtocol
- RfcommProtocol
Public Attributes
Protected Attributes
QBluetoothServiceInfoPrivate *
Public Functions
Construct a new invalid QBluetoothServiceInfo;.
Construct a new QBluetoothServiceInfo that is a copy of other.
Destructor.
QVariant
Returns the value of the attribute attributeId.
QList< quint16 >
Returns a list of all attribute ids that this service info has.
bool
Returns true if the service info contains the attribute attributeId; otherwise returns false.
QBluetoothDeviceInfo
Returns the address of the Bluetooth device that provides this service.
bool
Returns true if the Bluetooth service info object is considered complete; otherwise returns false.
A complete service info contains a ProtocolDescriptorList attribute.
bool
Returns true if the service info is registered with the platforms service discovery protocol (SDP) implementation; otherwise returns false.
bool
Returns true if the Bluetooth service info object is valid; otherwise returns false.
An invalid Bluetooth service info has no attributes.
QBluetoothServiceInfo &
Makes a copy of the other and assigns it to this QBluetoothServiceInfo object.
QBluetoothServiceInfo::Sequence
Returns the protocol parameters as a QBluetoothServiceInfo::Sequence for protocol protocol.
An empty QBluetoothServiceInfo::Sequence is returned if protocol is not supported.
int
This is a convenience function.
Returns the protocol/service multiplexer for services which support the L2CAP protocol. Otherwise returns -1.
This function is equivalent to extracting the information from the QBluetoothServiceInfo::Sequence returned from QBluetoothServiceInfo::attribute(QBluetoothServiceInfo::ProtocolDescriptorList).
bool
Registers this service with the platforms service discovery protocol (SDP) implementation, making it findable by other devices when they perform service discovery.
Returns true if the service is successfully registered, otherwise returns false. Once registered changes to the record cannot be made. The service must be unregistered and registered.
void
Removes the attribute attributeId from this service info.
int
This is a convenience function.
Returns the server channel for services which support the RFCOMM protocol. Otherwise returns -1.
This function is equivalent to extracting the information from the QBluetoothServiceInfo::Sequence returned from QBluetoothServiceInfo::attribute(QBluetootherServiceInfo::ProtocolDescriptorList).
QList< QBluetoothUuid >
This is a convenience function.
It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceClassIds).value<QList<QBluetoothUuid> >().
Returns a list of UUIDs describing the service classes that this service conforms to.
QString
This is a convenience function.
It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceDescription).toString().
Returns the service description in the primary language.
QString
This is a convenience function.
It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceName).toString().
Returns the service name in the primary language.
QString
This is a convenience function.
It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceProvider).toString().
Returns the service provider in the primary language.
QBluetoothUuid
This is a convenience function.
It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceId).value<QBluetoothUuid>().
Returns the UUID of the service.
void
Sets the attribute identified by attributeId to value.
IF the service info is registered with the platforms SDP database the database entry is also updated.
void
This is a convenience function.
Sets the attribute identified by attributeId to value.
void
This is a convenience function.
Sets the attribute identified by attributeId to value.
void
This is a convenience function.
Sets the attribute identified by attributeId to value.
void
Sets the Bluetooth device that provides this service to device.
void
This is a convenience function.
It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceAvailability, availability).
Sets the availabiltiy of the service to availability.
void
This is a convenience function.
It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceDescription, description).
Sets the service description in the primary language to description.
void
This is a convenience function.
It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceName, name).
Sets the service name in the primary language to name.
void
This is a convenience function.
It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceProvider, provider).
Sets the service provider in the primary language to provider.
void
This is a convenience function.
It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceId, uuid).
Sets the service UUID to uuid.
QBluetoothServiceInfo::Protocol
Returns the protocol that this service uses.
bool
Unregisters this service with the platforms service discovery protocol (SDP) implementation.
This service will not longer be findable by other devices via service discovery.
Returns true if the service is successfully unregistered, otherwise returns false.
© 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Documentation sources may be obtained from www.qt-project.org.
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy