example/clientapi/smf/inc/common/smfmusic/smfartists.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 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 : public QObject
       
    36 	{
       
    37 	Q_OBJECT
       
    38 public:
       
    39 	/**
       
    40 	 * Constructor with default argument
       
    41 	 * @param aParent The parent object
       
    42 	 */
       
    43 	SmfArtists( QObject *aParent = 0 );
       
    44 	
       
    45 	/**
       
    46 	 * Copy Constructor
       
    47 	 * @param aOther The reference object
       
    48 	 */
       
    49 	SmfArtists( const SmfArtists &aOther );
       
    50 	
       
    51 	/**
       
    52 	 * Destructor
       
    53 	 */
       
    54 	~SmfArtists( );
       
    55 	
       
    56 	/**
       
    57 	 * Method to get the artists names
       
    58 	 * @return The list of artists
       
    59 	 */
       
    60 	QStringList names( ) const;
       
    61 	
       
    62 	/**
       
    63 	 * Method to get the image of the artists
       
    64 	 * @return The image of te artists
       
    65 	 */
       
    66 	QImage image( ) const;
       
    67 	
       
    68 	/**
       
    69 	 * Method to get the url of the artists
       
    70 	 * @return The url of the artists
       
    71 	 */
       
    72 	QUrl url( ) const;
       
    73 		
       
    74 private:
       
    75 	QSharedDataPointer<SmfArtistsPrivate> d;
       
    76 	
       
    77 	friend QDataStream &operator<<( QDataStream &aDataStream, 
       
    78 			const SmfArtists &aArtists );
       
    79 
       
    80 	friend QDataStream &operator>>( QDataStream &aDataStream, 
       
    81 			SmfArtists &aArtists );
       
    82 	
       
    83 	};
       
    84 
       
    85 
       
    86 /**
       
    87  * Method for Externalization. Writes the SmfArtists object to 
       
    88  * the stream and returns a reference to the stream.
       
    89  * @param aDataStream Stream to be written
       
    90  * @param aArtists The SmfArtists object to be externalized
       
    91  * @return reference to the written stream
       
    92  */
       
    93 QDataStream &operator<<( QDataStream &aDataStream, 
       
    94 		const SmfArtists &aArtists );
       
    95 
       
    96 /**
       
    97  * Method for Internalization. Reads a SmfArtists object from 
       
    98  * the stream and returns a reference to the stream.
       
    99  * @param aDataStream Stream to be read
       
   100  * @param aArtists The SmfArtists object to be internalized
       
   101  * @return reference to the stream
       
   102  */
       
   103 QDataStream &operator>>( QDataStream &aDataStream, 
       
   104 		SmfArtists &aArtists);
       
   105 
       
   106 
       
   107 #endif /* SMFARTISTS_H_ */