1// qbluetoothlocaldevice.sip generated by MetaSIP 2// 3// This file is part of the QtBluetooth Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23%If (Qt_5_2_0 -) 24 25class QBluetoothLocalDevice : QObject 26{ 27%TypeHeaderCode 28#include <qbluetoothlocaldevice.h> 29%End 30 31public: 32 enum Pairing 33 { 34 Unpaired, 35 Paired, 36 AuthorizedPaired, 37 }; 38 39 enum HostMode 40 { 41 HostPoweredOff, 42 HostConnectable, 43 HostDiscoverable, 44 HostDiscoverableLimitedInquiry, 45 }; 46 47 enum Error 48 { 49 NoError, 50 PairingError, 51 UnknownError, 52 }; 53 54%If (Qt_5_6_1 -) 55 explicit QBluetoothLocalDevice(QObject *parent /TransferThis/ = 0); 56%End 57%If (- Qt_5_6_1) 58 QBluetoothLocalDevice(QObject *parent /TransferThis/ = 0); 59%End 60 QBluetoothLocalDevice(const QBluetoothAddress &address, QObject *parent /TransferThis/ = 0); 61 virtual ~QBluetoothLocalDevice(); 62 bool isValid() const; 63 void requestPairing(const QBluetoothAddress &address, QBluetoothLocalDevice::Pairing pairing); 64 QBluetoothLocalDevice::Pairing pairingStatus(const QBluetoothAddress &address) const; 65 void setHostMode(QBluetoothLocalDevice::HostMode mode); 66 QBluetoothLocalDevice::HostMode hostMode() const; 67 void powerOn(); 68 QString name() const; 69 QBluetoothAddress address() const; 70 static QList<QBluetoothHostInfo> allDevices(); 71%If (Qt_5_3_0 -) 72 QList<QBluetoothAddress> connectedDevices() const; 73%End 74 75public slots: 76 void pairingConfirmation(bool confirmation); 77 78signals: 79 void hostModeStateChanged(QBluetoothLocalDevice::HostMode state); 80 void pairingFinished(const QBluetoothAddress &address, QBluetoothLocalDevice::Pairing pairing); 81 void pairingDisplayPinCode(const QBluetoothAddress &address, QString pin); 82 void pairingDisplayConfirmation(const QBluetoothAddress &address, QString pin); 83 void error(QBluetoothLocalDevice::Error error); 84%If (Qt_5_3_0 -) 85 void deviceConnected(const QBluetoothAddress &address); 86%End 87%If (Qt_5_3_0 -) 88 void deviceDisconnected(const QBluetoothAddress &address); 89%End 90}; 91 92%End 93