diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-04-24 10:13:37 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-04-24 10:13:37 +0300 |
commit | da6113cb52beb5731d8c95ecbfc375936f59def2 (patch) | |
tree | 81a617b98e6e04d660fb2e75aae942a49ed7c2a1 /src/bluetooth/android/androidutils_p.h | |
parent | 3dcb548bd6fe4aa488ca0bac95e65a7a366c3eca (diff) | |
parent | ca96a42035255b4355e4d8ddba7f5da7b9006577 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.10' into tqtc/lts-5.15-opensource
Change-Id: I19a002f2b52eb02d4bfdf32c336811a71d42e9f2
Diffstat (limited to 'src/bluetooth/android/androidutils_p.h')
-rw-r--r-- | src/bluetooth/android/androidutils_p.h | 71 |
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 |