1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Detailed parser information for resolution criteria in XML framework
33 #include <ecom/implementationinformation.h>
39 The plugin variant string of the default Symbian-provided XML parser plugins.
43 _LIT8(KXmlSymbianPluginVariant, "Symbian");
46 CMatchData class provides detailed parser information for XML framework.
47 Client application should use this class to precisely specify the plugin,
48 which should be used as a parsing engine in XML framework.
54 NONSHARABLE_CLASS(CMatchData) : public CBase
61 IMPORT_C static CMatchData* NewL();
62 IMPORT_C static CMatchData* NewL(const TDesC8& aPackage);
63 IMPORT_C static CMatchData* NewLC();
64 IMPORT_C static CMatchData* NewLC(const TDesC8& aPackage);
66 IMPORT_C void SetMimeTypeL(const TDesC8& aData);
67 IMPORT_C const TPtrC8 MimeType() const;
69 IMPORT_C void SetVariantL(const TDesC8& aVariant);
70 IMPORT_C const TPtrC8 Variant() const;
72 IMPORT_C void SetLeaveOnMany(TBool aSetting);
73 IMPORT_C void SetRomOnly(TBool aSetting);
74 IMPORT_C void SetCaseSensitivity(TBool aSetting);
76 IMPORT_C TUid ResolveL(RImplInfoArray& aImplList) const;
79 CMatchData& operator=(const CMatchData & aMatchData);
80 TBool operator==(const CMatchData & aMatchData) const;
81 HBufC8* PackToBufferL() const;
84 void ConstructL(const TDesC8& aPackage);
86 TBool VariantMatch(const TDesC8& aOpaqueField) const;
87 TBool MimeTypeMatch(const TDesC8& aDataField) const;
88 TBool MatchField(const TDesC8& aField, const TDesC8& aMatchString, const TDesC8& aSeparator) const;
90 TBool CaseSensitivity() const;
91 TBool LeaveOnMany() const;
92 TBool RomOnly() const;
94 void ExternalizeL(RWriteStream& aStream) const;
95 void InternalizeL(RReadStream& aStream);
97 TUid SelectSingleParserL(RImplInfoPtrArray& aImplList) const;
98 TBool IsInvalidVariant() const;
100 static TInt SortOrder(const CImplementationInformation &aImpInfo1,
101 const CImplementationInformation &aImpInfo2);
104 Mime type requested by client
105 Is matched against one of entries of data_type field in resoure information file
110 Variant requested by client
111 Is matched against first entry in opaque_data field of resource information file
116 Additional information for resolution constrains. Bitmap.
122 #endif // MATCHDATA_H