summaryrefslogtreecommitdiff
path: root/library/qlibrary_p.h
Unidiff
Diffstat (limited to 'library/qlibrary_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qlibrary_p.h113
1 files changed, 113 insertions, 0 deletions
diff --git a/library/qlibrary_p.h b/library/qlibrary_p.h
new file mode 100644
index 0000000..4734228
--- a/dev/null
+++ b/library/qlibrary_p.h
@@ -0,0 +1,113 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#ifndef QLIBRARY_P_H
22#define QLIBRARY_P_H
23
24//
25// W A R N I N G
26// -------------
27//
28// This file is not part of the Qt API. It exists for the convenience
29// of the QLibrary class. This header file may change from
30// version to version without notice, or even be removed.
31//
32// We mean it.
33//
34//
35
36#include "qlibrary.h"
37
38//#ifndef QT_NO_COMPONENT
39
40//#ifndef QT_H
41#include "qwindowdefs.h"
42//#ifndef QT_LITE_COMPONENT
43#include "qobject.h"
44//#endif
45//#endif // QT_H
46
47class QTimer;
48class QLibrary;
49class QLibraryInterface;
50
51/*
52 Private helper class that saves the platform dependent handle
53 and does the unload magic using a QTimer.
54*/
55//#ifndef QT_LITE_COMPONENT
56class QLibraryPrivate : public QObject
57{
58 Q_OBJECT
59public:
60 QLibraryPrivate( QLibrary *lib );
61 ~QLibraryPrivate();
62
63 void startTimer();
64 void killTimer();
65
66#ifdef Q_WS_WIN
67 HINSTANCE pHnd;
68#else
69 void *pHnd;
70#endif
71
72 QLibraryInterface *libIface;
73
74 bool loadLibrary();
75 bool freeLibrary();
76 void *resolveSymbol( const char * );
77
78private slots:
79 void tryUnload();
80
81private:
82 QTimer *unloadTimer;
83 QLibrary *library;
84};
85
86#else // QT_LITE_COMPONENT
87class QLibraryPrivate
88{
89public:
90 QLibraryPrivate( QLibrary *lib );
91
92 void startTimer();
93 void killTimer();
94
95#ifdef Q_WS_WIN
96 HINSTANCE pHnd;
97#else
98 void *pHnd;
99#endif
100 QLibraryInterface *libIface;
101
102 bool loadLibrary();
103 bool freeLibrary();
104 void *resolveSymbol( const char * );
105
106private:
107 QLibrary *library;
108};
109//#endif // QT_LITE_COMPONENT
110
111//#endif // QT_NO_COMPONENT
112
113#endif // QLIBRARY_P_H