First public contribution.
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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MMF_CLIENT_RECOGNIZER_H__
17 #define __MMF_CLIENT_RECOGNIZER_H__
22 #include "mmfcontrollerpluginresolver.h"
24 const int KRecMmfDllUidValue = 0x101f7c0c;
26 typedef TBuf8<KMaxDataTypeLength> TMimeDataType;
31 * Class owned by the CApaMmfRecognizer recognizer class.
32 * maintains a list of MIME-types supported and
33 * an instance of the CMmfRecognizerUtil class which contains
34 * ECOM-derived information about the header data to match against.
37 class CMmfRecognizer : public CBase
47 static CMmfRecognizer* NewL();
48 virtual ~CMmfRecognizer();
52 TMatchMethod MatchL(const TDesC& aFileName, const TDesC8& aBuffer);
54 const TDesC8& MimeString() const;
56 const TPtrC8 SupportedDataTypeL(TInt aIndex) const;
57 TInt NumMimeTypes() const;
64 CDesC8Array* iMimeTypes; // owned
65 TBuf8<KMaxDataTypeLength> iMimeString;
66 CMmfRecognizerUtil* iMmfRecognizerUtil; // owned
72 * Concrete implementation of the recognizer API
73 * Used to recognize non-native files supported by the
74 * Multimedia framework. e.g. .WAV files, .AU files etc
76 class CApaMmfRecognizer : public CApaDataRecognizerType
79 static CApaMmfRecognizer* NewL();
82 TDataType SupportedDataTypeL(TInt aIndex) const;
83 TUint PreferredBufSize();
84 void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer);
91 CMmfRecognizer* iMmfRecognizer;