internetradio2.0/irfilerecognizer/inc/irrecognizer.h
changeset 14 896e9dbc5f19
child 15 065198191975
equal deleted inserted replaced
12:608f67c22514 14:896e9dbc5f19
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef IRRECOGNIZER_H
       
    20 #define IRRECOGNIZER_H
       
    21 
       
    22 #include <apmrec.h>
       
    23 
       
    24 const TInt KIRRecognizerImplementationUid = 0x2000B4DE;
       
    25 const TUid KIRRecognizerDllUid = {0x2000B4A9};
       
    26 /**
       
    27  * Recognizer plug-in for .Pls files.
       
    28  * 
       
    29  * @code
       
    30  * Uses Methods from the base class CApaDataRecognizerType
       
    31  * to recognise the .pls files  
       
    32  * @endcode
       
    33  *
       
    34 */
       
    35 class CApaRecognizerEx: public CApaDataRecognizerType
       
    36     {
       
    37 public:
       
    38     /**
       
    39     * Default constructor
       
    40     */
       
    41     CApaRecognizerEx();
       
    42 
       
    43     /**
       
    44     * Destructor.
       
    45     */
       
    46     virtual ~CApaRecognizerEx();
       
    47 
       
    48     /**
       
    49     * CreateRecognizerL()
       
    50     * From CApaDataRecognizerType CreateRecognizerL.
       
    51     * creates and returns recognizer
       
    52     */
       
    53 	static CApaDataRecognizerType* CreateRecognizerL();
       
    54 
       
    55     /**
       
    56     * PreferredBufSize()
       
    57     * From CApaDataRecognizerType PreferredBufSize.
       
    58     * returns preferred buffer size
       
    59     */
       
    60 	TUint PreferredBufSize();
       
    61 
       
    62     /**
       
    63     * SupportedDataTypeL(SupportedDataTypeL)
       
    64     * From CApaDataRecognizerType SupportedDataTypeL.
       
    65     * @param aIndex is index that identifies the data type
       
    66     * returns supported mime type
       
    67     */
       
    68 	TDataType SupportedDataTypeL(TInt aIndex) const;
       
    69 
       
    70 private:
       
    71         /**
       
    72 	 * DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer)
       
    73 	 * From CApaDataRecognizerType DoRecognizeL.
       
    74 	 * recognises the file by name and/or buffer
       
    75 	 * @param aName is file name containing the data to be recognized
       
    76 	 * @param aBuffer is buffer containing data to be recognized
       
    77 	 */
       
    78 	void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer);
       
    79 	
       
    80 	/*
       
    81 	 * try to recognize a m3u file and decide whether it should be launched by InternetRadio application
       
    82 	 */
       
    83 	void RecognizeM3uFileL(const TDesC& aFileName);
       
    84 	
       
    85 	/*
       
    86 	 * check if specified protocol streaming links are in aBuffer
       
    87 	 */
       
    88 	TBool CheckStreamingLinksL(TDes8& aBuffer, const TDesC8& aProtocol);
       
    89     };
       
    90 
       
    91 #endif //IRRECOGNIZER_H