File indexing completed on 2024-05-12 15:57:04

0001 /*
0002  * SPDX-FileCopyrightText: 2022 Alvin Wong <alvin@alvinhc.com>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #ifndef KIS_WINDOWS_PACKAGE_UTILS_H
0008 #define KIS_WINDOWS_PACKAGE_UTILS_H
0009 
0010 #include "kritaglobal_export.h"
0011 
0012 
0013 class QString;
0014 
0015 namespace KisWindowsPackageUtils
0016 {
0017 
0018 KRITAGLOBAL_EXPORT bool isRunningInPackage();
0019 KRITAGLOBAL_EXPORT bool tryGetCurrentPackageFamilyName(QString *outName = nullptr);
0020 KRITAGLOBAL_EXPORT bool tryGetCurrentPackageFullName(QString *outName = nullptr);
0021 
0022 /**
0023  * Get the RoamingAppData location. If the current process is a packaged app,
0024  * the redirected private app location is returned. Uses `SHGetKnownFolderPath`
0025  * therefore the path uses native path separators and does not include a
0026  * trailing backslash.
0027  *
0028  * See also: https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes#appdata-operations-on-windows-10-version-1903-and-later
0029  */
0030 KRITAGLOBAL_EXPORT QString getPackageRoamingAppDataLocation();
0031 
0032 } /* namespace KisWindowsPackageUtils */
0033 
0034 #endif /* KIS_WINDOWS_PACKAGE_UTILS_H */