|
1 |
|
2 // Copyright (c) 2002-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 // Description: |
|
15 // |
|
16 |
|
17 inline TInt COpaqueDataParse::ExtnsCount() const |
|
18 { |
|
19 ASSERT(iState >= EExtnsProcessed); |
|
20 return iExtnCount; |
|
21 } |
|
22 |
|
23 inline TInt COpaqueDataParse::MIMETypesCount() const |
|
24 { |
|
25 ASSERT(iState >= EMIMETypesProcessed); |
|
26 return iArray.Count() - ExtnsCount(); |
|
27 } |
|
28 |
|
29 inline const TDesC8& COpaqueDataParse::Extn(TInt aIndex) const |
|
30 { |
|
31 ASSERT(aIndex < ExtnsCount()); |
|
32 return iArray[aIndex]; |
|
33 } |
|
34 |
|
35 inline const TDesC8& COpaqueDataParse::MIMEType(TInt aIndex) const |
|
36 { |
|
37 ASSERT(aIndex < MIMETypesCount()); |
|
38 return iArray[aIndex+ExtnsCount()]; |
|
39 } |
|
40 |
|
41 inline TInt COpaqueDataParse::Version() const |
|
42 { |
|
43 return iVersion; |
|
44 } |
|
45 |
|
46 inline TInt COpaqueDataParse::Flags() const |
|
47 { |
|
48 return iFlags; |
|
49 } |
|
50 |
|
51 inline TUid COpaqueDataParse::ImageTypeUid() const |
|
52 { |
|
53 return iImageTypeUid; |
|
54 } |
|
55 |
|
56 inline TUid COpaqueDataParse::ImageSubTypeUid() const |
|
57 { |
|
58 return iImageSubTypeUid; |
|
59 } |
|
60 |
|
61 inline TUid COpaqueDataParse::PluginClassUid() const |
|
62 { |
|
63 return iPluginClassUid; |
|
64 } |
|
65 |
|
66 inline TBool COpaqueDataParse::CompareUids(TUid aType, TUid aSubType) const |
|
67 { |
|
68 return ImageTypeUid()==aType && ImageSubTypeUid()==aSubType; |
|
69 } |
|
70 |
|
71 inline TBool COpaqueDataParse::CompareUids(COpaqueDataParse* aParse) const |
|
72 { |
|
73 return CompareUids(aParse->ImageTypeUid(), aParse->ImageSubTypeUid()); |
|
74 } |
|
75 |
|
76 // true if only uids are available - ie neither properties nor extns nor mime types are provided |
|
77 inline TBool COpaqueDataParse::OnlyUidsAvail() const |
|
78 { |
|
79 return iOpaqueData.Length()<=iStartOfNumberOfExtns; |
|
80 } |
|
81 |
|
82 // true if this is an image "sub-type" and we should NOT include this |
|
83 // implementation when matching using the mime type or when listing all |
|
84 // available mime types |
|
85 inline TBool COpaqueDataParse::IsSubCodec() const |
|
86 { |
|
87 return ((iFlags & ESubCodec)!=EFalse); |
|
88 } |
|
89 |
|
90 // true if we need to open a decoder to be confident enough about |
|
91 // recognizing the header data. This can be set for codecs which have |
|
92 // very few magic number bytes. |
|
93 inline TBool COpaqueDataParse::IsOpenNeededToRecognize() const |
|
94 { |
|
95 return ((iFlags & EOpenNeededToRecognize)!=EFalse); |
|
96 } |
|
97 |
|
98 // true if the plugin allow opening based on file extension |
|
99 inline TBool COpaqueDataParse::IsOpenAgainstSuffix() const |
|
100 { |
|
101 return ((iFlags & EOpenAgainstSuffix)!=EFalse); |
|
102 } |
|
103 |
|
104 // true if the plugin allow recognition on file extension |
|
105 inline TBool COpaqueDataParse::IsRecognizeAgainstSuffix() const |
|
106 { |
|
107 return ((iFlags & ERecognizeAgainstSuffix)!=EFalse); |
|
108 } |
|
109 |
|
110 inline TInt COpaqueDataParse::BinaryPropertiesCount() const |
|
111 { |
|
112 ASSERT(iState >= EBinPropertiesProcessed); |
|
113 return iBinaryPropertiesArray.Count(); |
|
114 } |