sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0: // All rights reserved.
sl@0: // This component and the accompanying materials are made available
sl@0: // under the terms of "Eclipse Public License v1.0"
sl@0: // which accompanies this distribution, and is available
sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: //
sl@0: // Initial Contributors:
sl@0: // Nokia Corporation - initial contribution.
sl@0: //
sl@0: // Contributors:
sl@0: //
sl@0: // Description:
sl@0: //
sl@0: 
sl@0: #include <apmrec.h>
sl@0: #include <apmstd.h>
sl@0: #include "RECAPP.H"
sl@0: #include <ecom/implementationproxy.h> 
sl@0: 
sl@0: //
sl@0: // This is a very odd recognizer - it doesn't know how many things it recognizes
sl@0: // It assumes there are none.
sl@0: //
sl@0: 
sl@0: const TInt KMimeAppRecognizerValue=0x1000415F;
sl@0: const TUid KUidMimeAppRecognizer={KMimeAppRecognizerValue};
sl@0: const TInt KAppNumMimeTypes=0;
sl@0: 
sl@0: CApaAppRecognizer::CApaAppRecognizer()
sl@0: 	:CApaDataRecognizerType(KUidMimeAppRecognizer,CApaDataRecognizerType::EHigh)
sl@0: 	// All these mime types have reasonable recognition
sl@0: 	{
sl@0: 	iCountDataTypes=KAppNumMimeTypes;
sl@0: 	}
sl@0: 
sl@0: TUint CApaAppRecognizer::PreferredBufSize()
sl@0: 	{
sl@0: 	return 16;
sl@0: 	}
sl@0: 
sl@0: TDataType CApaAppRecognizer::SupportedDataTypeL(TInt /*aIndex*/) const
sl@0: 	{
sl@0: 	return TDataType();
sl@0: 	}
sl@0: 
sl@0: void CApaAppRecognizer::DoRecognizeL(const TDesC& /*aName*/, const TDesC8& aBuffer)
sl@0: 	{
sl@0: 	if (aBuffer.Length()>=16)
sl@0: 		{
sl@0: 		const TUidType uids(TCheckedUid(aBuffer.Left(16)).UidType());
sl@0: #if defined(_UNICODE)
sl@0: 		if (uids[1].iUid==0x10003a12)
sl@0: #else
sl@0: 		if (uids[1].iUid==0x1000006d)
sl@0: #endif
sl@0:  			{
sl@0: 	 		iDataType=TDataType(uids[2]);
sl@0: 	 		iConfidence=ECertain;
sl@0: 	 		}
sl@0: 		}
sl@0: 	}
sl@0: 
sl@0: CApaDataRecognizerType* CApaAppRecognizer::CreateRecognizerL()
sl@0: 	{
sl@0: 	return new (ELeave) CApaAppRecognizer();
sl@0: 	}
sl@0: 
sl@0: const TImplementationProxy ImplementationTable[] = 
sl@0:     {
sl@0: 	IMPLEMENTATION_PROXY_ENTRY(0x101F7D9F,CApaAppRecognizer::CreateRecognizerL)
sl@0: 	};
sl@0: 
sl@0: EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
sl@0:     {
sl@0:     aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
sl@0:     return ImplementationTable;
sl@0:     }
sl@0: 
sl@0: 
sl@0: 
sl@0: 
sl@0: GLDEF_C TInt E32Dll(
sl@0: 					)
sl@0: //
sl@0: // DLL entry point
sl@0: //
sl@0: 	{
sl@0: 	return KErrNone;
sl@0: 	}