mpengine/tsrc/unittest_mpengine/stub/src/mpmpxcollectionframeworkwrapper.cpp
changeset 48 af3740e3753f
child 55 f3930dda3342
equal deleted inserted replaced
42:79c49924ae23 48:af3740e3753f
       
     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 #include "mpmpxcollectionframeworkwrapper.h"
       
    19 #include "mpmpxcollectiondata.h"
       
    20  
       
    21 /*!
       
    22  Constructs the utility wrapper.
       
    23  */
       
    24 MpMpxCollectionFrameworkWrapper::MpMpxCollectionFrameworkWrapper( TUid hostUid, MpSongData *songData, QObject *parent )
       
    25     : QObject( parent )
       
    26 {
       
    27     Q_UNUSED(hostUid);
       
    28     Q_UNUSED(songData);
       
    29 }
       
    30 
       
    31 /*!
       
    32  Destructs the utility wrapper.
       
    33  */
       
    34 MpMpxCollectionFrameworkWrapper::~MpMpxCollectionFrameworkWrapper()
       
    35 {
       
    36 
       
    37 }
       
    38 
       
    39 /*!
       
    40  Opens the collection for the given \a context.
       
    41 
       
    42  \sa collectionOpened()
       
    43  */
       
    44 void MpMpxCollectionFrameworkWrapper::openCollection( TCollectionContext context )
       
    45 {
       
    46     Q_UNUSED(context);
       
    47 }
       
    48 
       
    49 /*!
       
    50  Opens the collection at a specific \a index.
       
    51 
       
    52  \sa collectionOpened(), playlistOpened()
       
    53  */
       
    54 void MpMpxCollectionFrameworkWrapper::openCollectionItem( int index )
       
    55 {
       
    56     Q_UNUSED(index);
       
    57 }
       
    58 
       
    59 /*!
       
    60  Navigates back to the container of the current items.
       
    61 
       
    62  \sa collectionOpened()
       
    63  */
       
    64 void MpMpxCollectionFrameworkWrapper::back()
       
    65 {
       
    66 
       
    67 }
       
    68 
       
    69 /*!
       
    70  Loads the user created \a playLists.
       
    71 
       
    72  */
       
    73 void MpMpxCollectionFrameworkWrapper::findPlaylists( QStringList &playlists )
       
    74 {
       
    75     Q_UNUSED(playlists);
       
    76 }
       
    77 
       
    78 /*!
       
    79  Creates a new playlist with name \a playlistName and adds \a selection and optionally uses \a collectionData.
       
    80  */
       
    81 void MpMpxCollectionFrameworkWrapper::createPlaylist( QString &playlistName, QList<int> &selection, MpMpxCollectionData* collectionData )
       
    82 {
       
    83     Q_UNUSED(playlistName);
       
    84     Q_UNUSED(selection);
       
    85     Q_UNUSED(collectionData);
       
    86 }
       
    87 
       
    88 /*!
       
    89  Adds \a selection to the playlist specified in \a playlistIndex.
       
    90  */
       
    91 void MpMpxCollectionFrameworkWrapper::saveToPlaylist( int playlistIndex, QList<int> &selection )
       
    92 {
       
    93     Q_UNUSED(playlistIndex);
       
    94     Q_UNUSED(selection);
       
    95 }
       
    96 
       
    97 /*!
       
    98  Rename a playlist by \a index with \a name.
       
    99  */
       
   100 void MpMpxCollectionFrameworkWrapper::renamePlaylist( QString &newName, int index )
       
   101 {
       
   102     Q_UNUSED(newName);
       
   103     Q_UNUSED(index);
       
   104 }
       
   105 
       
   106 /*!
       
   107  Adds \a selection to the current playlist from the specified \a collectionData.
       
   108  */
       
   109 void MpMpxCollectionFrameworkWrapper::saveToCurrentPlaylist( QList<int> &selection, MpMpxCollectionData *collectionData )
       
   110 {
       
   111     Q_UNUSED(selection);
       
   112     Q_UNUSED(collectionData);
       
   113 }
       
   114 
       
   115 /*!
       
   116  Rename a playlist with \a name.
       
   117  */
       
   118 void MpMpxCollectionFrameworkWrapper::renamePlaylist( QString &newName )
       
   119 {
       
   120     Q_UNUSED(newName);
       
   121 }
       
   122 
       
   123 /*!
       
   124  Deletes \a selection from the collection.
       
   125  */
       
   126 void MpMpxCollectionFrameworkWrapper::deleteSongs( QList<int> &selection )
       
   127 {
       
   128     Q_UNUSED(selection);
       
   129 }
       
   130 
       
   131 /*!
       
   132  Sets the suffle according to \a active.
       
   133  */
       
   134 void MpMpxCollectionFrameworkWrapper::setShuffle( bool active )
       
   135 {
       
   136     Q_UNUSED(active);
       
   137 }
       
   138 
       
   139 /*!
       
   140  Initiate a playback preview for the selected item.
       
   141  */
       
   142 void MpMpxCollectionFrameworkWrapper::previewItem( int index )
       
   143 {
       
   144     Q_UNUSED(index);
       
   145 }
       
   146 
       
   147 
       
   148 /*!
       
   149  Opens the an isolated collection with \a context.
       
   150  \sa isolatedCollectionOpened()
       
   151  */
       
   152 void MpMpxCollectionFrameworkWrapper::openIsolatedCollection( TCollectionContext context )
       
   153 {
       
   154     Q_UNUSED(context);
       
   155 }
       
   156 
       
   157 /*!
       
   158  Releases the resources used for the isolated collection.
       
   159  */
       
   160 void MpMpxCollectionFrameworkWrapper::releaseIsolatedCollection()
       
   161 {
       
   162 
       
   163 }
       
   164 
       
   165 /*!
       
   166  Finds all songs beloging to the album specified by the \a index.
       
   167  */
       
   168 void MpMpxCollectionFrameworkWrapper::findAlbumSongs( int index )
       
   169 {
       
   170     Q_UNUSED(index);
       
   171 }
       
   172 
       
   173 /*!
       
   174  Plays album with \a albumIndex starting with the songs with \a songIndex.
       
   175 */
       
   176 void MpMpxCollectionFrameworkWrapper::playAlbumSongs( int albumIndex, int songIndex, MpMpxCollectionData* collectionData  )
       
   177 {
       
   178     Q_UNUSED(albumIndex);
       
   179     Q_UNUSED(songIndex);
       
   180     Q_UNUSED(collectionData);
       
   181 }
       
   182 
       
   183 /*!
       
   184  Returns pointer to MpMpxCollectionData, which is the collection data.
       
   185  */
       
   186 MpMpxCollectionData *MpMpxCollectionFrameworkWrapper::collectionData()
       
   187 {
       
   188     MpMpxCollectionData *data = new MpMpxCollectionData();
       
   189     return data;
       
   190 }
       
   191 
       
   192 /*!
       
   193  Called from an engine slot to reopen the collection in its current state.
       
   194 
       
   195  \sa collectionOpened()
       
   196  */
       
   197 void MpMpxCollectionFrameworkWrapper::reopenCollection()
       
   198 {
       
   199 
       
   200 }
       
   201 
       
   202 /*!
       
   203  Called from an engine slot to request a reorder operation , indicates that 
       
   204  the item with \a playlistId , \a songId is to be moved from 
       
   205  \a originalOrdinal to \a newOrdinal.
       
   206  */
       
   207 void MpMpxCollectionFrameworkWrapper::reorderPlaylist( int playlistId, int songId, int originalOrdinal, int newOrdinal )
       
   208 {
       
   209     Q_UNUSED(playlistId);
       
   210     Q_UNUSED(songId);
       
   211     Q_UNUSED(originalOrdinal);
       
   212     Q_UNUSED(newOrdinal);
       
   213 }
       
   214 
       
   215 /*!
       
   216   Called to set the repeat feature to \a enable
       
   217  */
       
   218 void MpMpxCollectionFrameworkWrapper::setRepeatFeatureEnabled( bool enable ) 
       
   219 {
       
   220     Q_UNUSED(enable);
       
   221 }
       
   222 
       
   223 /*!
       
   224  Called to set the shuffle feature to \a enable
       
   225  */
       
   226 void MpMpxCollectionFrameworkWrapper::setShuffleFeatureEnabled( bool enable )
       
   227 {
       
   228     Q_UNUSED(enable);
       
   229 }
       
   230 
       
   231 /*!
       
   232  Called to open all songs path and trigger shuffle all songs play
       
   233  */
       
   234 void MpMpxCollectionFrameworkWrapper::openShuffleAllSongsPath()
       
   235 {
       
   236 
       
   237 }
       
   238 
       
   239 /*!
       
   240  Retrieves song details for the specified \a index.
       
   241  */
       
   242 void MpMpxCollectionFrameworkWrapper::retrieveSongDetails( int index )
       
   243 {
       
   244     Q_UNUSED(index);
       
   245 }
       
   246 
       
   247 /*!
       
   248  Called to save playback data used for publishing activity (i.e. restore path) 
       
   249  */
       
   250 void  MpMpxCollectionFrameworkWrapper::savePath( QByteArray &data )
       
   251 {
       
   252     Q_UNUSED(data);
       
   253 }
       
   254 
       
   255 /*!
       
   256  Called to load playback data used from returning activity (i.e. restore path) 
       
   257  */
       
   258 void MpMpxCollectionFrameworkWrapper::restorePath( const QByteArray &data ) 
       
   259 {
       
   260     Q_UNUSED(data);
       
   261 }
       
   262 /*!
       
   263  Cancels CollectionUiHelper request.
       
   264  */
       
   265 void MpMpxCollectionFrameworkWrapper::cancelRequest()
       
   266 {
       
   267 }
       
   268 
       
   269 //EOF