1// qlibrary.sip generated by MetaSIP
2//
3// This file is part of the QtCore Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QLibrary : QObject
24{
25%TypeHeaderCode
26#include <qlibrary.h>
27%End
28
29public:
30    enum LoadHint
31    {
32        ResolveAllSymbolsHint,
33        ExportExternalSymbolsHint,
34        LoadArchiveMemberHint,
35        PreventUnloadHint,
36%If (Qt_5_5_0 -)
37        DeepBindHint,
38%End
39    };
40
41    typedef QFlags<QLibrary::LoadHint> LoadHints;
42    explicit QLibrary(QObject *parent /TransferThis/ = 0);
43    QLibrary(const QString &fileName, QObject *parent /TransferThis/ = 0);
44    QLibrary(const QString &fileName, int verNum, QObject *parent /TransferThis/ = 0);
45    QLibrary(const QString &fileName, const QString &version, QObject *parent /TransferThis/ = 0);
46    virtual ~QLibrary();
47    QString errorString() const;
48    QString fileName() const;
49    bool isLoaded() const;
50    bool load();
51    QLibrary::LoadHints loadHints() const;
52    QFunctionPointer resolve(const char *symbol);
53    static QFunctionPointer resolve(const QString &fileName, const char *symbol);
54    static QFunctionPointer resolve(const QString &fileName, int verNum, const char *symbol);
55    static QFunctionPointer resolve(const QString &fileName, const QString &version, const char *symbol);
56    bool unload();
57    static bool isLibrary(const QString &fileName);
58    void setFileName(const QString &fileName);
59    void setFileNameAndVersion(const QString &fileName, int verNum);
60    void setFileNameAndVersion(const QString &fileName, const QString &version);
61    void setLoadHints(QLibrary::LoadHints hints);
62};
63
64QFlags<QLibrary::LoadHint> operator|(QLibrary::LoadHint f1, QFlags<QLibrary::LoadHint> f2);
65