smf/smfservermodule/smfserver/smfplugins/smfgalleryplugin.h
changeset 14 a469c0e6e7fb
parent 7 be09cf1f39dd
child 18 013a02bf2bb0
equal deleted inserted replaced
13:b5d63d5fc252 14:a469c0e6e7fb
    21 #define SMFGALLERYPLUGIN_H_
    21 #define SMFGALLERYPLUGIN_H_
    22 
    22 
    23 #include <smfpluginbase.h>
    23 #include <smfpluginbase.h>
    24 #include <smfpicture.h>
    24 #include <smfpicture.h>
    25 #include <smfcomment.h>
    25 #include <smfcomment.h>
       
    26 #include <smfpicturealbum.h>
    26 
    27 
    27 /**
    28 /**
    28  * @ingroup smf_plugin_group
    29  * @ingroup smf_plugin_group
    29  * Interface specification for plugins that implement gallery related services
    30  * Interface specification for plugins that implement gallery related services
    30  * like getting pictures, their description, uploading, posting comments 
    31  * like getting pictures, their description, uploading, posting comments 
    57 public:
    58 public:
    58 	/**
    59 	/**
    59 	 * Destructor
    60 	 * Destructor
    60 	 */
    61 	 */
    61 	virtual ~SmfGalleryPlugin( ) {}
    62 	virtual ~SmfGalleryPlugin( ) {}
       
    63 
       
    64 	/**
       
    65 	 * Method to get a list of albums
       
    66 	 * @param aRequest [out] The request data to be sent to network
       
    67 	 * @param aNames The subject or any keywords to be used to filter albums with that name
       
    68 	 * @param aUser The user whose albums are requested
       
    69 	 * @param aPageNum The page to be extracted
       
    70 	 * @param aItemsPerPage Number of items per page
       
    71 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    72 	 */
       
    73 	virtual SmfPluginError albums( SmfPluginRequestData &aRequest, 
       
    74 			const QStringList &aNames, 
       
    75 			const SmfContact *aUser, 
       
    76 			const int aPageNum = SMF_FIRST_PAGE,
       
    77 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    62 	
    78 	
    63 	/**
    79 	/**
    64 	 * Method to get a list of pictures
    80 	 * Method to get a list of pictures
    65 	 * @param aRequest [out] The request data to be sent to network
    81 	 * @param aRequest [out] The request data to be sent to network
       
    82 	 * @param aAlbums The album(s) whose pictures are being requested
    66 	 * @param aPageNum The page to be extracted
    83 	 * @param aPageNum The page to be extracted
    67 	 * @param aItemsPerPage Number of items per page
    84 	 * @param aItemsPerPage Number of items per page
    68 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    85 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    69 	 */
    86 	 */
    70 	virtual SmfPluginError pictures( SmfPluginRequestData &aRequest, 
    87 	virtual SmfPluginError pictures( SmfPluginRequestData &aRequest, 
       
    88 			const SmfPictureAlbumList &aAlbums, 
    71 			const int aPageNum = SMF_FIRST_PAGE, 
    89 			const int aPageNum = SMF_FIRST_PAGE, 
    72 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    90 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    73 	
    91 	
    74 	/**
    92 	/**
    75 	 * Method to get a description
    93 	 * Method to get a description
    82 	
   100 	
    83 	/**
   101 	/**
    84 	 * Method to upload a picture
   102 	 * Method to upload a picture
    85 	 * @param aRequest [out] The request data to be sent to network
   103 	 * @param aRequest [out] The request data to be sent to network
    86 	 * @param aImage The image to be uploaded
   104 	 * @param aImage The image to be uploaded
       
   105 	 * @param aAlbum the optional destination album name
    87 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   106 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    88 	 */
   107 	 */
    89 	virtual SmfPluginError upload( SmfPluginRequestData &aRequest,
   108 	virtual SmfPluginError upload( SmfPluginRequestData &aRequest,
    90 			const SmfPicture &aImage ) = 0;
   109 			const SmfPicture &aImage,
       
   110 			const SmfPictureAlbum* aAlbum = NULL ) = 0;
    91 	
   111 	
    92 	/**
   112 	/**
    93 	 * Method to upload a list of pictures
   113 	 * Method to upload a list of pictures
    94 	 * @param aRequest [out] The request data to be sent to network
   114 	 * @param aRequest [out] The request data to be sent to network
    95 	 * @param aImages The list of images to be uploaded
   115 	 * @param aImages The list of images to be uploaded
       
   116 	 * @param aAlbum the optional destination album name
    96 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   117 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    97 	 */
   118 	 */
    98 	virtual SmfPluginError upload( SmfPluginRequestData &aRequest,
   119 	virtual SmfPluginError upload( SmfPluginRequestData &aRequest,
    99 			const QList<SmfPicture> &aImages ) = 0;
   120 			const QList<SmfPicture> &aImages, 
       
   121 			const SmfPictureAlbum* aAlbum = NULL ) = 0;
   100 	
   122 	
   101 	/**
   123 	/**
   102 	 * Method to post comment on a picture is available
   124 	 * Method to post comment on a picture is available
   103 	 * @param aRequest [out] The request data to be sent to network
   125 	 * @param aRequest [out] The request data to be sent to network
   104 	 * @param aImage The image on which comment is to be posted
   126 	 * @param aImage The image on which comment is to be posted
   121 	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
   143 	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
   122 			const int &aOperation, QByteArray *aData ) = 0;
   144 			const int &aOperation, QByteArray *aData ) = 0;
   123 		
   145 		
   124 	};
   146 	};
   125 
   147 
   126 Q_DECLARE_INTERFACE( SmfGalleryPlugin, "org.symbian.smf.plugin.gallery/v1.0" );
   148 Q_DECLARE_INTERFACE( SmfGalleryPlugin, "org.symbian.smf.plugin.gallery/v0.2" );
   127 
   149 
   128 #endif /* SMFGALLERYPLUGIN_H_ */
   150 #endif /* SMFGALLERYPLUGIN_H_ */