mmappcomponents/playlistengine/inc/mpxplaylistrecognizer.h
changeset 0 a2952bb97e68
child 27 cbb1bfb7ebfb
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Recognizer for playlist files.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MPXPLAYLISTRECOGNIZER_H
       
    21 #define MPXPLAYLISTRECOGNIZER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <apmrec.h>
       
    26 #include <apmstd.h>
       
    27 
       
    28 // CLASS DECLARATION
       
    29 class CMPXPluginHandlerBase;
       
    30 
       
    31 /**
       
    32 *  Concrete implementation of the recognizer API used to recognize playlist files.
       
    33 *
       
    34 *  This is used by the application framework, as well as CMPXPlaylistEngine to
       
    35 *  determine if a given media is a supported playlist.
       
    36 *
       
    37 *  @lib mpxplaylisrecognizer.lib
       
    38 */
       
    39 class CMPXPlaylistRecognizer :
       
    40     public CApaDataRecognizerType,
       
    41     public MMPXPluginHandlerObserver
       
    42 	{
       
    43     public:  // Constructors and destructor
       
    44 
       
    45         /**
       
    46         * Two-phased constructor.
       
    47         *
       
    48         * @return constructed object
       
    49         */
       
    50         static CMPXPlaylistRecognizer* NewL();
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CMPXPlaylistRecognizer();
       
    56 
       
    57     private:
       
    58 
       
    59         /**
       
    60         * C++ default constructor.
       
    61         */
       
    62         CMPXPlaylistRecognizer();
       
    63 
       
    64         /**
       
    65         * By default Symbian 2nd phase constructor is private.
       
    66         */
       
    67         void ConstructL();
       
    68 
       
    69     private: // Functions from base class
       
    70 
       
    71         /**
       
    72         * From CApaDataRecognizerType
       
    73         * Returns one of the SupportedDataType
       
    74         * @param aIndex - depending on the file extension
       
    75         * @return Supported DataType
       
    76         */
       
    77         TDataType SupportedDataTypeL( TInt aIndex ) const;
       
    78 
       
    79         /**
       
    80         * From CApaDataRecognizerType
       
    81         * Returns the buffersize needed to scan
       
    82         * @return BufferSize if needed
       
    83         */
       
    84         TUint PreferredBufSize();
       
    85 
       
    86         /**
       
    87         * From CApaDataRecognizerType
       
    88         * Do the recognition of the file using the name of the
       
    89         * the file or the buffer to scan
       
    90         * @param aName    Name of the file
       
    91         * @param aBuffer  Buffer that shall be scanned for recognition
       
    92         */
       
    93         void DoRecognizeL( const TDesC& aName, const TDesC8& aBuffer );
       
    94 
       
    95         /*
       
    96         * @see MMPXPluginHandlerObserver
       
    97         */
       
    98         void HandlePluginHandlerEvent(TPluginHandlerEvents aEvent,
       
    99             const TUid& aPluginUid, TBool aLoaded, TInt aData);
       
   100 
       
   101     private:	// Data
       
   102 
       
   103         CMPXPluginHandlerBase* iPluginHandler;
       
   104 
       
   105 	};
       
   106 
       
   107 
       
   108 #endif	// MPXPLAYLISTRECOGNIZER_H