Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qbluetoothuuid_darwin.mm
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include "qbluetoothuuid.h"
7
9
18QBluetoothUuid QBluetoothUuid::fromCBUUID(CBUUID *cbUuid)
19{
20 if (!cbUuid)
21 return {};
22
23 return DarwinBluetooth::qt_uuid(cbUuid);
24}
25
37CBUUID *QBluetoothUuid::toCBUUID() const
38{
39 const auto cbUuidGuard = DarwinBluetooth::cb_uuid(*this);
40 // cb_uuid returns a strong reference (RAII object). Let
41 // it do its job and release, but we return auto-released
42 // CBUUID, as documented.
43 return [[cbUuidGuard.data() retain] autorelease];
44}
45
\inmodule QtBluetooth
ObjCStrongReference< CBUUID > cb_uuid(const QBluetoothUuid &qtUuid)
Definition btutility.mm:174
QBluetoothUuid qt_uuid(NSUUID *nsUuid)
Combined button and popup list for selecting options.