summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/android/androidutils_p.h
diff options
context:
space:
mode:
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