devencdiskutils/Pk5Recognizer/inc/Pk5Recognizer.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2009 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 "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 *
       
    16 */
       
    17 #ifndef PK5RECOGNIZER_H_
       
    18 #define PK5RECOGNIZER_H_
       
    19 
       
    20 // INCLUDES
       
    21 #include <apmrec.h>
       
    22 
       
    23 // CLASS DECLARATION
       
    24 /**
       
    25 *  Mime recognizer for "application/pk5".
       
    26 *  
       
    27 */
       
    28 const TInt KPk5RecognizerImplementationUid = 0x2000FD89;
       
    29 class CPk5Recognizer : public CApaDataRecognizerType
       
    30     {
       
    31     public: // Constructor
       
    32 
       
    33         /**
       
    34         * Constructor.
       
    35         */
       
    36         CPk5Recognizer();
       
    37 
       
    38 		~CPk5Recognizer();
       
    39 		static CPk5Recognizer* NewL();
       
    40 		
       
    41     public:  // Functions from base classes
       
    42 
       
    43         /**
       
    44         * From CApaDataRecognizerType.
       
    45         * Preferred byte size of sample content.
       
    46         */
       
    47         TUint PreferredBufSize();
       
    48 
       
    49         /**
       
    50         * From CApaDataRecognizerType.
       
    51         * Return mime type which this class supports to recognize.
       
    52         *
       
    53         * @param aIndex index.
       
    54         * @return always text/plain.
       
    55         */
       
    56         TDataType SupportedDataTypeL(TInt aIndex) const;
       
    57         /**
       
    58         ** From CApaDataRecognizerType.
       
    59         */
       
    60         
       
    61     	static CApaDataRecognizerType* CreateRecognizerL();
       
    62     		
       
    63     private:  // Functions from base classes
       
    64 
       
    65         /*
       
    66         // Two phase contructor
       
    67         //
       
    68         */
       
    69         void ConstructL();
       
    70         /**
       
    71         * From CApaDataRecognizerType.
       
    72         * This is a main part of recognization.
       
    73         *
       
    74         * @param aName file name.
       
    75         * @param aBuffer sample content.
       
    76         */
       
    77         void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer);
       
    78 
       
    79     };
       
    80 
       
    81 #endif /*PK5RECOGNIZER_H_*/