Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qpermissions_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QPERMISSIONS_P_H
5#define QPERMISSIONS_P_H
6
7#include "qpermissions.h"
8
9#include <private/qglobal_p.h>
10#include <QtCore/qloggingcategory.h>
11
12#include <QtCore/QObject>
13
14#include <functional>
15
17
18//
19// W A R N I N G
20// -------------
21//
22// This file is not part of the Qt API. It exists purely as an
23// implementation detail. This header file may change from version to
24// version without notice, or even be removed.
25//
26// We mean it.
27//
28
30
32
33namespace QPermissions::Private
34{
36
38 void requestPermission(const QPermission &permission, const PermissionCallback &callback);
39}
40
41#define QPermissionPluginInterface_iid "org.qt-project.QPermissionPluginInterface.6.5"
42
43class Q_CORE_EXPORT QPermissionPlugin : public QObject
44{
45public:
46 virtual ~QPermissionPlugin();
47
48 virtual Qt::PermissionStatus checkPermission(const QPermission &permission) = 0;
49 virtual void requestPermission(const QPermission &permission,
50 const QPermissions::Private::PermissionCallback &callback) = 0;
51};
52
53QT_END_NAMESPACE
54
55#endif // QPERMISSIONS_P_H
Access Bluetooth peripherals.
Access the user's calendar.
Access the user's contacts.
Access the user's location.
Availability
This enum is used to control the availability of the location data.
\inmodule QtCore \inheaderfile QPermissions
std::optional< T > value() const
QPermission()=default
QPermission(const T &t)
QMetaType type() const
Returns the type of the permission.
Qt::PermissionStatus status() const
Returns the status of the permission.
void requestPermission(const QPermission &permission, const PermissionCallback &callback)
Qt::PermissionStatus checkPermission(const QPermission &permission)
#define QT_PERMISSION_IMPL_COMMON(ClassName)
#define QT_PERMISSION(ClassName)
QT_REQUIRE_CONFIG(permissions)
#define Q_DECLARE_MINIMAL_PERMISSION(ClassName)
QT_BEGIN_NAMESPACE QT_DECLARE_EXPORTED_QT_LOGGING_CATEGORY(lcAotCompiler, Q_QMLCOMPILER_EXPORT)