// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QOHOSAPPPERMISSIONSUTILS_P_H
#define QOHOSAPPPERMISSIONSUTILS_P_H

#include <QtCore/private/qohoscommon_p.h>
#include <QtCore/qglobal.h>
#include <QtCore/qobject.h>
#include <QtCore/qstring.h>
#include <QtGui/qwindow.h>
#include <QtOhosExtras/qohosapppermissions.h>

QT_BEGIN_NAMESPACE

namespace QtOhosExtras {

QOhosOptional<QString> tryMapQOhosPermissionToName(AppPermissions::Permission permission);

QOhosOptional<AppPermissions::Permission> tryMapQOhosPermissionFromName(const QString &permissionName);

void requestQOhosPermissionFromUserIfNeeded(
    QObject *resultConsumerQtContext, QWindow *optInstanceMainWindow, const QString &permissionName,
    QOhosConsumer<AppPermissions::PermissionResult> resultConsumer);

void requestQOhosPermissionOnSettingIfNeeded(
    QObject *resultConsumerQtContext, QWindow *optInstanceMainWindow, AppPermissions::Permission permission,
    QOhosConsumer<bool> resultConsumer);

}

QT_END_NAMESPACE

#endif
