appfw/apparchitecture/tef/TRApaLsSessionStartAppTestRecognizer.cpp
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     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 "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".
       
     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  @file
       
    26  @internalComponent - Internal Symbian test code
       
    27 */
       
    28 
       
    29 #include <e32std.h>
       
    30 #include <e32base.h>
       
    31 #include <apmstd.h>
       
    32 #include <apmrec.h>
       
    33 #include "TRApaLsSessionStartAppTest.h"
       
    34 
       
    35 #include <ecom/implementationproxy.h>
       
    36 
       
    37 //CRApaLsSessionStartAppTestRec
       
    38 
       
    39 class CRApaLsSessionStartAppTestRec : public CApaDataRecognizerType
       
    40 	{
       
    41 public:
       
    42 	CRApaLsSessionStartAppTestRec();
       
    43 	static CApaDataRecognizerType* CreateRecognizerL();
       
    44 private:
       
    45 	// from CApaDataRecognizerType
       
    46 	virtual TUint PreferredBufSize();
       
    47 	virtual TDataType SupportedDataTypeL(TInt aIndex) const;
       
    48 	virtual void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer);
       
    49 	};
       
    50 
       
    51 CRApaLsSessionStartAppTestRec::CRApaLsSessionStartAppTestRec()
       
    52 	:CApaDataRecognizerType(KUidMimeTRApaLsSessionStartAppTestRecognizer, EHigh)
       
    53 	{
       
    54 	iCountDataTypes=KNumDataTypes;
       
    55 	}
       
    56 
       
    57 TUint CRApaLsSessionStartAppTestRec::PreferredBufSize()
       
    58 	{
       
    59 	return 0;
       
    60 	}
       
    61 
       
    62 TDataType CRApaLsSessionStartAppTestRec::SupportedDataTypeL(TInt /*aIndex*/) const
       
    63 	{
       
    64 	return TDataType(KLitMimeType_TRApaLsSessionStartAppTest);
       
    65 	}
       
    66 
       
    67 void CRApaLsSessionStartAppTestRec::DoRecognizeL(const TDesC& aName, const TDesC8&)
       
    68 	{
       
    69 	if (aName==KLitTRApaLsSessionStartAppTest)
       
    70 		{
       
    71 		iDataType=TDataType(KLitMimeType_TRApaLsSessionStartAppTest); // TRApaLsSessionStartAppTest.app supports mime type KLitMimeType_TRApaLsSessionStartAppTest
       
    72 		iConfidence=ECertain;
       
    73 		}
       
    74 	}
       
    75 
       
    76 // stand-alone functions
       
    77 
       
    78 
       
    79 GLDEF_C TInt E32Dll(
       
    80 					)
       
    81 	{
       
    82 	return KErrNone;
       
    83 	}
       
    84 
       
    85 CApaDataRecognizerType* CRApaLsSessionStartAppTestRec::CreateRecognizerL()
       
    86 	{
       
    87 	return new (ELeave) CRApaLsSessionStartAppTestRec();
       
    88 	}
       
    89 
       
    90 const TImplementationProxy ImplementationTable[] = 
       
    91     {
       
    92 	IMPLEMENTATION_PROXY_ENTRY(0x10004c50,CRApaLsSessionStartAppTestRec::CreateRecognizerL)
       
    93 	};
       
    94 
       
    95 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
    96     {
       
    97     aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
    98     return ImplementationTable;
       
    99     }
       
   100