--- a/example/clientapi/smf/inc/smfplugins/smfmusic/smfmusiceventsplugin.h Thu Mar 25 14:44:08 2010 +0530
+++ b/example/clientapi/smf/inc/smfplugins/smfmusic/smfmusiceventsplugin.h Tue Apr 06 16:35:37 2010 +0530
@@ -8,9 +8,9 @@
* Copyright (c) 2010 Sasken Communication Technologies Ltd.
* All rights reserved.
* This component and the accompanying materials are made available
- * under the terms of the "{License}"
+ * under the terms of the "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
- * at the URL "{LicenseUrl}".
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html"
*
* @section DESCRIPTION
*
@@ -22,14 +22,15 @@
#ifndef SMFMUSICEVENTSPLUGIN_H_
#define SMFMUSICEVENTSPLUGIN_H_
-#include <smfproviderbase.h>
+#include <smfpluginbase.h>
#include <qtcontacts.h>
#include <smfevent.h>
-#include <smfvenue.h>
+#include <smfplace.h>
using namespace QtMobility;
/**
+ * @ingroup smf_plugin_group
* Interface specification for music events
*
* All of the functionality described here should be implemented by a service
@@ -37,7 +38,7 @@
*
* Note: This class has dependencies on QtMobility project
*/
-class SmfMusicEventsPlugin : public QObject
+class SmfMusicEventsPlugin : public SmfPluginBase
{
Q_OBJECT
public:
@@ -53,81 +54,52 @@
~SmfMusicEventsPlugin( );
/**
- * Method to get the provider information
- * @return Instance of SmfProviderBase
- */
- virtual SmfProviderBase* getProviderInfo( ) = 0;
-
- /**
* Method to get the events based on location
+ * @param aRequest [out] The request data to be sent to network
* @param aLocation Location of the event
- * @param aRequest [out] The request data to be sent to network
* @param aPageNum The page to be extracted
* @param aItemsPerPage Number of items per page
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone
*/
- virtual SmfPluginError events( const QtMobility::QContactGeolocation aLocation,
- SmfPluginRequestData *aRequest,
- const int aPageNum = 0,
- const int aItemsPerPage = 10 ) = 0;
+ virtual SmfPluginError events( SmfPluginRequestData *aRequest,
+ const QtMobility::QContactGeolocation aLocation,
+ const int aPageNum = SMF_FIRST_PAGE,
+ const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
/**
* Method to get the venues based on location
+ * @param aRequest [out] The request data to be sent to network
* @param aLocation Location of the venue
- * @param aRequest [out] The request data to be sent to network
* @param aPageNum The page to be extracted
* @param aItemsPerPage Number of items per page
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone
*/
- virtual SmfPluginError venues( const QtMobility::QContactGeolocation aLocation,
- SmfPluginRequestData *aRequest,
- const int aPageNum = 0,
- const int aItemsPerPage = 10 ) = 0;
+ virtual SmfPluginError venues( SmfPluginRequestData *aRequest,
+ const QtMobility::QContactGeolocation aLocation,
+ const int aPageNum = SMF_FIRST_PAGE,
+ const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
/**
* Method to get the events based on venues
+ * @param aRequest [out] The request data to be sent to network
* @param aVenue Venue of the event
- * @param aRequest [out] The request data to be sent to network
* @param aPageNum The page to be extracted
* @param aItemsPerPage Number of items per page
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone
*/
- virtual SmfPluginError events( const SmfVenue aVenue,
- SmfPluginRequestData *aRequest,
- const int aPageNum = 0,
- const int aItemsPerPage = 10 ) = 0;
+ virtual SmfPluginError events( SmfPluginRequestData *aRequest,
+ const SmfPlace aVenue,
+ const int aPageNum = SMF_FIRST_PAGE,
+ const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
/**
* Method to post events
- * of posting the events is available
+ * @param aRequest [out] The request data to be sent to network
* @param aEventList The list of events to be posted
- * @param aRequest [out] The request data to be sent to network
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone
*/
- virtual SmfPluginError postEvents( const QList<SmfEvent> aEventList,
- SmfPluginRequestData *aRequest ) = 0;
-
-
- /**
- * Method to get the result for a network request.
- * @param aTransportResult The result of transport operation
- * @param aReply The QNetworkReply instance for the request
- * @param aResult [out] An output parameter to the plugin manager.If the
- * return value is SmfSendRequestAgain, QVariant will be of type
- * SmfPluginRequestData.
- * If last operation was events(), aResult will be of type QList<SmfEvent>
- * If last operation was venues(), aResult will be of type QList<SmfVenue>
- * If last operation was postEvents(), aResult will be of type bool
- * @param aRetType [out] SmfPluginRetType
- * @param aIsLastPage [out] true if this the last page, else false
- * @return SmfPluginError
- */
- virtual SmfPluginError responseAvailable(
- const SmfTransportResult aTransportResult,
- QNetworkReply *aReply,
- QVariant* aResult,
- SmfPluginRetType aRetType,
- bool aIsLastPage) = 0;
+ virtual SmfPluginError postEvents( SmfPluginRequestData *aRequest,
+ const QList<SmfEvent> aEventList ) = 0;
};