smf/smfservermodule/smfclient/common/smfartists.h
changeset 10 1d94eb8df9c2
parent 9 b85b0c039c14
equal deleted inserted replaced
9:b85b0c039c14 10:1d94eb8df9c2
     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 SmfArtists class represents the artists in a track or an album
       
    17  *
       
    18  */
       
    19 
       
    20 #ifndef SMFARTISTS_H_
       
    21 #define SMFARTISTS_H_
       
    22 
       
    23 #include <QImage>
       
    24 #include <QUrl>
       
    25 #include <qdatastream.h>
       
    26 #include <QSharedData>
       
    27 #include <smfclientglobal.h>
       
    28 #include <QMetaType>
       
    29 
       
    30 class SmfArtistsPrivate;
       
    31 
       
    32 /**
       
    33  * @ingroup smf_common_group
       
    34  * The SmfArtists class represents the artists in a track or an album
       
    35  */
       
    36 class SMFCLIENT_EXPORT SmfArtists
       
    37 	{
       
    38 public:
       
    39 	/**
       
    40 	 * Constructor with default argument
       
    41 	 */
       
    42 	SmfArtists( );
       
    43 	
       
    44 	/**
       
    45 	 * Copy Constructor
       
    46 	 * @param aOther The reference object
       
    47 	 */
       
    48 	SmfArtists( const SmfArtists &aOther );
       
    49 	
       
    50 	/**
       
    51 	 * Overloaded = operator
       
    52 	 * @param aOther The reference object
       
    53 	 */
       
    54 	SmfArtists& operator=( const SmfArtists &aOther );
       
    55 	
       
    56 	/**
       
    57 	 * Destructor
       
    58 	 */
       
    59 	~SmfArtists( );
       
    60 	
       
    61 	/**
       
    62 	 * Method to get the artists names
       
    63 	 * @return The list of artists
       
    64 	 */
       
    65 	QStringList names( ) const;
       
    66 	
       
    67 	/**
       
    68 	 * Method to get the image of the artists
       
    69 	 * @return The image of te artists
       
    70 	 */
       
    71 	QImage image( ) const;
       
    72 	
       
    73 	/**
       
    74 	 * Method to get the url of the artists
       
    75 	 * @return The url of the artists
       
    76 	 */
       
    77 	QUrl url( ) const;
       
    78 	
       
    79 	/**
       
    80 	 * Method to set the artists names
       
    81 	 * @param aList The list of artists names
       
    82 	 */
       
    83 	void setNames( const QStringList &aList );
       
    84 	
       
    85 	/**
       
    86 	 * Method to set the image of the artists
       
    87 	 * @param aImage The image of the artists
       
    88 	 */
       
    89 	void setImage( const QImage &aImage );
       
    90 	
       
    91 	/**
       
    92 	 * Method to set the url of the artists
       
    93 	 * @param aUrl The url of the artists
       
    94 	 */
       
    95 	void setUrl( const QUrl &aUrl );
       
    96 		
       
    97 private:
       
    98 	QSharedDataPointer<SmfArtistsPrivate> d;
       
    99 	
       
   100 	friend QDataStream &operator<<( QDataStream &aDataStream, 
       
   101 			const SmfArtists &aArtists );
       
   102 
       
   103 	friend QDataStream &operator>>( QDataStream &aDataStream, 
       
   104 			SmfArtists &aArtists );
       
   105 	
       
   106 	};
       
   107 
       
   108 
       
   109 /**
       
   110  * Method for Externalization. Writes the SmfArtists object to 
       
   111  * the stream and returns a reference to the stream.
       
   112  * @param aDataStream Stream to be written
       
   113  * @param aArtists The SmfArtists object to be externalized
       
   114  * @return reference to the written stream
       
   115  */
       
   116 SMFCLIENT_EXPORT QDataStream &operator<<( QDataStream &aDataStream, 
       
   117 		const SmfArtists &aArtists );
       
   118 
       
   119 /**
       
   120  * Method for Internalization. Reads a SmfArtists object from 
       
   121  * the stream and returns a reference to the stream.
       
   122  * @param aDataStream Stream to be read
       
   123  * @param aArtists The SmfArtists object to be internalized
       
   124  * @return reference to the stream
       
   125  */
       
   126 SMFCLIENT_EXPORT QDataStream &operator>>( QDataStream &aDataStream, 
       
   127 		SmfArtists &aArtists);
       
   128 
       
   129 // Make the class SmfArtists known to QMetaType, so that as to register it.
       
   130 Q_DECLARE_METATYPE(SmfArtists)
       
   131 
       
   132 #endif /* SMFARTISTS_H_ */