example/clientapi/smf/inc/smfplugins/smfpictures/smfgalleryplugin.h
changeset 2 86af6c333601
parent 1 4b1e636e8a71
--- a/example/clientapi/smf/inc/smfplugins/smfpictures/smfgalleryplugin.h	Thu Mar 25 14:44:08 2010 +0530
+++ b/example/clientapi/smf/inc/smfplugins/smfpictures/smfgalleryplugin.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
  *
@@ -20,11 +20,12 @@
 #ifndef SMFGALLERYPLUGIN_H_
 #define SMFGALLERYPLUGIN_H_
 
-#include <smfproviderbase.h>
+#include <smfpluginbase.h>
 #include <smfpicture.h>
 #include <smfcomment.h>
 
 /**
+ * @ingroup smf_plugin_group
  * Interface specification for plugins that implement gallery related services
  * like getting pictures, their description, uploading, posting comments 
  * on pictures etc
@@ -51,7 +52,7 @@
   @endmsc
  * 
  */
-class SmfGalleryPlugin : public QObject
+class SmfGalleryPlugin : public SmfPluginBase
 	{
 	Q_OBJECT
 public:
@@ -67,12 +68,6 @@
 	~SmfGalleryPlugin( );
 	
 	/**
-	 * Method to get the provider information
-	 * @return Instance of SmfProviderBase
-	 */
-	virtual SmfProviderBase* getProviderInfo( ) = 0;
-	
-	/**
 	 * Method to get a list of pictures
 	 * @param aRequest [out] The request data to be sent to network
 	 * @param aPageNum The page to be extracted
@@ -80,69 +75,46 @@
 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
 	 */
 	virtual SmfPluginError pictures( SmfPluginRequestData *aRequest, 
-			const int aPageNum = 0, 
-			const int aItemsPerPage = 10) = 0;
+			const int aPageNum = SMF_FIRST_PAGE, 
+			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
 	
 	/**
 	 * Method to get a description
+	 * @param aRequest [out] The request data to be sent to network
 	 * @param aImage The image abot which the description is required
-	 * @param aRequest [out] The request data to be sent to network
 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
 	 */
-	virtual SmfPluginError description( const SmfPicture &aImage,
-			SmfPluginRequestData *aRequest ) = 0;
+	virtual SmfPluginError description( SmfPluginRequestData *aRequest,
+			const SmfPicture &aImage ) = 0;
 	
 	/**
 	 * Method to upload a picture
+	 * @param aRequest [out] The request data to be sent to network
 	 * @param aImage The image to be uploaded
-	 * @param aRequest [out] The request data to be sent to network
 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
 	 */
-	virtual SmfPluginError upload( const SmfPicture &aImage,
-			SmfPluginRequestData *aRequest ) = 0;
+	virtual SmfPluginError upload( SmfPluginRequestData *aRequest,
+			const SmfPicture &aImage ) = 0;
 	
 	/**
 	 * Method to upload a list of pictures
+	 * @param aRequest [out] The request data to be sent to network
 	 * @param aImages The list of images to be uploaded
-	 * @param aRequest [out] The request data to be sent to network
 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
 	 */
-	virtual SmfPluginError upload( const QList<SmfPicture> &aImages,
-			SmfPluginRequestData *aRequest ) = 0;
-	
-	/**
-	 * Method to post comment on a picture
-	 * is available
-	 * @param aImage The image on which comment is to be posted
-	 * @param aComment The comment to be posted
-	 * @param aRequest [out] The request data to be sent to network
-	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
-	 */
-	virtual SmfPluginError postComment( const SmfPicture &aImage, 
-			const SmfComment &aComment,
-			SmfPluginRequestData *aRequest ) = 0;
+	virtual SmfPluginError upload( SmfPluginRequestData *aRequest,
+			const QList<SmfPicture> &aImages ) = 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 pictures(), aResult will be of type QList<SmfPicture>
-	 * If last operation was description(), aResult will be of type QString
-	 * If last operation was upload() or postComment(), aResult will be of 
-	 * type bool
-	 * @param aRetType [out] SmfPluginRetType
-	 * @param aIsLastPage [out] true if this the last page, else false
-	 * @return SmfPluginError 
+	 * Method to post comment on a picture is available
+	 * @param aRequest [out] The request data to be sent to network
+	 * @param aImage The image on which comment is to be posted
+	 * @param aComment The comment to be posted
+	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
 	 */
-	virtual SmfPluginError responseAvailable( 
-			const SmfTransportResult aTransportResult, 
-			QNetworkReply *aReply, 
-			QVariant* aResult, 
-			SmfPluginRetType aRetType,
-			bool aIsLastPage) = 0;
+	virtual SmfPluginError postComment( SmfPluginRequestData *aRequest,
+			const SmfPicture &aImage, 
+			const SmfComment &aComment ) = 0;
 		
 	};