example/clientapi/smf/inc/smfplugins/smfmusic/smfmusiceventsplugin.h
changeset 2 86af6c333601
parent 1 4b1e636e8a71
equal deleted inserted replaced
1:4b1e636e8a71 2:86af6c333601
     6  * @section LICENSE
     6  * @section LICENSE
     7  *
     7  *
     8  * Copyright (c) 2010 Sasken Communication Technologies Ltd. 
     8  * Copyright (c) 2010 Sasken Communication Technologies Ltd. 
     9  * All rights reserved.
     9  * All rights reserved.
    10  * This component and the accompanying materials are made available 
    10  * This component and the accompanying materials are made available 
    11  * under the terms of the "{License}" 
    11  * under the terms of the "Eclipse Public License v1.0"
    12  * which accompanies  this distribution, and is available 
    12  * which accompanies  this distribution, and is available 
    13  * at the URL "{LicenseUrl}".
    13  * at the URL "http://www.eclipse.org/legal/epl-v10.html"
    14  * 
    14  * 
    15  * @section DESCRIPTION
    15  * @section DESCRIPTION
    16  *
    16  *
    17  * Interface specification for music events
    17  * Interface specification for music events
    18  * 
    18  * 
    20  */
    20  */
    21 
    21 
    22 #ifndef SMFMUSICEVENTSPLUGIN_H_
    22 #ifndef SMFMUSICEVENTSPLUGIN_H_
    23 #define SMFMUSICEVENTSPLUGIN_H_
    23 #define SMFMUSICEVENTSPLUGIN_H_
    24 
    24 
    25 #include <smfproviderbase.h>
    25 #include <smfpluginbase.h>
    26 #include <qtcontacts.h>
    26 #include <qtcontacts.h>
    27 #include <smfevent.h>
    27 #include <smfevent.h>
    28 #include <smfvenue.h>
    28 #include <smfplace.h>
    29 
    29 
    30 using namespace QtMobility;
    30 using namespace QtMobility;
    31 
    31 
    32 /**
    32 /**
       
    33  * @ingroup smf_plugin_group
    33  * Interface specification for music events
    34  * Interface specification for music events
    34  *
    35  *
    35  * All of the functionality described here should be implemented by a service
    36  * All of the functionality described here should be implemented by a service
    36  * specific plug-in.
    37  * specific plug-in.
    37  * 
    38  * 
    38  * Note: This class has dependencies on QtMobility project
    39  * Note: This class has dependencies on QtMobility project
    39  */
    40  */
    40 class SmfMusicEventsPlugin : public QObject
    41 class SmfMusicEventsPlugin : public SmfPluginBase
    41 	{
    42 	{
    42 	Q_OBJECT
    43 	Q_OBJECT
    43 public:
    44 public:
    44 	/**
    45 	/**
    45 	 * Constructor with default argument
    46 	 * Constructor with default argument
    51 	 * Destructor
    52 	 * Destructor
    52 	 */
    53 	 */
    53 	~SmfMusicEventsPlugin( );
    54 	~SmfMusicEventsPlugin( );
    54 	
    55 	
    55 	/**
    56 	/**
    56 	 * Method to get the provider information
       
    57 	 * @return Instance of SmfProviderBase
       
    58 	 */
       
    59 	virtual SmfProviderBase* getProviderInfo( ) = 0;
       
    60 	
       
    61 	/**
       
    62 	 * Method to get the events based on location
    57 	 * Method to get the events based on location
       
    58 	 * @param aRequest [out] The request data to be sent to network
    63 	 * @param aLocation Location of the event
    59 	 * @param aLocation Location of the event
    64 	 * @param aRequest [out] The request data to be sent to network
       
    65 	 * @param aPageNum The page to be extracted
    60 	 * @param aPageNum The page to be extracted
    66 	 * @param aItemsPerPage Number of items per page
    61 	 * @param aItemsPerPage Number of items per page
    67 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    62 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    68 	 */
    63 	 */
    69 	virtual SmfPluginError events( const QtMobility::QContactGeolocation aLocation,
    64 	virtual SmfPluginError events( SmfPluginRequestData *aRequest,
    70 			SmfPluginRequestData *aRequest,
    65 			const QtMobility::QContactGeolocation aLocation,
    71 			const int aPageNum = 0, 
    66 			const int aPageNum = SMF_FIRST_PAGE, 
    72 			const int aItemsPerPage = 10 ) = 0;
    67 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    73 	
    68 	
    74 	/**
    69 	/**
    75 	 * Method to get the venues based on location
    70 	 * Method to get the venues based on location
       
    71 	 * @param aRequest [out] The request data to be sent to network
    76 	 * @param aLocation Location of the venue
    72 	 * @param aLocation Location of the venue
    77 	 * @param aRequest [out] The request data to be sent to network
       
    78 	 * @param aPageNum The page to be extracted
    73 	 * @param aPageNum The page to be extracted
    79 	 * @param aItemsPerPage Number of items per page
    74 	 * @param aItemsPerPage Number of items per page
    80 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    75 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    81 	 */
    76 	 */
    82 	virtual SmfPluginError venues( const QtMobility::QContactGeolocation aLocation,
    77 	virtual SmfPluginError venues( SmfPluginRequestData *aRequest,
    83 			SmfPluginRequestData *aRequest,
    78 			const QtMobility::QContactGeolocation aLocation,
    84 			const int aPageNum = 0, 
    79 			const int aPageNum = SMF_FIRST_PAGE, 
    85 			const int aItemsPerPage = 10 ) = 0;
    80 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    86 	
    81 	
    87 	/**
    82 	/**
    88 	 * Method to get the events based on venues
    83 	 * Method to get the events based on venues
       
    84 	 * @param aRequest [out] The request data to be sent to network
    89 	 * @param aVenue Venue of the event
    85 	 * @param aVenue Venue of the event
    90 	 * @param aRequest [out] The request data to be sent to network
       
    91 	 * @param aPageNum The page to be extracted
    86 	 * @param aPageNum The page to be extracted
    92 	 * @param aItemsPerPage Number of items per page
    87 	 * @param aItemsPerPage Number of items per page
    93 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    88 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    94 	 */
    89 	 */
    95 	virtual SmfPluginError events( const SmfVenue aVenue,
    90 	virtual SmfPluginError events( SmfPluginRequestData *aRequest,
    96 			SmfPluginRequestData *aRequest,
    91 			const SmfPlace aVenue,
    97 			const int aPageNum = 0, 
    92 			const int aPageNum = SMF_FIRST_PAGE, 
    98 			const int aItemsPerPage = 10 ) = 0;
    93 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    99 	
    94 	
   100 	/**
    95 	/**
   101 	 * Method to post events
    96 	 * Method to post events
   102 	 * of posting the events is available
    97 	 * @param aRequest [out] The request data to be sent to network
   103 	 * @param aEventList The list of events to be posted
    98 	 * @param aEventList The list of events to be posted
   104 	 * @param aRequest [out] The request data to be sent to network
       
   105 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    99 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   106 	 */
   100 	 */
   107 	virtual SmfPluginError postEvents( const QList<SmfEvent> aEventList,
   101 	virtual SmfPluginError postEvents( SmfPluginRequestData *aRequest,
   108 			SmfPluginRequestData *aRequest ) = 0;
   102 			const QList<SmfEvent> aEventList ) = 0;
   109 	
       
   110 	
       
   111 	/**
       
   112 	 * Method to get the result for a network request.
       
   113 	 * @param aTransportResult The result of transport operation
       
   114 	 * @param aReply The QNetworkReply instance for the request
       
   115 	 * @param aResult [out] An output parameter to the plugin manager.If the 
       
   116 	 * return value is SmfSendRequestAgain, QVariant will be of type 
       
   117 	 * SmfPluginRequestData. 
       
   118 	 * If last operation was events(), aResult will be of type QList<SmfEvent>
       
   119 	 * If last operation was venues(), aResult will be of type QList<SmfVenue>
       
   120 	 * If last operation was postEvents(), aResult will be of type bool
       
   121 	 * @param aRetType [out] SmfPluginRetType
       
   122 	 * @param aIsLastPage [out] true if this the last page, else false
       
   123 	 * @return SmfPluginError 
       
   124 	 */
       
   125 	virtual SmfPluginError responseAvailable( 
       
   126 			const SmfTransportResult aTransportResult, 
       
   127 			QNetworkReply *aReply, 
       
   128 			QVariant* aResult, 
       
   129 			SmfPluginRetType aRetType,
       
   130 			bool aIsLastPage) = 0;
       
   131 	
   103 	
   132 	};
   104 	};
   133 
   105 
   134 Q_DECLARE_INTERFACE( SmfMusicEventsPlugin, "org.symbian.smf.plugin.music.events/v1.0" );
   106 Q_DECLARE_INTERFACE( SmfMusicEventsPlugin, "org.symbian.smf.plugin.music.events/v1.0" );
   135 
   107