diff -r 000000000000 -r 2e3d3ce01487 contenthandling/webrecognisers/waprecogniser/recwap.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contenthandling/webrecognisers/waprecogniser/recwap.cpp Tue Feb 02 10:12:00 2010 +0200 @@ -0,0 +1,148 @@ +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +// header +#include "recwap.h" + +// other includes +#include // constants +#include // TParse + +#ifdef __UI_FRAMEWORKS_V2__ +#include +#endif //__UI_FRAMEWORKS_V2__ + + +// +// CApaWapRecognizer +// +CApaWapRecognizer::CApaWapRecognizer() +:CApaDataRecognizerType(KUidMimeWapRecognizer,CApaDataRecognizerType::ENormal) + { + // All these mime types have reasonable recognition + iCountDataTypes=KWapNumMimeTypes; + } + +TUint CApaWapRecognizer::PreferredBufSize() + { + // no buffer recognition yet + return 0; + } + +TDataType CApaWapRecognizer::SupportedDataTypeL(TInt aIndex) const + { + __ASSERT_DEBUG(aIndex>=0 && aIndexCompareF(KDotWML)==0) + { + iDataType=TDataType(KWMLMimeType); + iConfidence=EProbable; + } + else if (ext->CompareF(KDotWMLC)==0) + { + iDataType=TDataType(KWMLCMimeType); + iConfidence=EProbable; + } + else if (ext->CompareF(KDotWMLSC)==0) + { + iDataType=TDataType(KWMLSCMimeType); + iConfidence=EProbable; + } + else if (ext->CompareF(KDotWMLS)==0) + { + iDataType=TDataType(KWMLSMimeType); + iConfidence=EProbable; + } + else if (ext->CompareF(KDotWBXML)==0) + { + iDataType=TDataType(KWBXMLMimeType); + iConfidence=EProbable; + } + else if (ext->CompareF(KDotWDTD)==0) + { + iDataType=TDataType(KWMLDTDMimeType); + iConfidence=EProbable; + } + CleanupStack::PopAndDestroy(); // ext + } + +#ifdef __UI_FRAMEWORKS_V2__ + +const TImplementationProxy ImplementationTable[]= + { + IMPLEMENTATION_PROXY_ENTRY(0x1000515E,CApaWapRecognizer::NewL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } + +CApaDataRecognizerType* CApaWapRecognizer::NewL() + { + return new (ELeave) CApaWapRecognizer(); + } + +#else + +EXPORT_C CApaDataRecognizerType* CreateRecognizer() +// +// The gate function - ordinal 1 +// + { + CApaDataRecognizerType* thing=new CApaWapRecognizer(); + return thing; // NULL if new failed + } + +#endif //__UI_FRAMEWORKS_V2__ + +#ifndef EKA2 +GLDEF_C TInt E32Dll(TDllReason /*aReason*/) +// +// DLL entry point +// + { + return KErrNone; + } +#endif