smf/inc/smfplugins/smfmusic/smfplaylistserviceplugin.h
author cgandhi <chandradeep.gandhi@sasken.com>
Thu, 15 Apr 2010 15:35:36 +0530
changeset 3 0446eb7b28aa
child 5 edb9dc8273d9
permissions -rw-r--r--
Updating the sample plugin and other related changes for clients and plugins
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     1
/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     2
 * Copyright (c) 2010 Sasken Communication Technologies Ltd. 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     3
 * All rights reserved.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     4
 * This component and the accompanying materials are made available 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     5
 * under the terms of the "Eclipse Public License v1.0"
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     6
 * which accompanies  this distribution, and is available 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html"
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     8
 * 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     9
 * Initial Contributors:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    10
 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    11
 *
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    12
 * Contributors:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    13
 * Manasij Roy, Nalina Hariharan
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    14
 * 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    15
 * Description:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    16
 * Interface specification for playlists service
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    17
 *
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    18
 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    19
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    20
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    21
#ifndef SMFPLAYLISTSERVICEPLUGIN_H_
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    22
#define SMFPLAYLISTSERVICEPLUGIN_H_
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    23
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    24
#include <smfpluginbase.h>
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    25
#include <smfplaylist.h>
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    26
#include <smfmusicprofile.h>
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    27
#include <smftrackinfo.h>
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    28
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    29
// Forward declaration
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    30
class SmfPluginManagerUtil;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    31
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    32
/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    33
 * @ingroup smf_plugin_group
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    34
 * Interface specification for playlists service. This class provides 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    35
 * basic functionality to allow applications to get playlists of a user, 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    36
 * add some track to an existing playlist, post the current playing 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    37
 * playlists etc.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    38
 *
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    39
 * All of the functionality described here should be implemented by a service
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    40
 * specific plug-in.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    41
 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    42
class SmfPlaylistServicePlugin : public SmfPluginBase
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    43
	{
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    44
	Q_OBJECT
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    45
public:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    46
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    47
	 * Constructor with default argument
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    48
	 * @param aUtil The SmfPluginManagerUtil instance. The plugins can 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    49
	 * call the method getAuthKeys() of this class, with its pluginID to 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    50
	 * get the OAuth keys, keys are returned only if this plugin is 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    51
	 * authorised by Smf franework
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    52
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    53
	SmfPlaylistServicePlugin( SmfPluginManagerUtil *aUtil );
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    54
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    55
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    56
	 * Destructor
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    57
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    58
	~SmfPlaylistServicePlugin( );
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    59
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    60
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    61
	 * Method to get the playlist
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    62
	 * @param aRequest [out] The request data to be sent to network
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    63
	 * @param aPageNum The page to be extracted
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    64
	 * @param aItemsPerPage Number of items per page
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    65
	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    66
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    67
	virtual SmfPluginError playlists( SmfPluginRequestData &aRequest,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    68
			const int aPageNum = SMF_FIRST_PAGE, 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    69
			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    70
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    71
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    72
	 * Method to get the playlist of a particular user
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    73
	 * @param aRequest [out] The request data to be sent to network
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    74
	 * @param aUser The user whose playlists need to be fetched
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    75
	 * @param aPageNum The page to be extracted
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    76
	 * @param aItemsPerPage Number of items per page
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    77
	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    78
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    79
	virtual SmfPluginError playlistsOf( SmfPluginRequestData &aRequest,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    80
			const SmfMusicProfile &aUser,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    81
			const int aPageNum = SMF_FIRST_PAGE, 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    82
			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    83
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    84
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    85
	 * Method to add tracks to a playlist
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    86
	 * @param aRequest [out] The request data to be sent to network
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    87
	 * @param aPlaylist The playlist where tracks should be added
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    88
	 * @param aTracks The tracks to be added to the playlist
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    89
	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    90
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    91
	virtual SmfPluginError addToPlaylist( SmfPluginRequestData &aRequest,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    92
			const SmfPlaylist &aPlaylist, 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    93
			const QList<SmfTrackInfo> &aTracks ) = 0;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    94
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    95
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    96
	 * Method to post the current playing playlist
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    97
	 * @param aRequest [out] The request data to be sent to network
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    98
	 * @param aPlaylist The current playing playlist which should be posted
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    99
	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   100
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   101
	virtual SmfPluginError postCurrentPlayingPlaylist(
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   102
			SmfPluginRequestData &aRequest, 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   103
			const SmfPlaylist &aPlaylist ) = 0;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   104
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   105
	};
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   106
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   107
Q_DECLARE_INTERFACE( SmfPlaylistServicePlugin, "org.symbian.smf.plugin.music.playlist/v1.0" );
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   108
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   109
#endif /* SMFPLAYLISTSERVICEPLUGIN_H_ */