example/MusicLyricsPlugin/MusicLyricsPlugin.h
author cgandhi
Mon, 11 Oct 2010 21:59:54 +0530
changeset 26 83d6a149c755
parent 23 574948b60dab
permissions -rw-r--r--
Submitting following changes - AuthApps for Last.fm and Twitter added API for checking ServiceAuthorization added for SMFCredMgrClient API added for forcefully removing credential details from SMFCredMgr Extra argument checks in SMfClient APIs APIs for service login and logout from SMFClient Redundant members removed from SmfServerSymbian DSM bug fixes Test Apps included
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
     1
/*
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
     2
 * MusicLyricsPlugin.h
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
     3
 *
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
     4
 *  Created on: Aug 18, 2010
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
     5
 *      Author: sanpra
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
     6
 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
     7
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
     8
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
     9
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    10
#ifndef MUSICLYRICSPLUGIN_H_
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    11
#define MUSICLYRICSPLUGIN_H_
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    12
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    13
// Include files
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    14
#include "smflyricsserviceplugin.h"
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    15
#include "smfpluginutil.h"
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    16
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    17
#include <parser.h>
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    18
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    19
// Forward declarations
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    20
class MusicProviderBase;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    21
class QVariant;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    22
class QNetworkReply;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    23
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    24
// Class declaration
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    25
class MusicLyricsPlugin : public QObject, public SmfLyricsServicePlugin
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    26
{
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    27
	Q_OBJECT
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    28
	Q_INTERFACES( SmfLyricsServicePlugin SmfPluginBase )
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    29
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    30
public:
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    31
	virtual ~MusicLyricsPlugin();
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    32
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    33
public: // From SmfMusicEventsPlugin
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    34
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    35
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    36
		 * Method to get the lyrics
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    37
		 * @param aRequest [out] The request data to be sent to network
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    38
		 * @param aTrack The track whose lyrics need to be fetched
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    39
		 * @param aPageNum The page to be extracted
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    40
		 * @param aItemsPerPage Number of items per page
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    41
		 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    42
		 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    43
		 SmfPluginError lyrics( SmfPluginRequestData &aRequest, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    44
				const SmfTrackInfo &aTrack,
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    45
				const int aPageNum = SMF_FIRST_PAGE, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    46
				const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) ;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    47
		
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    48
		/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    49
		 * Method to get the subtitle
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    50
		 * @param aRequest [out] The request data to be sent to network
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    51
		 * @param aTrack The track whose subtitle need to be fetched
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    52
		 * @param aFilter The subtitle search filter if any
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    53
		 * @param aPageNum The page to be extracted
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    54
		 * @param aItemsPerPage Number of items per page
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    55
		 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    56
		 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    57
		 SmfPluginError subtitles( SmfPluginRequestData &aRequest, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    58
				const SmfTrackInfo &aTrack,
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    59
				const SmfSubtitleSearchFilter &aFilter = SubtitleAll,
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    60
				const int aPageNum = SMF_FIRST_PAGE, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    61
				const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) ;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    62
		/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    63
		 * Customised method for SmfMusicEventsPlugin interface
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    64
		 * @param aRequest [out] The request data to be sent to network
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    65
		 * @param aOperation The operation type (should be known between 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    66
		 * the client interface and the plugin)
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    67
		 * @param aData The data required to form the request (The type 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    68
		 * of data should be known between client and the plugin)
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    69
		 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    70
		 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    71
		SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    72
				const int &aOperation, QByteArray *aData );
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    73
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    74
public: // From SmfPluginBase
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    75
	     /**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    76
	     * The first method to be called in the plugin that implements this interface.
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    77
	     * If this method is not called, plugin may not behave as expected.
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    78
	     * Plugins are expected to save the aUtil handle and use and when required.
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    79
	     * @param aUtil The instance of SmfPluginUtil
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    80
	     */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    81
	     void initialize(/*SmfPluginUtil *aUtil*/);
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    82
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    83
	    /**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    84
	     * Method to get the provider information
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    85
	     * @return Instance of SmfProviderBase
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    86
	     */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    87
	    SmfProviderBase* getProviderInfo( );
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    88
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    89
	   /**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    90
	    * Method to get the result for a network request.
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    91
	    * @param aTransportResult The result of transport operation
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    92
	    * @param aReply The QNetworkReply instance for the request
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    93
	    * @param aResult [out] An output parameter to the plugin manager.If the 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    94
	    * return value is SmfSendRequestAgain, QVariant will be of type 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    95
	    * SmfPluginRequestData.
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    96
	    * For SmfGalleryPlugin: If last operation was pictures(), aResult will 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    97
	    * be of type QList<SmfPicture>. If last operation was description(), 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    98
	    * aResult will be of type QString. If last operation was upload() or 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
    99
	    * postComment(), aResult will be of type bool.
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   100
	    * @param aRetType [out] SmfPluginRetType
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   101
	    * @param aPageResult [out] The SmfResultPage structure variable
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   102
	    */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   103
        /*	SmfPluginError responseAvailable( 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   104
			const SmfTransportResult &aTransportResult, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   105
			QNetworkReply *aReply, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   106
			QVariant* aResult, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   107
			SmfPluginRetType &aRetType,
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   108
			SmfResultPage &aPageResult );*/
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   109
        SmfPluginError responseAvailable( 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   110
			const SmfRequestTypeID aOperation,
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   111
			const SmfTransportResult &aTransportResult, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   112
			QByteArray *aResponse, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   113
			QVariant* aResult, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   114
			SmfPluginRetType &aRetType,
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   115
			SmfResultPage &aPageResult );
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   116
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   117
	     void writeLog(QString log) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   118
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   119
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   120
private:
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   121
    
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   122
      QString generateSignature(const QString aBaseString);
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   123
    
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   124
    
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   125
private slots:
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   126
   
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   127
    
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   128
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   129
private:
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   130
	  /**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   131
	   * Method called by plugins to generate a request data
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   132
	   * @param aRequest [out] The request data to be sent to network
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   133
	   * @param aOperation The type of http operation
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   134
	   * @param aSignatureMethod The signature method to be used
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   135
	   * @param aParams A map of parameters to its values
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   136
	   * @param aMode The mode of creation of the request
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   137
	   * @param aPostData The data to be posted (for HTTP POST 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   138
	   * only, else it will be NULL)
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   139
	   * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   140
	   */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   141
	   SmfPluginError createRequest( SmfPluginRequestData &aRequest,const QNetworkAccessManager::Operation aOperation, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   142
			const SmfSignatureMethod aSignatureMethod, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   143
			QMultiMap<QByteArray, QByteArray> &aParams, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   144
			const SmfParsingMode aMode,
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   145
			QBuffer *aPostData );
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   146
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   147
private:
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   148
	   MusicProviderBase *m_provider;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   149
	   SmfPluginUtil *m_util;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   150
};
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   151
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   152
// Class declaration
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   153
class MusicProviderBase : public QObject, public SmfProviderBase
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   154
	{
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   155
	 Q_OBJECT
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   156
	 Q_INTERFACES( SmfProviderBase )
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   157
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   158
public:
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   159
	virtual ~MusicProviderBase( );
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   160
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   161
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   162
	 * Method to get the Localisable name of the service.
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   163
	 * @return The Localisable name of the service.
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   164
	 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   165
	QString serviceName( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   166
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   167
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   168
	 * Method to get the Logo of the service
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   169
	 * @return The Logo of the service
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   170
	 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   171
	QImage serviceIcon( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   172
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   173
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   174
	 * Method to get the Readable service description
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   175
	 * @return The Readable service description
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   176
	 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   177
	QString description( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   178
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   179
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   180
	 * Method to get the Website of the service
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   181
	 * @return The Website of the service
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   182
	 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   183
	QUrl serviceUrl( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   184
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   185
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   186
	 * Method to get the URL of the Application providing this service
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   187
	 * @return The URL of the Application providing this service
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   188
	 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   189
	QUrl applicationUrl( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   190
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   191
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   192
	 * Method to get the Icon of the application
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   193
	 * @return The Icon of the application
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   194
	 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   195
	QImage applicationIcon( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   196
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   197
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   198
	* Method to get the list of interfaces that this provider support
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   199
	* @return List of supported Interafces
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   200
	*/
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   201
	QList<QString> supportedInterfaces( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   202
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   203
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   204
	* Method to get the list of languages supported by this service provider
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   205
	* @return a QStringList of languages supported by this service 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   206
	* provider in 2 letter ISO 639-1 format.
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   207
	*/
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   208
	QStringList supportedLanguages( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   209
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   210
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   211
	 * Method to get the Plugin specific ID
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   212
	 * @return The Plugin specific ID
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   213
	 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   214
	QString pluginId( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   215
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   216
	/**
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   217
	 * Method to get the ID of the authentication application 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   218
	 * for this service
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   219
	 * @param aProgram The authentication application name
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   220
	 * @param aArguments List of arguments required for authentication app
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   221
	 * @param aMode Strting mode for authentication application
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   222
	 * @return The ID of the authentication application 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   223
	 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   224
	QString authenticationApp( QString &aProgram, QStringList & aArguments, 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   225
			QIODevice::OpenModeFlag aMode = QIODevice::ReadWrite ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   226
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   227
	/**
26
83d6a149c755 Submitting following changes -
cgandhi
parents: 23
diff changeset
   228
	 * Method to get the authentication application process name
83d6a149c755 Submitting following changes -
cgandhi
parents: 23
diff changeset
   229
	 * @return The authentication application process name (eg: "FlickrAuthApp.exe")
83d6a149c755 Submitting following changes -
cgandhi
parents: 23
diff changeset
   230
	 */
83d6a149c755 Submitting following changes -
cgandhi
parents: 23
diff changeset
   231
	QString authenticationAppName( ) const;
83d6a149c755 Submitting following changes -
cgandhi
parents: 23
diff changeset
   232
	
83d6a149c755 Submitting following changes -
cgandhi
parents: 23
diff changeset
   233
	/**
23
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   234
	 * Method to get the unique registration ID provided by the 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   235
	 * Smf for authorised plugins
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   236
	 * @return The unique registration ID/token provided by the Smf for 
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   237
	 * authorised plugins
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   238
	 */
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   239
	QString smfRegistrationId( ) const;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   240
	
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   241
private:
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   242
	friend class MusicLyricsPlugin;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   243
	void initialize();
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   244
	QString m_serviceName;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   245
	QImage m_serviceIcon;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   246
	QString m_description;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   247
	QUrl m_serviceUrl;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   248
	QUrl m_applicationUrl;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   249
	QImage m_applicationIcon;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   250
	QStringList m_serviceType;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   251
	QStringList m_supportedLanguages;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   252
	QString m_pluginId;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   253
	QString m_authAppId;
26
83d6a149c755 Submitting following changes -
cgandhi
parents: 23
diff changeset
   254
	QString m_authAppName;
23
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   255
	QString m_smfRegToken;
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   256
	};
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   257
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   258
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   259
574948b60dab updating the lastfm music plugins and adding the smfhelp.chm
cgandhi
parents:
diff changeset
   260
#endif /* MUSICLYRICSPLUGIN_H_ */