1.1 --- a/epoc32/include/xml/matchdata.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/xml/matchdata.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,122 @@
1.4 -matchdata.h
1.5 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +// Detailed parser information for resolution criteria in XML framework
1.19 +//
1.20 +//
1.21 +
1.22 +
1.23 +
1.24 +/**
1.25 + @file
1.26 + @publishedAll
1.27 + @released
1.28 +*/
1.29 +
1.30 +
1.31 +#ifndef MATCHDATA_H
1.32 +#define MATCHDATA_H
1.33 +
1.34 +#include <e32base.h>
1.35 +#include <s32strm.h>
1.36 +#include <s32mem.h>
1.37 +#include <ecom/implementationinformation.h>
1.38 +
1.39 +namespace Xml
1.40 +{
1.41 +
1.42 +/**
1.43 +The plugin variant string of the default Symbian-provided XML parser plugins.
1.44 +@publishedAll
1.45 +@released
1.46 +*/
1.47 +_LIT8(KXmlSymbianPluginVariant, "Symbian");
1.48 +
1.49 +/**
1.50 +CMatchData class provides detailed parser information for XML framework.
1.51 +Client application should use this class to precisely specify the plugin,
1.52 +which should be used as a parsing engine in XML framework.
1.53 +
1.54 +@publishedAll
1.55 +@released
1.56 +*/
1.57 +
1.58 +NONSHARABLE_CLASS(CMatchData) : public CBase
1.59 +{
1.60 +
1.61 +public:
1.62 + CMatchData();
1.63 + ~CMatchData();
1.64 +
1.65 + IMPORT_C static CMatchData* NewL();
1.66 + IMPORT_C static CMatchData* NewL(const TDesC8& aPackage);
1.67 + IMPORT_C static CMatchData* NewLC();
1.68 + IMPORT_C static CMatchData* NewLC(const TDesC8& aPackage);
1.69 +
1.70 + IMPORT_C void SetMimeTypeL(const TDesC8& aData);
1.71 + IMPORT_C const TPtrC8 MimeType() const;
1.72 +
1.73 + IMPORT_C void SetVariantL(const TDesC8& aVariant);
1.74 + IMPORT_C const TPtrC8 Variant() const;
1.75 +
1.76 + IMPORT_C void SetLeaveOnMany(TBool aSetting);
1.77 + IMPORT_C void SetRomOnly(TBool aSetting);
1.78 + IMPORT_C void SetCaseSensitivity(TBool aSetting);
1.79 +
1.80 + IMPORT_C TUid ResolveL(RImplInfoArray& aImplList) const;
1.81 +
1.82 +public:
1.83 + CMatchData& operator=(const CMatchData & aMatchData);
1.84 + TBool operator==(const CMatchData & aMatchData) const;
1.85 + HBufC8* PackToBufferL() const;
1.86 +
1.87 +private:
1.88 + void ConstructL(const TDesC8& aPackage);
1.89 +
1.90 + TBool VariantMatch(const TDesC8& aOpaqueField) const;
1.91 + TBool MimeTypeMatch(const TDesC8& aDataField) const;
1.92 + TBool MatchField(const TDesC8& aField, const TDesC8& aMatchString, const TDesC8& aSeparator) const;
1.93 +
1.94 + TBool CaseSensitivity() const;
1.95 + TBool LeaveOnMany() const;
1.96 + TBool RomOnly() const;
1.97 +
1.98 + void ExternalizeL(RWriteStream& aStream) const;
1.99 + void InternalizeL(RReadStream& aStream);
1.100 +
1.101 + TUid SelectSingleParserL(RImplInfoPtrArray& aImplList) const;
1.102 + TBool IsInvalidVariant() const;
1.103 +
1.104 + static TInt SortOrder(const CImplementationInformation &aImpInfo1,
1.105 + const CImplementationInformation &aImpInfo2);
1.106 +private:
1.107 + /**
1.108 + Mime type requested by client
1.109 + Is matched against one of entries of data_type field in resoure information file
1.110 + */
1.111 + HBufC8* iMimeType;
1.112 +
1.113 + /**
1.114 + Variant requested by client
1.115 + Is matched against first entry in opaque_data field of resource information file
1.116 + */
1.117 + HBufC8* iVariant;
1.118 +
1.119 + /**
1.120 + Additional information for resolution constrains. Bitmap.
1.121 + */
1.122 + TUint32 iAddInfo;
1.123 +};
1.124 +
1.125 +}
1.126 +#endif // MATCHDATA_H