10#include <QtCore/QLoggingCategory>
11#include <QtCore/QXmlStreamWriter>
12#include <QtCore/QAtomicInt>
30 case QMetaType::UChar:
36 case QMetaType::UShort:
53 case QMetaType::Short:
63 case QMetaType::QByteArray:
69 case QMetaType::QString:
86 if (
attribute.userType() == qMetaTypeId<QBluetoothUuid>()) {
111 }
else if (
attribute.userType() == qMetaTypeId<QBluetoothServiceInfo::Sequence>()) {
117 stream->writeEndElement();
118 }
else if (
attribute.userType() == qMetaTypeId<QBluetoothServiceInfo::Alternative>()) {
123 stream->writeEndElement();
131: serviceRecord(0), registered(
false)
153 if (profilePath.isEmpty())
157 reply.waitForFinished();
158 if (
reply.isError()) {
159 qCWarning(QT_BT_BLUEZ) <<
"Cannot unregister profile:" << profilePath
177 QXmlStreamWriter
stream(&xmlServiceRecord);
178 stream.setAutoFormatting(
true);
198 stream.writeEndDocument();
201 profilePath = u
"/qt/profile"_s;
218 if (profileUuid.
isNull()) {
223 for (
const auto &
e : seq) {
225 if (tempUuid.isNull())
231 profileUuid = tempUuid;
232 }
else if (firstCustomUuid.isNull()) {
233 firstCustomUuid = tempUuid;
239 if (!firstCustomUuid.isNull())
240 profileUuid = firstCustomUuid;
244 qCDebug(QT_BT_BLUEZ) <<
"Registering profile under" << profilePath << uuidString;
248 reply.waitForFinished();
249 if (
reply.isError()) {
QString sanitizeNameForDBus(const QString &text)
QT_BEGIN_NAMESPACE void initializeBluez5()
T fetchAndAddOrdered(T valueToAdd) noexcept
QMap< quint16, QVariant > attributes
QBluetoothServiceInfoPrivate()
bool registerService(const QBluetoothAddress &localAdapter=QBluetoothAddress())
bool isRegistered() const
~QBluetoothServiceInfoPrivate()
quint16 toUInt16(bool *ok=nullptr) const
Returns the 16 bit representation of this UUID.
int minimumSize() const
Returns the minimum size in bytes that this UUID can be represented in.
quint32 toUInt32(bool *ok=nullptr) const
Returns the 32 bit representation of this UUID.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
QByteArray toHex(char separator='\0') const
Returns a hex encoded copy of the byte array.
static qint64 applicationPid() Q_DECL_CONST_FUNCTION
QString applicationName
the name of this application
static QDBusConnection systemBus()
Returns a QDBusConnection object opened with the system bus.
T value(const Key &key, const T &defaultValue=T()) const
const_iterator constBegin() const
const_iterator constEnd() const
NetworkError error() const
Returns the error that was found during the processing of this request.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
QString toString(StringFormat mode=WithBraces) const
bool isNull() const noexcept
Returns true if this is the null UUID {00000000-0000-0000-0000-000000000000}; otherwise returns false...
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
Combined button and popup list for selecting options.
Q_CORE_EXPORT QtJniTypes::Service service()
static QAtomicInt pathCounter
static void writeAttribute(QXmlStreamWriter *stream, const QVariant &attribute)
EGLOutputLayerEXT EGLint attribute
#define qCWarning(category,...)
#define qCDebug(category,...)
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLsizei const GLfloat * v
[13]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLenum GLenum mapping
#define QStringLiteral(str)
QT_BEGIN_NAMESPACE typedef signed char qint8
\inmodule QtCore \reentrant