--- a/example/clientapi/smf/inc/common/smfmusic/smflyrics.h Thu Mar 25 14:44:08 2010 +0530
+++ b/example/clientapi/smf/inc/common/smfmusic/smflyrics.h Tue Apr 06 16:35:37 2010 +0530
@@ -1,30 +1,34 @@
/**
- * @file smflyrics.h
- * @author Nalina Hariharan, Sasken Communication Technologies Ltd - Initial contribution
- * @version 1.0
- *
- * @section LICENSE
- *
- * Copyright (c) 2010 Sasken Communication Technologies Ltd.
+ * Copyright (c) 2010 Sasken Communication Technologies Ltd.
* All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the "{License}"
- * which accompanies this distribution, and is available
- * at the URL "{LicenseUrl}".
+ * This component and the accompanying materials are made available
+ * under the terms of the "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
+ *
+ * Initial Contributors:
+ * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
+ *
+ * Contributors:
+ * Manasij Roy, Nalina Hariharan
*
- * @section DESCRIPTION
+ * Description:
+ * The SmfLyrics class represents an instance of a music track's lyrics
*
- * The lyrics class represents an instance of a music track's lyrics
*/
#ifndef SMFLYRICS_H_
#define SMFLYRICS_H_
-#include <QObject>
#include <qdatastream.h>
#include <QDateTime>
-#include "SmfClientGlobal.h"
+#include <QSharedData>
+#include <smfclientglobal.h>
+
+class SmfLyricsPrivate;
+
/**
+ * @ingroup smf_common_group
* The lyrics class represents an instance of a music track's lyrics
*/
class SMFCLIENT_EXPORT SmfLyrics : public QObject
@@ -38,61 +42,70 @@
SmfLyrics( QObject *aParent = 0 );
/**
+ * Copy Constructor
+ * @param aOther The reference object
+ */
+ SmfLyrics( const SmfLyrics &aOther );
+
+ /**
* Destructor
*/
~SmfLyrics( );
-
+
/**
* Method to get the lyrics
- * @param aLyrics The lyrics content
+ * @return The lyrics data
*/
- void getLyrics( QByteArray &aLyrics );
+ QByteArray lyrics( ) const;
/**
* Method to get the language
- * @param aLanguage The language
- */
- void getLanguage( QString &aLanguage );
-
- /**
- * Method to get the frame rate
- * @return the frame rate
+ * @return The language
*/
- double getFrameRate( );
-
- /**
- * Method to get the duration
- * @return the duration
- */
- double getDuration( );
+ QString language( ) const;
/**
* Method to get the release year
- * @param aRelYear The release year
+ * @return The release year
*/
- void getReleaseYear( QDateTime &aRelYear );
+ QDateTime releaseYear( ) const;
/**
* Method to get the id of the lyrics
- * @param aId The ID value
+ * @return The ID value
*/
- void getId( QString &aId );
-
+ QString id( ) const;
+
private:
- QByteArray m_lyrics; // lyrics data
- QString m_language; // language
- double m_frameRate; // frame rate
- double m_duration; // duration
- QDateTime m_releaseYr; // release year
- QString m_lyricsId; // lyrics id
+ QSharedDataPointer<SmfLyricsPrivate> d;
+
+ friend QDataStream &operator<<( QDataStream &aDataStream,
+ const SmfLyrics &aLyrics );
+
+ friend QDataStream &operator>>( QDataStream &aDataStream,
+ SmfLyrics &aLyrics );
};
-/**
-* Externalization
-*/
-QDataStream &operator<<(QDataStream &, const SmfLyrics&);
+
+
/**
- * Internalization
+ * Method for Externalization. Writes the SmfLyrics object to
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be written
+ * @param aLyrics The SmfLyrics object to be externalized
+ * @return reference to the written stream
*/
-QDataStream &operator>>(QDataStream &, SmfLyrics&);
+QDataStream &operator<<( QDataStream &aDataStream,
+ const SmfLyrics &aLyrics );
+
+/**
+ * Method for Internalization. Reads a SmfLyrics object from
+ * the stream and returns a reference to the stream.
+ * @param aDataStream Stream to be read
+ * @param aLyrics The SmfLyrics object to be internalized
+ * @return reference to the stream
+ */
+QDataStream &operator>>( QDataStream &aDataStream,
+ SmfLyrics &aLyrics);
+
#endif /* SMFLYRICS_H_ */