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