smf/smfservermodule/smfserver/smfplugins/smfplaylistserviceplugin.h
changeset 7 be09cf1f39dd
equal deleted inserted replaced
6:c39a6cfd1fb9 7:be09cf1f39dd
       
     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 /**
       
    30  * @ingroup smf_plugin_group
       
    31  * Interface specification for playlists service. This class provides 
       
    32  * basic functionality to allow applications to get playlists of a user, 
       
    33  * add some track to an existing playlist, post the current playing 
       
    34  * playlists etc.
       
    35  *
       
    36  * All of the functionality described here should be implemented by a service
       
    37  * specific plug-in.
       
    38  */
       
    39 class SmfPlaylistServicePlugin : public SmfPluginBase
       
    40 	{
       
    41 public:
       
    42 	/**
       
    43 	 * Destructor
       
    44 	 */
       
    45 	virtual ~SmfPlaylistServicePlugin( ) {}
       
    46 	
       
    47 	/**
       
    48 	 * Method to get the playlist
       
    49 	 * @param aRequest [out] The request data to be sent to network
       
    50 	 * @param aPageNum The page to be extracted
       
    51 	 * @param aItemsPerPage Number of items per page
       
    52 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    53 	 */
       
    54 	virtual SmfPluginError playlists( SmfPluginRequestData &aRequest,
       
    55 			const int aPageNum = SMF_FIRST_PAGE, 
       
    56 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    57 	
       
    58 	/**
       
    59 	 * Method to get the playlist of a particular user
       
    60 	 * @param aRequest [out] The request data to be sent to network
       
    61 	 * @param aUser The user whose playlists need to be fetched
       
    62 	 * @param aPageNum The page to be extracted
       
    63 	 * @param aItemsPerPage Number of items per page
       
    64 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    65 	 */
       
    66 	virtual SmfPluginError playlistsOf( SmfPluginRequestData &aRequest,
       
    67 			const SmfMusicProfile &aUser,
       
    68 			const int aPageNum = SMF_FIRST_PAGE, 
       
    69 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    70 	
       
    71 	/**
       
    72 	 * Method to add tracks to a playlist
       
    73 	 * @param aRequest [out] The request data to be sent to network
       
    74 	 * @param aPlaylist The playlist where tracks should be added
       
    75 	 * @param aTracks The tracks to be added to the playlist
       
    76 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    77 	 */
       
    78 	virtual SmfPluginError addToPlaylist( SmfPluginRequestData &aRequest,
       
    79 			const SmfPlaylist &aPlaylist, 
       
    80 			const QList<SmfTrackInfo> &aTracks ) = 0;
       
    81 	
       
    82 	/**
       
    83 	 * Method to post the current playing playlist
       
    84 	 * @param aRequest [out] The request data to be sent to network
       
    85 	 * @param aPlaylist The current playing playlist which should be posted
       
    86 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    87 	 */
       
    88 	virtual SmfPluginError postCurrentPlayingPlaylist(
       
    89 			SmfPluginRequestData &aRequest, 
       
    90 			const SmfPlaylist &aPlaylist ) = 0;
       
    91 	
       
    92 	/**
       
    93 	 * Customised method for SmfPlaylistServicePlugin interface
       
    94 	 * @param aRequest [out] The request data to be sent to network
       
    95 	 * @param aOperation The operation type (should be known between 
       
    96 	 * the client interface and the plugin)
       
    97 	 * @param aData The data required to form the request (The type 
       
    98 	 * of data should be known between client and the plugin)
       
    99 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
   100 	 */
       
   101 	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
       
   102 			const int &aOperation, QByteArray *aData ) = 0;
       
   103 	
       
   104 	};
       
   105 
       
   106 Q_DECLARE_INTERFACE( SmfPlaylistServicePlugin, "org.symbian.smf.plugin.music.playlist/v1.0" );
       
   107 
       
   108 #endif /* SMFPLAYLISTSERVICEPLUGIN_H_ */