genericservices/mimerecognitionfw/tef/TEcomLeavingRecognizer.cpp
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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 //
       
    15 
       
    16 /**
       
    17  @file 
       
    18  @internalComponent - Internal Symbian test code 
       
    19 */
       
    20 
       
    21 #include "TEcomLeavingRecognizer.h"
       
    22 #include <eikenv.h>
       
    23 
       
    24 
       
    25 const TInt KNumDataTypes = 1;
       
    26 const TUid KUid = {0x10203630};
       
    27 
       
    28 
       
    29 CApaDataRecognizerType* CEcomLeavingApplicationRec::CreateRecognizerL()
       
    30 	{
       
    31     return new (ELeave) CEcomLeavingApplicationRec;
       
    32 	}
       
    33 
       
    34 CEcomLeavingApplicationRec::CEcomLeavingApplicationRec():CApaDataRecognizerType(KUid, CApaDataRecognizerType::EHigh)
       
    35 	{
       
    36     iCountDataTypes = KNumDataTypes;
       
    37 	}
       
    38 
       
    39 /*
       
    40 	Specifies the buffer size required by the data type
       
    41 */
       
    42 TUint CEcomLeavingApplicationRec::PreferredBufSize()
       
    43 	{
       
    44     return 0;
       
    45 	}
       
    46 
       
    47 /*
       
    48 	Should return one of the supported data types based on index sent.
       
    49 */
       
    50 TDataType CEcomLeavingApplicationRec::SupportedDataTypeL(TInt /*lIndex*/) const
       
    51 	{
       
    52 	// This function is made to leave, just to reproduce the defect:
       
    53 	// DEF038928 - App Arc server/ Recogniser needs to be more robust. 
       
    54 	User::Leave(KErrNoMemory);
       
    55     return TDataType(_L8("dodgy/app"));
       
    56 	}
       
    57 
       
    58 /*
       
    59 	Should recognize the data type of the file. 
       
    60 	Called by the RecognizeL function.
       
    61 */
       
    62 void CEcomLeavingApplicationRec::DoRecognizeL(const TDesC& /*aName*/, const TDesC8& /*aBuffer*/)
       
    63 	{
       
    64 	// does nothing
       
    65 	}