localisation/apparchitecture/tef/TRApaLsSessionStartAppTestRecognizer.cpp
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 // Copyright (c) 2005-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 the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This recognizer is part of the supporting test code
       
    15 // for T_RApaLsSessionStep.CPP
       
    16 // This recognizer only exists to associate the document
       
    17 // name KLitTRApaLsSessionStartAppTest (defined in TRApaLsSessionStartAppTest.h) with the
       
    18 // TRApaLsSessionStartAppTestApp.app application.
       
    19 // This enables the start app test case T_RApaLsSessionStep.CPP to launch TRApaLsSessionStartAppTestApp.app
       
    20 // by starting the document KLitTRApaLsSessionStartAppTest.
       
    21 // 
       
    22 //
       
    23 
       
    24 
       
    25 
       
    26 /**
       
    27  @file
       
    28  @internalComponent - Internal Symbian test code
       
    29 */
       
    30 
       
    31 #include <E32STD.H>
       
    32 #include <E32BASE.H>
       
    33 #include <APMSTD.H>
       
    34 #include <APMREC.H>
       
    35 #include "TRApaLsSessionStartAppTest.h"
       
    36 
       
    37 #include <ImplementationProxy.h>
       
    38 
       
    39 //CRApaLsSessionStartAppTestRec
       
    40 
       
    41 class CRApaLsSessionStartAppTestRec : public CApaDataRecognizerType
       
    42 	{
       
    43 public:
       
    44 	CRApaLsSessionStartAppTestRec();
       
    45 	static CApaDataRecognizerType* CreateRecognizerL();
       
    46 private:
       
    47 	// from CApaDataRecognizerType
       
    48 	virtual TUint PreferredBufSize();
       
    49 	virtual TDataType SupportedDataTypeL(TInt aIndex) const;
       
    50 	virtual void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer);
       
    51 	};
       
    52 
       
    53 CRApaLsSessionStartAppTestRec::CRApaLsSessionStartAppTestRec()
       
    54 	:CApaDataRecognizerType(KUidMimeTRApaLsSessionStartAppTestRecognizer, EHigh)
       
    55 	{
       
    56 	iCountDataTypes=KNumDataTypes;
       
    57 	}
       
    58 
       
    59 TUint CRApaLsSessionStartAppTestRec::PreferredBufSize()
       
    60 	{
       
    61 	return 0;
       
    62 	}
       
    63 
       
    64 TDataType CRApaLsSessionStartAppTestRec::SupportedDataTypeL(TInt /*aIndex*/) const
       
    65 	{
       
    66 	return TDataType(KLitMimeType_TRApaLsSessionStartAppTest);
       
    67 	}
       
    68 
       
    69 void CRApaLsSessionStartAppTestRec::DoRecognizeL(const TDesC& aName, const TDesC8&)
       
    70 	{
       
    71 	if (aName==KLitTRApaLsSessionStartAppTest)
       
    72 		{
       
    73 		iDataType=TDataType(KLitMimeType_TRApaLsSessionStartAppTest); // TRApaLsSessionStartAppTest.app supports mime type KLitMimeType_TRApaLsSessionStartAppTest
       
    74 		iConfidence=ECertain;
       
    75 		}
       
    76 	}
       
    77 
       
    78 // stand-alone functions
       
    79 
       
    80 
       
    81 GLDEF_C TInt E32Dll(
       
    82 					)
       
    83 	{
       
    84 	return KErrNone;
       
    85 	}
       
    86 
       
    87 CApaDataRecognizerType* CRApaLsSessionStartAppTestRec::CreateRecognizerL()
       
    88 	{
       
    89 	return new (ELeave) CRApaLsSessionStartAppTestRec();
       
    90 	}
       
    91 
       
    92 const TImplementationProxy ImplementationTable[] = 
       
    93     {
       
    94 	IMPLEMENTATION_PROXY_ENTRY(0x10004c50,CRApaLsSessionStartAppTestRec::CreateRecognizerL)
       
    95 	};
       
    96 
       
    97 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
    98     {
       
    99     aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
   100     return ImplementationTable;
       
   101     }