example/clientapi/smf/inc/smfplugins/smfmusic/smfplaylistserviceplugin.h
changeset 3 0446eb7b28aa
parent 2 86af6c333601
child 4 969092730d34
equal deleted inserted replaced
2:86af6c333601 3:0446eb7b28aa
     1 /**
       
     2  * @file	smfplaylistserviceplugin.h
       
     3  * @author  Nalina Hariharan, Sasken Communication Technologies Ltd - Initial contribution
       
     4  * @version 1.0
       
     5  *
       
     6  * @section LICENSE
       
     7  *
       
     8  * Copyright (c) 2010 Sasken Communication Technologies Ltd. 
       
     9  * All rights reserved.
       
    10  * This component and the accompanying materials are made available 
       
    11  * under the terms of the "Eclipse Public License v1.0"
       
    12  * which accompanies  this distribution, and is available 
       
    13  * at the URL "http://www.eclipse.org/legal/epl-v10.html"
       
    14  * 
       
    15  * @section DESCRIPTION
       
    16  *
       
    17  * Interface specification for playlists service
       
    18  */
       
    19 
       
    20 #ifndef SMFPLAYLISTSERVICEPLUGIN_H_
       
    21 #define SMFPLAYLISTSERVICEPLUGIN_H_
       
    22 
       
    23 #include <smfpluginbase.h>
       
    24 #include <smfplaylist.h>
       
    25 #include <smfmusicprofile.h>
       
    26 #include <smftrackinfo.h>
       
    27 
       
    28 /**
       
    29  * @ingroup smf_plugin_group
       
    30  * Interface specification for playlists service. This class provides 
       
    31  * basic functionality to allow applications to get playlists of a user, 
       
    32  * add some track to an existing playlist, post the current playing 
       
    33  * playlists etc.
       
    34  *
       
    35  * All of the functionality described here should be implemented by a service
       
    36  * specific plug-in.
       
    37  */
       
    38 class SmfPlaylistServicePlugin : public SmfPluginBase
       
    39 	{
       
    40 	Q_OBJECT
       
    41 public:
       
    42 	/**
       
    43 	 * Constructor with default argument
       
    44 	 * @param aParent The parent object
       
    45 	 */
       
    46 	SmfPlaylistServicePlugin( QObject *aParent = 0 );
       
    47 	
       
    48 	/**
       
    49 	 * Destructor
       
    50 	 */
       
    51 	~SmfPlaylistServicePlugin( );
       
    52 	
       
    53 	/**
       
    54 	 * Method to get the playlist
       
    55 	 * @param aRequest [out] The request data to be sent to network
       
    56 	 * @param aPageNum The page to be extracted
       
    57 	 * @param aItemsPerPage Number of items per page
       
    58 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    59 	 */
       
    60 	virtual SmfPluginError playlists( SmfPluginRequestData *aRequest,
       
    61 			const int aPageNum = SMF_FIRST_PAGE, 
       
    62 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    63 	
       
    64 	/**
       
    65 	 * Method to get the playlist of a particular user
       
    66 	 * @param aRequest [out] The request data to be sent to network
       
    67 	 * @param aUser The user whose playlists need to be fetched
       
    68 	 * @param aPageNum The page to be extracted
       
    69 	 * @param aItemsPerPage Number of items per page
       
    70 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    71 	 */
       
    72 	virtual SmfPluginError playlistsOf( SmfPluginRequestData *aRequest,
       
    73 			const SmfMusicProfile aUser,
       
    74 			const int aPageNum = SMF_FIRST_PAGE, 
       
    75 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    76 	
       
    77 	/**
       
    78 	 * Method to add tracks to a playlist
       
    79 	 * @param aRequest [out] The request data to be sent to network
       
    80 	 * @param aPlaylist The playlist where tracks should be added
       
    81 	 * @param aTracks The tracks to be added to the playlist
       
    82 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    83 	 */
       
    84 	virtual SmfPluginError addToPlaylist( SmfPluginRequestData *aRequest,
       
    85 			const SmfPlaylist aPlaylist, 
       
    86 			const QList<SmfTrackInfo> aTracks ) = 0;
       
    87 	
       
    88 	/**
       
    89 	 * Method to post the current playing playlist
       
    90 	 * @param aRequest [out] The request data to be sent to network
       
    91 	 * @param aPlaylist The current playing playlist which should be posted
       
    92 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    93 	 */
       
    94 	virtual SmfPluginError postCurrentPlayingPlaylist(
       
    95 			SmfPluginRequestData *aRequest, 
       
    96 			const SmfPlaylist aPlaylist ) = 0;
       
    97 	
       
    98 	};
       
    99 
       
   100 Q_DECLARE_INTERFACE( SmfPlaylistServicePlugin, "org.symbian.smf.plugin.music.playlist/v1.0" );
       
   101 
       
   102 #endif /* SMFPLAYLISTSERVICEPLUGIN_H_ */