|
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 SmfAlbum class represents a music album |
|
17 * |
|
18 */ |
|
19 #ifndef SMFALBUM_H_ |
|
20 #define SMFALBUM_H_ |
|
21 |
|
22 #include <QImage> |
|
23 #include <qdatastream.h> |
|
24 #include <QSharedData> |
|
25 #include <smfclientglobal.h> |
|
26 |
|
27 class SmfAlbumPrivate; |
|
28 class SmfArtists; |
|
29 |
|
30 /** |
|
31 * @ingroup smf_common_group |
|
32 * The SmfAlbum class represents a music album |
|
33 */ |
|
34 class SMFCLIENT_EXPORT SmfAlbum : public QObject |
|
35 { |
|
36 Q_OBJECT |
|
37 public: |
|
38 /** |
|
39 * Constructor with default argument |
|
40 * @param aParent The parent object |
|
41 */ |
|
42 SmfAlbum( QObject *aParent = 0 ); |
|
43 |
|
44 /** |
|
45 * Copy Constructor |
|
46 * @param aOther The reference object |
|
47 */ |
|
48 SmfAlbum( const SmfAlbum &aOther ); |
|
49 |
|
50 /** |
|
51 * Overloaded = operator |
|
52 * @param aOther The reference object |
|
53 * @return The target reference value |
|
54 */ |
|
55 SmfAlbum& operator=( const SmfAlbum &aOther ); |
|
56 |
|
57 /** |
|
58 * Destructor |
|
59 */ |
|
60 ~SmfAlbum( ); |
|
61 |
|
62 /** |
|
63 * Method to get the album name |
|
64 * @return The album name |
|
65 */ |
|
66 QString name( ) const; |
|
67 |
|
68 /** |
|
69 * Method to get the album's image |
|
70 * @return The album's image |
|
71 */ |
|
72 QImage image( ) const; |
|
73 |
|
74 /** |
|
75 * Method to get the artist names |
|
76 * @return The list of artists in the album |
|
77 */ |
|
78 SmfArtists artists( ) const; |
|
79 |
|
80 /** |
|
81 * Method to get the id of the album |
|
82 * @return The ID value |
|
83 */ |
|
84 QString id( ) const; |
|
85 |
|
86 private: |
|
87 QSharedDataPointer<SmfAlbumPrivate> d; |
|
88 |
|
89 friend QDataStream &operator<<( QDataStream &aDataStream, |
|
90 const SmfAlbum &aAlbum ); |
|
91 |
|
92 friend QDataStream &operator>>( QDataStream &aDataStream, |
|
93 SmfAlbum &aAlbum ); |
|
94 |
|
95 }; |
|
96 |
|
97 |
|
98 /** |
|
99 * Method for Externalization. Writes the SmfAlbum object to |
|
100 * the stream and returns a reference to the stream. |
|
101 * @param aDataStream Stream to be written |
|
102 * @param aAlbum The SmfAlbum object to be externalized |
|
103 * @return reference to the written stream |
|
104 */ |
|
105 QDataStream &operator<<( QDataStream &aDataStream, |
|
106 const SmfAlbum &aAlbum ); |
|
107 |
|
108 /** |
|
109 * Method for Internalization. Reads a SmfAlbum object from |
|
110 * the stream and returns a reference to the stream. |
|
111 * @param aDataStream Stream to be read |
|
112 * @param aAlbum The SmfAlbum object to be internalized |
|
113 * @return reference to the stream |
|
114 */ |
|
115 QDataStream &operator>>( QDataStream &aDataStream, |
|
116 SmfAlbum &aAlbum); |
|
117 |
|
118 |
|
119 #endif /* SMFALBUM_H_ */ |