summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/android/androidutils_p.h
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-04-24 10:13:37 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-04-24 10:13:37 +0300
commitda6113cb52beb5731d8c95ecbfc375936f59def2 (patch)
tree81a617b98e6e04d660fb2e75aae942a49ed7c2a1 /src/bluetooth/android/androidutils_p.h
parent3dcb548bd6fe4aa488ca0bac95e65a7a366c3eca (diff)
parentca96a42035255b4355e4d8ddba7f5da7b9006577 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.10' into tqtc/lts-5.15-opensource
Diffstat (limited to 'src/bluetooth/android/androidutils_p.h')
-rw-r--r--src/bluetooth/android/androidutils_p.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/bluetooth/android/androidutils_p.h b/src/bluetooth/android/androidutils_p.h
new file mode 100644
index 00000000..2e2f6141
--- /dev/null
+++ b/src/bluetooth/android/androidutils_p.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtBluetooth module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
+#ifndef QANDROIDBLUETOOTHUTILS_H
+#define QANDROIDBLUETOOTHUTILS_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <qglobal.h>
+#include <QtCore/QString>
+
+QT_BEGIN_NAMESPACE
+
+enum class BluetoothPermission {
+ Scan,
+ Advertise,
+ Connect
+};
+
+// Checks if a permssion is already authorized and requests if not.
+// Returns true if permission is successfully authorized
+bool ensureAndroidPermission(BluetoothPermission permission);
+
+QT_END_NAMESPACE
+
+#endif // QANDROIDBLUETOOTHUTILS_H