summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2019-07-09 11:03:19 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2019-07-15 14:36:28 +0200
commit37c770825c1174c274fd09b2da1a7438d8c0a363 (patch)
treeff20fc90cb640e001f87ad860f101eddcfa07431 /src/bluetooth/osx
parentcf1cb5ef0ff41c9a66e64d272293ad04efa180f0 (diff)
Service discovery agent - remove the public API implementation (macOS)
Instead, use the shared implementation (and the declaration from the *_p.h) Fixes: QTBUG-75348 Change-Id: Icbcbb752df1a9b8865ea4f4ef06f2b59dda577cd Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/bluetooth/osx')
-rw-r--r--src/bluetooth/osx/osxbtsdpinquiry.mm9
-rw-r--r--src/bluetooth/osx/osxbtsdpinquiry_p.h14
2 files changed, 8 insertions, 15 deletions
diff --git a/src/bluetooth/osx/osxbtsdpinquiry.mm b/src/bluetooth/osx/osxbtsdpinquiry.mm
index a7bdc2c4..a2b02b1a 100644
--- a/src/bluetooth/osx/osxbtsdpinquiry.mm
+++ b/src/bluetooth/osx/osxbtsdpinquiry.mm
@@ -41,6 +41,7 @@
#include "osxbtsdpinquiry_p.h"
#include "qbluetoothuuid.h"
#include "osxbtutility_p.h"
+#include "btdelegates_p.h"
#include <QtCore/qvariant.h>
#include <QtCore/qstring.h>
@@ -49,10 +50,6 @@ QT_BEGIN_NAMESPACE
namespace OSXBluetooth {
-SDPInquiryDelegate::~SDPInquiryDelegate()
-{
-}
-
namespace {
QBluetoothUuid sdp_element_to_uuid(IOBluetoothSDPDataElement *element)
@@ -213,12 +210,12 @@ using namespace OSXBluetooth;
@implementation QT_MANGLE_NAMESPACE(OSXBTSDPInquiry)
{
- QT_PREPEND_NAMESPACE(OSXBluetooth::SDPInquiryDelegate) *delegate;
+ QT_PREPEND_NAMESPACE(DarwinBluetooth::SDPInquiryDelegate) *delegate;
IOBluetoothDevice *device;
bool isActive;
}
-- (id)initWithDelegate:(SDPInquiryDelegate *)aDelegate
+- (id)initWithDelegate:(DarwinBluetooth::SDPInquiryDelegate *)aDelegate
{
Q_ASSERT_X(aDelegate, Q_FUNC_INFO, "invalid delegate (null)");
diff --git a/src/bluetooth/osx/osxbtsdpinquiry_p.h b/src/bluetooth/osx/osxbtsdpinquiry_p.h
index dd38a28b..e2658670 100644
--- a/src/bluetooth/osx/osxbtsdpinquiry_p.h
+++ b/src/bluetooth/osx/osxbtsdpinquiry_p.h
@@ -68,17 +68,13 @@ QT_BEGIN_NAMESPACE
class QBluetoothServiceInfo;
class QVariant;
-namespace OSXBluetooth {
+namespace DarwinBluetooth {
-class SDPInquiryDelegate {
-public:
- typedef QT_MANGLE_NAMESPACE(OSXBTSDPInquiry) ObjCServiceInquiry;
+class SDPInquiryDelegate;
- virtual ~SDPInquiryDelegate();
+}
- virtual void SDPInquiryFinished(IOBluetoothDevice *device) = 0;
- virtual void SDPInquiryError(IOBluetoothDevice *device, IOReturn errorCode) = 0;
-};
+namespace OSXBluetooth {
void extract_service_record(IOBluetoothSDPServiceRecord *record, QBluetoothServiceInfo &serviceInfo);
QVariant extract_attribute_value(IOBluetoothSDPDataElement *dataElement);
@@ -90,7 +86,7 @@ QT_END_NAMESPACE
@interface QT_MANGLE_NAMESPACE(OSXBTSDPInquiry) : NSObject
-- (id)initWithDelegate:(QT_PREPEND_NAMESPACE(OSXBluetooth::SDPInquiryDelegate) *)aDelegate;
+- (id)initWithDelegate:(QT_PREPEND_NAMESPACE(DarwinBluetooth::SDPInquiryDelegate) *)aDelegate;
- (void)dealloc;
- (IOReturn)performSDPQueryWithDevice:(const QBluetoothAddress &)address;