|
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 #include "mpmpxcollectionviewdefs.h" |
|
23 #include "mpcommondefs.h" |
|
24 |
|
25 class MpMpxCollectionData; |
|
26 class MpSongData; |
|
27 class QStringList; |
|
28 |
|
29 |
|
30 class MpMpxCollectionFrameworkWrapper : public QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 |
|
36 explicit MpMpxCollectionFrameworkWrapper( TUid hostUid=TUid::Uid(MpCommon::KMusicPlayerUid), |
|
37 MpSongData *songData=0, QObject *parent=0 ); |
|
38 virtual ~MpMpxCollectionFrameworkWrapper(); |
|
39 |
|
40 void openCollection( TCollectionContext context ); |
|
41 void openCollectionItem( int index ); |
|
42 void back(); |
|
43 void findPlaylists( QStringList &playlists ); |
|
44 void createPlaylist( QString &playlistName, QList<int> &selection, MpMpxCollectionData* collectionData ); |
|
45 void saveToPlaylist( int playlistIndex, QList<int> &selection ); |
|
46 void saveToCurrentPlaylist( QList<int> &selection, MpMpxCollectionData *collectionData ); |
|
47 void renamePlaylist( QString &newName, int index ); |
|
48 void renamePlaylist( QString &newName ); |
|
49 void deleteSongs( QList<int> &selection ); |
|
50 void setShuffle( bool active ); |
|
51 void cancelRequest(); |
|
52 |
|
53 void previewItem( int index ); |
|
54 void openIsolatedCollection( TCollectionContext context ); |
|
55 void releaseIsolatedCollection(); |
|
56 |
|
57 void findAlbumSongs( int index ); |
|
58 void playAlbumSongs( int albumIndex, int songIndex, MpMpxCollectionData* collectionData ); |
|
59 |
|
60 MpMpxCollectionData *collectionData(); |
|
61 |
|
62 void reopenCollection(); |
|
63 void reorderPlaylist( int playlistId, int songId, int originalOrdinal, int newOrdinal ); |
|
64 void setRepeatFeatureEnabled( bool enable ); |
|
65 void setShuffleFeatureEnabled( bool enable ); |
|
66 |
|
67 void openShuffleAllSongsPath(); |
|
68 |
|
69 void retrieveSongDetails( int index ); |
|
70 |
|
71 void savePath( QByteArray &data ); |
|
72 void restorePath( const QByteArray &data ); |
|
73 |
|
74 signals: |
|
75 |
|
76 void collectionPlaylistOpened(); |
|
77 void playlistSaved( bool success ); |
|
78 void deleteStarted(TCollectionContext context, int Count); |
|
79 void songsDeleted( bool success ); |
|
80 void playlistsRenamed( bool success ); |
|
81 void aboutToAddSongs( int count ); |
|
82 |
|
83 void isolatedCollectionOpened( MpMpxCollectionData* collectionData ); |
|
84 |
|
85 void containerContentsChanged(); |
|
86 void restorePathFailed(); |
|
87 }; |
|
88 |
|
89 #endif // MPMPXCOLLECTIONFRAMEWORKWRAPPER_H |