mmserv/metadatautility/Src/MetaDataParserID3v23.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.3 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 CMETADATAPARSERID3V23_H
       
    23 #define CMETADATAPARSERID3V23_H
       
    24 
       
    25 // INCLUDES
       
    26 #include "MetaDataParserID3v2.h"
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 *  This class implements parsing of ID3v2.3.
       
    32 *
       
    33 *  @lib MetaDataUtility.lib
       
    34 *  @since 3.0
       
    35 */
       
    36 class CMetaDataParserID3v23 : 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 CMetaDataParserID3v23* NewL( CMetaDataSource& aSource );
       
    46 
       
    47         /**
       
    48         * Destructor.
       
    49         */
       
    50         virtual ~CMetaDataParserID3v23();
       
    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         /**
       
    89         * From CMetaDataParserID3v2
       
    90         * Reads the year from the source and appends it to the container.
       
    91 		* @param aSize Size of the data.
       
    92         * @return void
       
    93 		*/
       
    94 		void GetTextYearL( TInt aSize );
       
    95 
       
    96         /**
       
    97         * From CMetaDataParserID3v2
       
    98         * Reads the comment from the source and appends it to the container.
       
    99 		* @param aSize Size of the data.
       
   100         * @return void
       
   101 		*/
       
   102 		void GetCommentL( TInt aSize );
       
   103 
       
   104         /**
       
   105         * From CMetaDataParserID3v2
       
   106         * Reads the Url from the source and appends it to the container.
       
   107 		* @param aSize Size of the data.
       
   108         * @return void
       
   109 		*/
       
   110 		void GetUrlL( TInt aSize );
       
   111 		
       
   112 		/**
       
   113         * From CMetaDataParserID3v2
       
   114         * Reads the user defined Url from the source and 
       
   115         * appends it to the container.
       
   116         * @since 3.0
       
   117 		* @param aSize Size of the data.
       
   118         * @return void
       
   119 		*/	
       
   120 		void GetUserUrlL( TInt aSize );
       
   121 		void GetUnsyncLyricsL( TInt aSize ); 
       
   122 
       
   123         /**
       
   124         * From CMetaDataParserID3v2
       
   125         * Reads the Jpeg from the source and appends it to the container.
       
   126 		* @param aSize Size of the data.
       
   127         * @return void
       
   128 		*/
       
   129 		void GetJpegL( TInt aSize );
       
   130 		
       
   131 		/**
       
   132 		* From CMetaDataParserID3v2
       
   133         * Reads the duration from the source and appends it to the container.
       
   134         * @since 3.0
       
   135 		* @param aSize Size of the data.
       
   136         * @return void
       
   137 		*/
       
   138 		void GetDurationL( TInt aSize );
       
   139 		
       
   140 		/**
       
   141 		* From CMetaDataParserID3v2
       
   142         * Reads the date from the source and appends it to the container.
       
   143         * @since 3.0
       
   144 		* @param aSize Size of the data.
       
   145         * @return void
       
   146 		*/
       
   147 		void GetTextDateL( TInt aSize );
       
   148 
       
   149 		/**
       
   150 		* From CMetaDataParserID3v2
       
   151         * Reads the popularimeter appends it to the container.
       
   152         * @since 3.0
       
   153 		* @param aSize Size of the data.
       
   154         * @return void
       
   155 		*/
       
   156 		void GetRatingL (TInt aSize);
       
   157 		
       
   158         /**
       
   159         * From CMetaDataParserID3v2
       
   160         * Converts to unicode.
       
   161 		* @param aEncoding Encoding of aDesc.
       
   162 		* @param aDesc Source to be converted to unicode.
       
   163 		* @param aUnicode Contains the converted unicode on return.
       
   164         * @return The number of unconverted characters left at the end of the input descriptor
       
   165         *	(e.g. because the output descriptor is not long enough to hold all the text),
       
   166         *	or one of the error values defined in TError.
       
   167 		*/
       
   168 		TInt ConvertToUnicodeL( TInt aEncoding, const TDesC8& aDesc, TDes16& aUnicode );
       
   169 
       
   170 	private:
       
   171 
       
   172         /**
       
   173         * C++ default constructor.
       
   174         */
       
   175 		CMetaDataParserID3v23( CMetaDataSource& aSource );
       
   176 
       
   177         /**
       
   178         * By default Symbian 2nd phase constructor is private.
       
   179         */
       
   180 		void ConstructL();
       
   181 
       
   182  	private:	// Data
       
   183 
       
   184 		// Metadata source
       
   185 //		CMetaDataSource& iSource;
       
   186     };
       
   187 
       
   188 #endif      // CMETADATAPARSERID3V23_H
       
   189 
       
   190 // End of File