equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * |
|
15 * Description: |
|
16 * The header file of the file type recognizer |
|
17 */ |
|
18 |
|
19 #ifndef FMFILETYPERECOGNIZER_H |
|
20 #define FMFILETYPERECOGNIZER_H |
|
21 |
|
22 #include "fmcommon.h" |
|
23 #include <QString> |
|
24 #include <QList> |
|
25 #include <QStringList> |
|
26 #include <QMap> |
|
27 |
|
28 /*! |
|
29 \class FmFileTypeRecognizer |
|
30 \brief The class FmFileTypeRecognizer used to recognize file type by path. |
|
31 */ |
|
32 class FmFileTypeRecognizer |
|
33 { |
|
34 public: |
|
35 enum FileType{ |
|
36 FileTypeDrive, |
|
37 FileTypeFolder, |
|
38 FileTypeImage, |
|
39 FileTypeVideo, |
|
40 FileTypeTone, |
|
41 FileTypePlaylist, |
|
42 FileTypeText, |
|
43 FileTypeSisx, |
|
44 FileTypeJava, |
|
45 FileTypeFlash, |
|
46 FileTypeWidget, |
|
47 FileTypeWebLink, |
|
48 FileTypeUnKnown |
|
49 }; |
|
50 |
|
51 |
|
52 public: |
|
53 FmFileTypeRecognizer(); |
|
54 virtual ~FmFileTypeRecognizer(); |
|
55 |
|
56 /*! |
|
57 Recognize file type, currently only judge file by its extension name. |
|
58 */ |
|
59 FmFileTypeRecognizer::FileType getType( const QString& path ) const ; |
|
60 |
|
61 private: |
|
62 // used to store single extension name, FileType pare. |
|
63 QMap<QString, FileType> mFileExtensionMap; |
|
64 }; |
|
65 |
|
66 #endif /* FMFILETYPERECOGNIZER_H */ |
|
67 |