qbluetoothdevicediscoveryagent.sip 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // qbluetoothdevicediscoveryagent.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 QBluetoothDeviceDiscoveryAgent : public QObject
  23. {
  24. %TypeHeaderCode
  25. #include <qbluetoothdevicediscoveryagent.h>
  26. %End
  27. public:
  28. enum Error
  29. {
  30. NoError,
  31. InputOutputError,
  32. PoweredOffError,
  33. InvalidBluetoothAdapterError,
  34. UnsupportedPlatformError,
  35. UnsupportedDiscoveryMethod,
  36. LocationServiceTurnedOffError,
  37. %If (Qt_6_4_0 -)
  38. MissingPermissionsError,
  39. %End
  40. UnknownError,
  41. };
  42. explicit QBluetoothDeviceDiscoveryAgent(QObject *parent /TransferThis/ = 0);
  43. QBluetoothDeviceDiscoveryAgent(const QBluetoothAddress &deviceAdapter, QObject *parent /TransferThis/ = 0);
  44. virtual ~QBluetoothDeviceDiscoveryAgent();
  45. bool isActive() const;
  46. QBluetoothDeviceDiscoveryAgent::Error error() const;
  47. QString errorString() const;
  48. QList<QBluetoothDeviceInfo> discoveredDevices() const;
  49. public slots:
  50. void start();
  51. void start(QBluetoothDeviceDiscoveryAgent::DiscoveryMethods method);
  52. void stop();
  53. signals:
  54. void deviceDiscovered(const QBluetoothDeviceInfo &info);
  55. void finished();
  56. void errorOccurred(QBluetoothDeviceDiscoveryAgent::Error error);
  57. void canceled();
  58. void deviceUpdated(const QBluetoothDeviceInfo &info, QBluetoothDeviceInfo::Fields updatedFields);
  59. public:
  60. enum DiscoveryMethod /BaseType=Flag/
  61. {
  62. NoMethod,
  63. ClassicMethod,
  64. LowEnergyMethod,
  65. };
  66. typedef QFlags<QBluetoothDeviceDiscoveryAgent::DiscoveryMethod> DiscoveryMethods;
  67. void setLowEnergyDiscoveryTimeout(int msTimeout);
  68. int lowEnergyDiscoveryTimeout() const;
  69. static QBluetoothDeviceDiscoveryAgent::DiscoveryMethods supportedDiscoveryMethods();
  70. };
  71. %End