First public contribution.
1 // Copyright (c) 1997-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.
19 #include <ecom/implementationproxy.h>
22 // This is a very odd recognizer - it doesn't know how many things it recognizes
23 // It assumes there are none.
26 const TInt KMimeAppRecognizerValue=0x1000415F;
27 const TUid KUidMimeAppRecognizer={KMimeAppRecognizerValue};
28 const TInt KAppNumMimeTypes=0;
30 CApaAppRecognizer::CApaAppRecognizer()
31 :CApaDataRecognizerType(KUidMimeAppRecognizer,CApaDataRecognizerType::EHigh)
32 // All these mime types have reasonable recognition
34 iCountDataTypes=KAppNumMimeTypes;
37 TUint CApaAppRecognizer::PreferredBufSize()
42 TDataType CApaAppRecognizer::SupportedDataTypeL(TInt /*aIndex*/) const
47 void CApaAppRecognizer::DoRecognizeL(const TDesC& /*aName*/, const TDesC8& aBuffer)
49 if (aBuffer.Length()>=16)
51 const TUidType uids(TCheckedUid(aBuffer.Left(16)).UidType());
53 if (uids[1].iUid==0x10003a12)
55 if (uids[1].iUid==0x1000006d)
58 iDataType=TDataType(uids[2]);
64 CApaDataRecognizerType* CApaAppRecognizer::CreateRecognizerL()
66 return new (ELeave) CApaAppRecognizer();
69 const TImplementationProxy ImplementationTable[] =
71 IMPLEMENTATION_PROXY_ENTRY(0x101F7D9F,CApaAppRecognizer::CreateRecognizerL)
74 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
76 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
77 return ImplementationTable;