codhandler/ddrecog/inc/DdRecog.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *      Declaration of class CDdRecog.   
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef DD_RECOG_H
       
    22 #define DD_RECOG_H
       
    23 
       
    24 // INCLUDES
       
    25 
       
    26 #include <apmrec.h>
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * DD Recognizer.
       
    32 */
       
    33 class CDdRecog : public CApaDataRecognizerType
       
    34     {
       
    35     public:     // construction
       
    36 
       
    37         /**
       
    38         * Constructor.
       
    39         */
       
    40         CDdRecog();
       
    41 
       
    42     public:     // from CApaDataRecognizerType
       
    43 
       
    44         /**
       
    45         * Return preferred buffer size.
       
    46         * @return Preferred buffer size.
       
    47         */
       
    48         TUint PreferredBufSize();
       
    49 
       
    50         /**
       
    51         * Return supported data type.
       
    52         * @param aIndex Index of data type.
       
    53         * @return Supported data type.
       
    54         */
       
    55         TDataType SupportedDataTypeL( TInt aIndex ) const;
       
    56 
       
    57     public:     // new methods
       
    58 
       
    59         /**
       
    60         * Factory function.
       
    61         * @return Recognizer.
       
    62         */
       
    63         static CApaDataRecognizerType* CreateRecognizerL();
       
    64 
       
    65     private:    // from CApaDataRecognizerType
       
    66 
       
    67         /**
       
    68         * Recognize content. Leaves only on general failures (OOM etc), but
       
    69         * does not leave on any recognition failures.
       
    70         * @param aName File name.
       
    71         * @param aBuffer Content buffer.
       
    72         */
       
    73         void DoRecognizeL( const TDesC& aName, const TDesC8& aBuffer );
       
    74 
       
    75     };
       
    76 
       
    77 #endif /* def DD_RECOG_H */