-rw-r--r-- | library/mimetype.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/library/mimetype.h b/library/mimetype.h index b6cca95..94bfe4e 100644 --- a/library/mimetype.h +++ b/library/mimetype.h | |||
@@ -1,69 +1,72 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 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 | 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 | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef MIMETYPE_H | 20 | #ifndef MIMETYPE_H |
21 | #define MIMETYPE_H | 21 | #define MIMETYPE_H |
22 | 22 | ||
23 | #include <qstring.h> | 23 | #include <qstringlist.h> |
24 | #include <qpixmap.h> | 24 | #include <qpixmap.h> |
25 | #include <qlist.h> | ||
25 | 26 | ||
26 | class AppLnk; | 27 | class AppLnk; |
27 | class DocLnk; | 28 | class DocLnk; |
28 | class QStringList; | 29 | class QStringList; |
29 | class MimeTypeData; | 30 | class MimeTypeData; |
30 | class AppLnkSet; | 31 | class AppLnkSet; |
31 | 32 | ||
32 | class MimeType | 33 | class MimeType |
33 | { | 34 | { |
34 | public: | 35 | public: |
35 | MimeType( const QString& ext_or_id ); | 36 | MimeType( const QString& ext_or_id ); |
36 | MimeType( const DocLnk& ); | 37 | MimeType( const DocLnk& ); |
37 | 38 | ||
38 | QString id() const; | 39 | QString id() const; |
39 | QString description() const; | 40 | QString description() const; |
40 | QPixmap pixmap() const; | 41 | QPixmap pixmap() const; |
41 | QPixmap bigPixmap() const; | 42 | QPixmap bigPixmap() const; |
42 | 43 | ||
43 | // DON'T define this yourself! | 44 | // DON'T define this yourself! |
44 | #ifdef QTOPIA_INTERNAL_MIMEEXT | 45 | #ifdef QTOPIA_INTERNAL_MIMEEXT |
45 | QString extension() const; | 46 | QString extension() const; |
47 | QStringList extensions() const; | ||
48 | QList<AppLnk> applications() const; | ||
46 | #endif | 49 | #endif |
47 | 50 | ||
48 | const AppLnk* application() const; | 51 | const AppLnk* application() const; |
49 | 52 | ||
50 | static QString appsFolderName(); | 53 | static QString appsFolderName(); |
51 | static void updateApplications(); | 54 | static void updateApplications(); |
52 | 55 | ||
53 | // These shouldn't be needed | 56 | // These shouldn't be needed |
54 | static void clear(); | 57 | static void clear(); |
55 | static void registerApp( const AppLnk& ); | 58 | static void registerApp( const AppLnk& ); |
56 | 59 | ||
57 | private: | 60 | private: |
58 | static void updateApplications(AppLnkSet* folder); | 61 | static void updateApplications(AppLnkSet* folder); |
59 | static void loadExtensions(); | 62 | static void loadExtensions(); |
60 | static void loadExtensions(const QString&); | 63 | static void loadExtensions(const QString&); |
61 | void init( const QString& ext_or_id ); | 64 | void init( const QString& ext_or_id ); |
62 | class Dict; | 65 | class Private; |
63 | static Dict* d; | 66 | static Private* d; |
64 | static Dict& dict(); | 67 | static Private& data(); |
65 | static MimeTypeData* data(const QString& id); | 68 | static MimeTypeData* data(const QString& id); |
66 | QString i; | 69 | QString i; |
67 | }; | 70 | }; |
68 | 71 | ||
69 | #endif | 72 | #endif |