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