File indexing completed on 2024-11-24 04:42:07

0001 /*
0002     SPDX-FileCopyrightText: 2019 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KANDROIDEXTRAS_CONTENTRESOLVER_H
0008 #define KANDROIDEXTRAS_CONTENTRESOLVER_H
0009 
0010 #include "kandroidextras_export.h"
0011 
0012 #include <qglobal.h>
0013 class QJniObject;
0014 class QString;
0015 class QUrl;
0016 
0017 namespace KAndroidExtras {
0018 
0019 /** Methods for working with Android's ContentResolver. */
0020 namespace ContentResolver
0021 {
0022     /** Get the JNI content resolver. */
0023     KANDROIDEXTRAS_EXPORT QJniObject get();
0024 
0025     /** Returns the mime type of the given content: URL.
0026      * @see Android ContentResolver.getType
0027      */
0028     KANDROIDEXTRAS_EXPORT QString mimeType(const QUrl &url);
0029 
0030     /** File name of a file provided by a content: URL. */
0031     KANDROIDEXTRAS_EXPORT QString fileName(const QUrl &url);
0032 }
0033 
0034 }
0035 
0036 #endif // KANDROIDEXTRAS_CONTENTRESOLVER_H