mmserv/metadatautility/Src/MetaDataParserID3v24.h
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2004 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:  This class implements parsing of ID3v2.4 according to the
       
    15 *                specification found in www.id3.org. Note that only a selected
       
    16 *				 frames are supported at this time.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CMETADATAPARSERID3V24_H
       
    23 #define CMETADATAPARSERID3V24_H
       
    24 
       
    25 // INCLUDES
       
    26 #include "MetaDataParserID3v2.h"
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 *  This class implements parsing of ID3v2.4.
       
    32 *
       
    33 *  @lib MetaDataUtility.lib
       
    34 *  @since 3.0
       
    35 */
       
    36 class CMetaDataParserID3v24 : public CMetaDataParserID3v2
       
    37 	{
       
    38     public:  // Constructors and destructor
       
    39 
       
    40         /**
       
    41         * Two-phased constructor.
       
    42         * @param aSource Reference to a metadata source
       
    43         * @return A pointer to a new instance of this class
       
    44         */
       
    45         static CMetaDataParserID3v24* NewL( CMetaDataSource& aSource );
       
    46 
       
    47         /**
       
    48         * Destructor.
       
    49         */
       
    50         virtual ~CMetaDataParserID3v24();
       
    51 
       
    52     private: // Functions from base classes
       
    53 
       
    54         /**
       
    55         * From CMetaDataParserID3v2
       
    56         * This function is called from ParseL for header parsing and data initialization.
       
    57 		* @return void
       
    58         */
       
    59 		void PrepareToParseL();
       
    60 
       
    61         /**
       
    62         * From CMetaDataParserID3v2
       
    63         * Gets the next field's properties.
       
    64 		* @param aFieldId Field Id, on return.
       
    65 		* @param aFrameHeaderSize Frame header size.
       
    66 		* @param aFrameSize Frame size, on return.
       
    67         * @return void
       
    68 		*/
       
    69 		void GetNextFieldL( TMetaDataFieldId& aFieldId, TInt& aFrameHeaderSize, TInt& aFrameSize );
       
    70 
       
    71         /**
       
    72         * From CMetaDataParserID3v2
       
    73         * Reads the text information from the source and appends it to the container.
       
    74 		* @param aFieldId Field Id.
       
    75 		* @param aSize Size of the data.
       
    76         * @return void
       
    77 		*/
       
    78 		void GetTextInfoL( TMetaDataFieldId aFieldId, TInt aSize );
       
    79 
       
    80     	/**
       
    81         * From CMetaDataParserID3v2
       
    82         * Reads the Genre from the source and appends it to the container.
       
    83 		* @param aSize Size of the data.
       
    84         * @return void
       
    85 		*/
       
    86 		void GetGenreL( TInt aSize );
       
    87         /**
       
    88         * From CMetaDataParserID3v2
       
    89         * Reads the year from the source and appends it to the container.
       
    90 		* @param aSize Size of the data.
       
    91         * @return void
       
    92 		*/
       
    93 		void GetTextYearL( TInt aSize );
       
    94 
       
    95         /**
       
    96         * From CMetaDataParserID3v2
       
    97         * Reads the comment from the source and appends it to the container.
       
    98 		* @param aSize Size of the data.
       
    99         * @return void
       
   100 		*/
       
   101 		void GetCommentL( TInt aSize );
       
   102 
       
   103         /**
       
   104         * From CMetaDataParserID3v2
       
   105         * Reads the Url from the source and appends it to the container.
       
   106 		* @param aSize Size of the data.
       
   107         * @return void
       
   108 		*/
       
   109 		void GetUrlL( TInt aSize );
       
   110 
       
   111         /**
       
   112         * From CMetaDataParserID3v2
       
   113         * Reads the Url from the source and appends it to the container.
       
   114 		* @param aSize Size of the data.
       
   115         * @return void
       
   116 		*/
       
   117 		void GetUnsyncLyricsL( TInt aSize ); 
       
   118 		
       
   119 		/**
       
   120         * From CMetaDataParserID3v2
       
   121         * Reads the user defined Url from the source and 
       
   122         * appends it to the container.
       
   123         * @since 3.0
       
   124 		* @param aSize Size of the data.
       
   125         * @return void
       
   126 		*/
       
   127 		void GetUserUrlL( TInt aSize );
       
   128 
       
   129         /**
       
   130         * From CMetaDataParserID3v2
       
   131         * Reads the Jpeg from the source and appends it to the container.
       
   132 		* @param aSize Size of the data.
       
   133         * @return void
       
   134 		*/
       
   135 		void GetJpegL( TInt aSize );
       
   136 		
       
   137 		/**
       
   138 		* From CMetaDataParserID3v2
       
   139         * Reads the duration from the source and appends it to the container.
       
   140         * @since 3.0
       
   141 		* @param aSize Size of the data.
       
   142         * @return void
       
   143 		*/
       
   144 		void GetDurationL( TInt aSize );
       
   145 		
       
   146 		/**
       
   147 		* From CMetaDataParserID3v2
       
   148         * Reads the date from the source and appends it to the container.
       
   149         * @since 3.0
       
   150 		* @param aSize Size of the data.
       
   151         * @return void
       
   152 		*/
       
   153 		void GetTextDateL( TInt aSize );
       
   154 
       
   155 		/**
       
   156 		* From CMetaDataParserID3v2
       
   157         * Reads the popularimeter appends it to the container.
       
   158         * @since 3.0
       
   159 		* @param aSize Size of the data.
       
   160         * @return void
       
   161 		*/
       
   162 		void GetRatingL (TInt aSize);
       
   163 		
       
   164         /**
       
   165         * From CMetaDataParserID3v2
       
   166         * Converts to unicode.
       
   167 		* @param aEncoding Encoding of aDesc.
       
   168 		* @param aDesc Source to be converted to unicode.
       
   169 		* @param aUnicode Contains the converted unicode on return.
       
   170         * @return The number of unconverted characters left at the end of the input descriptor
       
   171         *	(e.g. because the output descriptor is not long enough to hold all the text),
       
   172         *	or one of the error values defined in TError.
       
   173 		*/
       
   174 		TInt ConvertToUnicodeL( TInt aEncoding, const TDesC8& aDesc, TDes16& aUnicode );
       
   175 
       
   176 	private:
       
   177 
       
   178         /**
       
   179         * C++ default constructor.
       
   180         */
       
   181 		CMetaDataParserID3v24( CMetaDataSource& aSource );
       
   182 
       
   183         /**
       
   184         * By default Symbian 2nd phase constructor is private.
       
   185         */
       
   186 		void ConstructL();
       
   187 
       
   188  	private:	// Data
       
   189 
       
   190 		// Metadata source
       
   191 //		CMetaDataSource& iSource;
       
   192     };
       
   193 
       
   194 #endif      // CMETADATAPARSERID3V24_H
       
   195 
       
   196 // End of File