|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Wrapper for mpx collection framework utilities. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MPMPXCOLLECTIONFRAMEWORKWRAPPER_H |
|
19 #define MPMPXCOLLECTIONFRAMEWORKWRAPPER_H |
|
20 |
|
21 #include <QObject> |
|
22 |
|
23 #include "mpmpxcollectionviewdefs.h" |
|
24 #include "mpcommondefs.h" |
|
25 |
|
26 class MpMpxCollectionFrameworkWrapperPrivate; |
|
27 class MpMpxCollectionData; |
|
28 class MpSongData; |
|
29 class QStringList; |
|
30 |
|
31 |
|
32 class MpMpxCollectionFrameworkWrapper : public QObject |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 friend class MpMpxCollectionFrameworkWrapperPrivate; |
|
37 |
|
38 public: |
|
39 |
|
40 explicit MpMpxCollectionFrameworkWrapper( TUid hostUid=TUid::Uid(MpCommon::KMusicPlayerUid), |
|
41 MpSongData *songData=0, QObject *parent=0 ); |
|
42 virtual ~MpMpxCollectionFrameworkWrapper(); |
|
43 |
|
44 void openCollection( TCollectionContext context ); |
|
45 void openCollectionItem( int index ); |
|
46 void back(); |
|
47 void findPlaylists( QStringList &playlists ); |
|
48 void createPlaylist( QString &playlistName, QList<int> &selection, MpMpxCollectionData* collectionData ); |
|
49 void saveToPlaylist( int playlistIndex, QList<int> &selection ); |
|
50 void saveToCurrentPlaylist( QList<int> &selection, MpMpxCollectionData *collectionData ); |
|
51 void renamePlaylist( QString &newName, int index ); |
|
52 void renamePlaylist( QString &newName ); |
|
53 void deleteSongs( QList<int> &selection ); |
|
54 void setShuffle( bool active ); |
|
55 void cancelRequest(); |
|
56 |
|
57 void previewItem( int index ); |
|
58 void openIsolatedCollection( TCollectionContext context ); |
|
59 void releaseIsolatedCollection(); |
|
60 |
|
61 void findAlbumSongs( int index ); |
|
62 void playAlbumSongs( int albumIndex, int songIndex, MpMpxCollectionData* collectionData ); |
|
63 |
|
64 MpMpxCollectionData *collectionData(); |
|
65 |
|
66 void reopenCollection(); |
|
67 void reorderPlaylist( int playlistId, int songId, int originalOrdinal, int newOrdinal ); |
|
68 void setRepeatFeatureEnabled( bool enable ); |
|
69 void setShuffleFeatureEnabled( bool enable ); |
|
70 |
|
71 void openShuffleAllSongsPath(); |
|
72 |
|
73 void retrieveSongDetails( int index ); |
|
74 |
|
75 void savePath( QByteArray &data ); |
|
76 void restorePath( const QByteArray &data ); |
|
77 |
|
78 signals: |
|
79 |
|
80 void collectionPlaylistOpened(); |
|
81 void playlistSaved( bool success ); |
|
82 void deleteStarted(TCollectionContext context, int Count); |
|
83 void songsDeleted( bool success ); |
|
84 void playlistsRenamed( bool success ); |
|
85 void aboutToAddSongs( int count ); |
|
86 |
|
87 void isolatedCollectionOpened( MpMpxCollectionData* collectionData ); |
|
88 |
|
89 void containerContentsChanged(); |
|
90 void restorePathFailed(); |
|
91 |
|
92 private: |
|
93 |
|
94 Q_DISABLE_COPY( MpMpxCollectionFrameworkWrapper ) |
|
95 MpMpxCollectionFrameworkWrapperPrivate *d_ptr; |
|
96 |
|
97 }; |
|
98 |
|
99 #endif // MPMPXCOLLECTIONFRAMEWORKWRAPPER_H |