example/clientapi/smf/inc/common/smfmusic/smflyrics.h
changeset 3 0446eb7b28aa
parent 2 86af6c333601
child 4 969092730d34
equal deleted inserted replaced
2:86af6c333601 3:0446eb7b28aa
     1 /**
       
     2  * Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the "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  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
       
    11  *
       
    12  * Contributors:
       
    13  * Manasij Roy, Nalina Hariharan
       
    14  * 
       
    15  * Description:
       
    16  * The SmfLyrics class represents an instance of a music track's lyrics
       
    17  *
       
    18  */
       
    19 
       
    20 #ifndef SMFLYRICS_H_
       
    21 #define SMFLYRICS_H_
       
    22 
       
    23 #include <qdatastream.h>
       
    24 #include <QDateTime>
       
    25 #include <QSharedData>
       
    26 #include <smfclientglobal.h>
       
    27 
       
    28 class SmfLyricsPrivate;
       
    29 
       
    30 /**
       
    31  * @ingroup smf_common_group
       
    32  * The lyrics class represents an instance of a music track's lyrics
       
    33  */
       
    34 class SMFCLIENT_EXPORT SmfLyrics : public QObject
       
    35 	{
       
    36 	Q_OBJECT
       
    37 public:
       
    38 	/**
       
    39 	 * Constructor with default argument
       
    40 	 * @param aParent The parent object
       
    41 	 */
       
    42 	SmfLyrics( QObject *aParent = 0 );
       
    43 	
       
    44 	/**
       
    45 	 * Copy Constructor
       
    46 	 * @param aOther The reference object
       
    47 	 */
       
    48 	SmfLyrics( const SmfLyrics &aOther );
       
    49 	
       
    50 	/**
       
    51 	 * Destructor
       
    52 	 */
       
    53 	~SmfLyrics( );
       
    54 	
       
    55 	/**
       
    56 	 * Method to get the lyrics
       
    57 	 * @return The lyrics data
       
    58 	 */
       
    59 	QByteArray lyrics( ) const;
       
    60 	
       
    61 	/**
       
    62 	 * Method to get the language
       
    63 	 * @return The language
       
    64 	 */
       
    65 	QString language( ) const;
       
    66 	
       
    67 	/**
       
    68 	 * Method to get the release year
       
    69 	 * @return The release year
       
    70 	 */
       
    71 	QDateTime releaseYear( ) const;
       
    72 	
       
    73 	/**
       
    74 	 * Method to get the id of the lyrics
       
    75 	 * @return The ID value 
       
    76 	 */
       
    77 	QString id( ) const;
       
    78 	
       
    79 private:
       
    80 	QSharedDataPointer<SmfLyricsPrivate> d;
       
    81 	
       
    82 	friend QDataStream &operator<<( QDataStream &aDataStream, 
       
    83 			const SmfLyrics &aLyrics );
       
    84 
       
    85 	friend QDataStream &operator>>( QDataStream &aDataStream, 
       
    86 			SmfLyrics &aLyrics );
       
    87 	
       
    88 	};
       
    89 
       
    90 
       
    91 /**
       
    92  * Method for Externalization. Writes the SmfLyrics object to 
       
    93  * the stream and returns a reference to the stream.
       
    94  * @param aDataStream Stream to be written
       
    95  * @param aLyrics The SmfLyrics object to be externalized
       
    96  * @return reference to the written stream
       
    97  */
       
    98 QDataStream &operator<<( QDataStream &aDataStream, 
       
    99 		const SmfLyrics &aLyrics );
       
   100 
       
   101 /**
       
   102  * Method for Internalization. Reads a SmfLyrics object from 
       
   103  * the stream and returns a reference to the stream.
       
   104  * @param aDataStream Stream to be read
       
   105  * @param aLyrics The SmfLyrics object to be internalized
       
   106  * @return reference to the stream
       
   107  */
       
   108 QDataStream &operator>>( QDataStream &aDataStream, 
       
   109 		SmfLyrics &aLyrics);
       
   110 
       
   111 #endif /* SMFLYRICS_H_ */