example/clientapi/smf/inc/common/smfmusic/smflyrics.h
changeset 2 86af6c333601
parent 1 4b1e636e8a71
equal deleted inserted replaced
1:4b1e636e8a71 2:86af6c333601
     1 /**
     1 /**
     2  * @file	smflyrics.h
     2  * Copyright (c) 2010 Sasken Communication Technologies Ltd.
     3  * @author  Nalina Hariharan, Sasken Communication Technologies Ltd - Initial contribution
     3  * All rights reserved.
     4  * @version 1.0
     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"
     5  *
     8  *
     6  * @section LICENSE
     9  * Initial Contributors:
       
    10  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
     7  *
    11  *
     8  * Copyright (c) 2010 Sasken Communication Technologies Ltd. 
    12  * Contributors:
     9  * All rights reserved.
    13  * Manasij Roy, Nalina Hariharan
    10  * This component and the accompanying materials are made available 
       
    11  * under the terms of the "{License}" 
       
    12  * which accompanies  this distribution, and is available 
       
    13  * at the URL "{LicenseUrl}".
       
    14  * 
    14  * 
    15  * @section DESCRIPTION
    15  * Description:
       
    16  * The SmfLyrics class represents an instance of a music track's lyrics
    16  *
    17  *
    17  * The lyrics class represents an instance of a music track's lyrics
       
    18  */
    18  */
    19 
    19 
    20 #ifndef SMFLYRICS_H_
    20 #ifndef SMFLYRICS_H_
    21 #define SMFLYRICS_H_
    21 #define SMFLYRICS_H_
    22 
    22 
    23 #include <QObject>
       
    24 #include <qdatastream.h>
    23 #include <qdatastream.h>
    25 #include <QDateTime>
    24 #include <QDateTime>
    26 #include "SmfClientGlobal.h"
    25 #include <QSharedData>
       
    26 #include <smfclientglobal.h>
       
    27 
       
    28 class SmfLyricsPrivate;
       
    29 
    27 /**
    30 /**
       
    31  * @ingroup smf_common_group
    28  * The lyrics class represents an instance of a music track's lyrics
    32  * The lyrics class represents an instance of a music track's lyrics
    29  */
    33  */
    30 class SMFCLIENT_EXPORT SmfLyrics : public QObject
    34 class SMFCLIENT_EXPORT SmfLyrics : public QObject
    31 	{
    35 	{
    32 	Q_OBJECT
    36 	Q_OBJECT
    36 	 * @param aParent The parent object
    40 	 * @param aParent The parent object
    37 	 */
    41 	 */
    38 	SmfLyrics( QObject *aParent = 0 );
    42 	SmfLyrics( QObject *aParent = 0 );
    39 	
    43 	
    40 	/**
    44 	/**
       
    45 	 * Copy Constructor
       
    46 	 * @param aOther The reference object
       
    47 	 */
       
    48 	SmfLyrics( const SmfLyrics &aOther );
       
    49 	
       
    50 	/**
    41 	 * Destructor
    51 	 * Destructor
    42 	 */
    52 	 */
    43 	~SmfLyrics( );
    53 	~SmfLyrics( );
    44 
    54 	
    45 	/**
    55 	/**
    46 	 * Method to get the lyrics
    56 	 * Method to get the lyrics
    47 	 * @param aLyrics The lyrics content
    57 	 * @return The lyrics data
    48 	 */
    58 	 */
    49 	void getLyrics( QByteArray &aLyrics );
    59 	QByteArray lyrics( ) const;
    50 	
    60 	
    51 	/**
    61 	/**
    52 	 * Method to get the language
    62 	 * Method to get the language
    53 	 * @param aLanguage The language
    63 	 * @return The language
    54 	 */
    64 	 */
    55 	void getLanguage( QString &aLanguage );
    65 	QString language( ) const;
    56 	
       
    57 	/**
       
    58 	 * Method to get the frame rate
       
    59 	 * @return the frame rate
       
    60 	 */
       
    61 	double getFrameRate( );
       
    62 	
       
    63 	/**
       
    64 	 * Method to get the duration
       
    65 	 * @return the duration
       
    66 	 */
       
    67 	double getDuration( );
       
    68 	
    66 	
    69 	/**
    67 	/**
    70 	 * Method to get the release year
    68 	 * Method to get the release year
    71 	 * @param aRelYear The release year
    69 	 * @return The release year
    72 	 */
    70 	 */
    73 	void getReleaseYear( QDateTime &aRelYear );
    71 	QDateTime releaseYear( ) const;
    74 	
    72 	
    75 	/**
    73 	/**
    76 	 * Method to get the id of the lyrics
    74 	 * Method to get the id of the lyrics
    77 	 * @param aId The ID value 
    75 	 * @return The ID value 
    78 	 */
    76 	 */
    79 	void getId( QString &aId );
    77 	QString id( ) const;
       
    78 	
       
    79 private:
       
    80 	QSharedDataPointer<SmfLyricsPrivate> d;
       
    81 	
       
    82 	friend QDataStream &operator<<( QDataStream &aDataStream, 
       
    83 			const SmfLyrics &aLyrics );
    80 
    84 
    81 private:
    85 	friend QDataStream &operator>>( QDataStream &aDataStream, 
    82 	QByteArray m_lyrics;	// lyrics data
    86 			SmfLyrics &aLyrics );
    83 	QString m_language;		// language
       
    84 	double m_frameRate;		// frame rate
       
    85 	double m_duration;		// duration
       
    86 	QDateTime m_releaseYr;	// release year
       
    87 	QString m_lyricsId;		// lyrics id
       
    88 	
    87 	
    89 	};
    88 	};
       
    89 
       
    90 
    90 /**
    91 /**
    91 * Externalization
    92  * Method for Externalization. Writes the SmfLyrics object to 
    92 */
    93  * the stream and returns a reference to the stream.
    93 QDataStream &operator<<(QDataStream &, const SmfLyrics&);
    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 
    94 /**
   101 /**
    95  * Internalization
   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
    96  */
   107  */
    97 QDataStream &operator>>(QDataStream &, SmfLyrics&);
   108 QDataStream &operator>>( QDataStream &aDataStream, 
       
   109 		SmfLyrics &aLyrics);
       
   110 
    98 #endif /* SMFLYRICS_H_ */
   111 #endif /* SMFLYRICS_H_ */