smf/inc/smfplugins/smfmusic/smfplaylistserviceplugin.h
changeset 3 0446eb7b28aa
child 5 edb9dc8273d9
equal deleted inserted replaced
2:86af6c333601 3:0446eb7b28aa
       
     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  * Interface specification for playlists service
       
    17  *
       
    18  */
       
    19 
       
    20 
       
    21 #ifndef SMFPLAYLISTSERVICEPLUGIN_H_
       
    22 #define SMFPLAYLISTSERVICEPLUGIN_H_
       
    23 
       
    24 #include <smfpluginbase.h>
       
    25 #include <smfplaylist.h>
       
    26 #include <smfmusicprofile.h>
       
    27 #include <smftrackinfo.h>
       
    28 
       
    29 // Forward declaration
       
    30 class SmfPluginManagerUtil;
       
    31 
       
    32 /**
       
    33  * @ingroup smf_plugin_group
       
    34  * Interface specification for playlists service. This class provides 
       
    35  * basic functionality to allow applications to get playlists of a user, 
       
    36  * add some track to an existing playlist, post the current playing 
       
    37  * playlists etc.
       
    38  *
       
    39  * All of the functionality described here should be implemented by a service
       
    40  * specific plug-in.
       
    41  */
       
    42 class SmfPlaylistServicePlugin : public SmfPluginBase
       
    43 	{
       
    44 	Q_OBJECT
       
    45 public:
       
    46 	/**
       
    47 	 * Constructor with default argument
       
    48 	 * @param aUtil The SmfPluginManagerUtil instance. The plugins can 
       
    49 	 * call the method getAuthKeys() of this class, with its pluginID to 
       
    50 	 * get the OAuth keys, keys are returned only if this plugin is 
       
    51 	 * authorised by Smf franework
       
    52 	 */
       
    53 	SmfPlaylistServicePlugin( SmfPluginManagerUtil *aUtil );
       
    54 	
       
    55 	/**
       
    56 	 * Destructor
       
    57 	 */
       
    58 	~SmfPlaylistServicePlugin( );
       
    59 	
       
    60 	/**
       
    61 	 * Method to get the playlist
       
    62 	 * @param aRequest [out] The request data to be sent to network
       
    63 	 * @param aPageNum The page to be extracted
       
    64 	 * @param aItemsPerPage Number of items per page
       
    65 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    66 	 */
       
    67 	virtual SmfPluginError playlists( SmfPluginRequestData &aRequest,
       
    68 			const int aPageNum = SMF_FIRST_PAGE, 
       
    69 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    70 	
       
    71 	/**
       
    72 	 * Method to get the playlist of a particular user
       
    73 	 * @param aRequest [out] The request data to be sent to network
       
    74 	 * @param aUser The user whose playlists need to be fetched
       
    75 	 * @param aPageNum The page to be extracted
       
    76 	 * @param aItemsPerPage Number of items per page
       
    77 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    78 	 */
       
    79 	virtual SmfPluginError playlistsOf( SmfPluginRequestData &aRequest,
       
    80 			const SmfMusicProfile &aUser,
       
    81 			const int aPageNum = SMF_FIRST_PAGE, 
       
    82 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    83 	
       
    84 	/**
       
    85 	 * Method to add tracks to a playlist
       
    86 	 * @param aRequest [out] The request data to be sent to network
       
    87 	 * @param aPlaylist The playlist where tracks should be added
       
    88 	 * @param aTracks The tracks to be added to the playlist
       
    89 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    90 	 */
       
    91 	virtual SmfPluginError addToPlaylist( SmfPluginRequestData &aRequest,
       
    92 			const SmfPlaylist &aPlaylist, 
       
    93 			const QList<SmfTrackInfo> &aTracks ) = 0;
       
    94 	
       
    95 	/**
       
    96 	 * Method to post the current playing playlist
       
    97 	 * @param aRequest [out] The request data to be sent to network
       
    98 	 * @param aPlaylist The current playing playlist which should be posted
       
    99 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
   100 	 */
       
   101 	virtual SmfPluginError postCurrentPlayingPlaylist(
       
   102 			SmfPluginRequestData &aRequest, 
       
   103 			const SmfPlaylist &aPlaylist ) = 0;
       
   104 	
       
   105 	};
       
   106 
       
   107 Q_DECLARE_INTERFACE( SmfPlaylistServicePlugin, "org.symbian.smf.plugin.music.playlist/v1.0" );
       
   108 
       
   109 #endif /* SMFPLAYLISTSERVICEPLUGIN_H_ */