qbluetoothlocaldevice.sip 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // qbluetoothlocaldevice.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtBluetooth Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  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. %If (Qt_6_2_0 -)
  22. class QBluetoothLocalDevice : public QObject
  23. {
  24. %TypeHeaderCode
  25. #include <qbluetoothlocaldevice.h>
  26. %End
  27. public:
  28. enum Pairing
  29. {
  30. Unpaired,
  31. Paired,
  32. AuthorizedPaired,
  33. };
  34. enum HostMode
  35. {
  36. HostPoweredOff,
  37. HostConnectable,
  38. HostDiscoverable,
  39. HostDiscoverableLimitedInquiry,
  40. };
  41. enum Error
  42. {
  43. NoError,
  44. PairingError,
  45. %If (Qt_6_4_0 -)
  46. MissingPermissionsError,
  47. %End
  48. UnknownError,
  49. };
  50. explicit QBluetoothLocalDevice(QObject *parent /TransferThis/ = 0);
  51. QBluetoothLocalDevice(const QBluetoothAddress &address, QObject *parent /TransferThis/ = 0);
  52. virtual ~QBluetoothLocalDevice();
  53. bool isValid() const;
  54. void requestPairing(const QBluetoothAddress &address, QBluetoothLocalDevice::Pairing pairing);
  55. QBluetoothLocalDevice::Pairing pairingStatus(const QBluetoothAddress &address) const;
  56. void setHostMode(QBluetoothLocalDevice::HostMode mode);
  57. QBluetoothLocalDevice::HostMode hostMode() const;
  58. void powerOn();
  59. QString name() const;
  60. QBluetoothAddress address() const;
  61. static QList<QBluetoothHostInfo> allDevices();
  62. QList<QBluetoothAddress> connectedDevices() const;
  63. signals:
  64. void hostModeStateChanged(QBluetoothLocalDevice::HostMode state);
  65. void pairingFinished(const QBluetoothAddress &address, QBluetoothLocalDevice::Pairing pairing);
  66. void errorOccurred(QBluetoothLocalDevice::Error error);
  67. void deviceConnected(const QBluetoothAddress &address);
  68. void deviceDisconnected(const QBluetoothAddress &address);
  69. };
  70. %End