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 playlist class represents an instance of a playlist |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef SMFPLAYLIST_H_ |
|
21 #define SMFPLAYLIST_H_ |
|
22 |
|
23 #include <smftrackinfo.h> |
|
24 #include <qdatastream.h> |
|
25 #include <QSharedData> |
|
26 #include <smfclientglobal.h> |
|
27 |
|
28 class SmfPlaylistPrivate; |
|
29 |
|
30 /** |
|
31 * @ingroup smf_common_group |
|
32 * The playlist class represents an instance of a playlist |
|
33 */ |
|
34 class SMFCLIENT_EXPORT SmfPlaylist |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Constructor with default argument |
|
39 */ |
|
40 SmfPlaylist(); |
|
41 |
|
42 /** |
|
43 * Copy Constructor |
|
44 * @param aOther The reference object |
|
45 */ |
|
46 SmfPlaylist( const SmfPlaylist &aOther ); |
|
47 |
|
48 /** |
|
49 * Overloaded = operator |
|
50 * @param aOther The reference object |
|
51 */ |
|
52 SmfPlaylist& operator=( const SmfPlaylist &aOther ); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~SmfPlaylist( ); |
|
58 |
|
59 /** |
|
60 * Method to get the list of tracks in the playlist |
|
61 * @return The list of tracks in the playlist |
|
62 */ |
|
63 QList<SmfTrackInfo> trackList( ) const; |
|
64 |
|
65 /** |
|
66 * Method to get the playlist title |
|
67 * @return The title of the playlist |
|
68 */ |
|
69 QString playListTitle( ) const; |
|
70 |
|
71 /** |
|
72 * Method to get the creation date of the playlist |
|
73 * @return The date and time of creation of the playlist |
|
74 */ |
|
75 QDateTime creationDate( ) const; |
|
76 |
|
77 /** |
|
78 * Method to get the id of the playlist |
|
79 * @return The ID value |
|
80 */ |
|
81 QString id( ) const; |
|
82 |
|
83 /** |
|
84 * Method to set the list of tracks in the playlist |
|
85 * @param aList The new list of tracks in the playlist |
|
86 */ |
|
87 void setTrackList( const QList<SmfTrackInfo> &aList ); |
|
88 |
|
89 /** |
|
90 * Method to set the playlist title |
|
91 * @param aTitle The new title of the playlist |
|
92 */ |
|
93 void setPlayListTitle( const QString &aTitle ); |
|
94 |
|
95 /** |
|
96 * Method to set the creation date of the playlist |
|
97 * @param aDate The new date and time of creation of the playlist |
|
98 */ |
|
99 void setCreationDate( const QDateTime &aDate ); |
|
100 |
|
101 /** |
|
102 * Method to set the id of the playlist |
|
103 * @param aId The ID value |
|
104 */ |
|
105 void setId( const QString &aId); |
|
106 |
|
107 private: |
|
108 QSharedDataPointer<SmfPlaylistPrivate> d; |
|
109 |
|
110 friend QDataStream &operator<<( QDataStream &aDataStream, |
|
111 const SmfPlaylist &aPlaylist ); |
|
112 |
|
113 friend QDataStream &operator>>( QDataStream &aDataStream, |
|
114 SmfPlaylist &aPlaylist ); |
|
115 |
|
116 }; |
|
117 |
|
118 |
|
119 /** |
|
120 * Method for Externalization. Writes the SmfPlaylist object to |
|
121 * the stream and returns a reference to the stream. |
|
122 * @param aDataStream Stream to be written |
|
123 * @param aPlaylist The SmfPlaylist object to be externalized |
|
124 * @return reference to the written stream |
|
125 */ |
|
126 QDataStream &operator<<( QDataStream &aDataStream, |
|
127 const SmfPlaylist &aPlaylist ); |
|
128 |
|
129 /** |
|
130 * Method for Internalization. Reads a SmfPlaylist object from |
|
131 * the stream and returns a reference to the stream. |
|
132 * @param aDataStream Stream to be read |
|
133 * @param aPlaylist The SmfPlaylist object to be internalized |
|
134 * @return reference to the stream |
|
135 */ |
|
136 QDataStream &operator>>( QDataStream &aDataStream, |
|
137 SmfPlaylist &aPlaylist); |
|
138 |
|
139 |
|
140 // Make the class SmfPlaylist known to QMetaType, so that as to register it. |
|
141 Q_DECLARE_METATYPE(SmfPlaylist) |
|
142 |
|
143 #endif /* SMFPLAYLIST_H_ */ |
|