smf/smfservermodule/smfclient/smfgallery.h
changeset 25 a180113055cb
parent 18 013a02bf2bb0
equal deleted inserted replaced
24:1cee9f1b95e0 25:a180113055cb
    69 	 * If not supplied by the user default values are used.
    69 	 * If not supplied by the user default values are used.
    70 	 * @param names the subject or any keywords to be used to filter albums with that name
    70 	 * @param names the subject or any keywords to be used to filter albums with that name
    71 	 * @param user the user whose albums are requested 
    71 	 * @param user the user whose albums are requested 
    72 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    72 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    73 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    73 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    74 	 */
    74 	 * @return SmfError. SmfNoError if success, else appropriate error code
    75 	void albums ( QStringList names, SmfContact* user, 
    75 	 */
       
    76 	SmfError albums ( QStringList names, SmfContact* user, 
    76 					int pageNum = SMF_FIRST_PAGE,
    77 					int pageNum = SMF_FIRST_PAGE,
    77 					int perPage = SMF_ITEMS_PER_PAGE );
    78 					int perPage = SMF_ITEMS_PER_PAGE );
    78 		
    79 		
    79 	/**
    80 	/**
    80 	 * Get the picture listing asynchronously. The picturesAvailable() signal is 
    81 	 * Get the picture listing asynchronously. The picturesAvailable() signal is 
    82 	 * When the list is big user can specify the page number and per page item data.
    83 	 * When the list is big user can specify the page number and per page item data.
    83 	 * If not supplied by the user default values are used.
    84 	 * If not supplied by the user default values are used.
    84 	 * @param albums album(s) whose pictures are being requested
    85 	 * @param albums album(s) whose pictures are being requested
    85 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    86 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    86 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    87 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    87 	 */
    88 	 * @return SmfError. SmfNoError if success, else appropriate error code
    88 	void pictures ( SmfPictureAlbumList &albums, 
    89 	 */
       
    90 	SmfError pictures ( SmfPictureAlbumList &albums, 
    89 					int pageNum = SMF_FIRST_PAGE,
    91 					int pageNum = SMF_FIRST_PAGE,
    90 					int perPage = SMF_ITEMS_PER_PAGE );
    92 					int perPage = SMF_ITEMS_PER_PAGE );
    91 
    93 
    92 	/**
    94 	/**
    93 	 * Returns a user title/caption for the picture
    95 	 * Returns a user title/caption for the picture
    94 	 */
    96 	 * @return SmfError. SmfNoError if success, else appropriate error code
    95 	void description ( SmfPicture& picture );
    97 	 */
       
    98 	SmfError description ( SmfPicture& picture );
    96 	
    99 	
    97 public slots:
   100 public slots:
    98 	/**
   101 	/**
    99 	 * Upload an image.Implemented as slot to connect to UI controls more easily
   102 	 * Upload an image.Implemented as slot to connect to UI controls more easily
   100 	 * uploadFinished() signal is emitted with the success value of the upload
   103 	 * uploadFinished() signal is emitted with the success value of the upload
   101 	 * @param image the image to be uploaded
   104 	 * @param image the image to be uploaded
   102 	 * @param album the optional destination album name 
   105 	 * @param album the optional destination album name 
   103 	 */
   106 	 * @return SmfError. SmfNoError if success, else appropriate error code
   104 	void upload ( SmfPicture* image, SmfPictureAlbum* album = NULL );
   107 	 */
       
   108 	SmfError upload ( SmfPicture* image, SmfPictureAlbum* album = NULL );
   105 
   109 
   106 	/**
   110 	/**
   107 	 * Upload an list image.Implemented as slot to connect to UI controls more easily
   111 	 * Upload an list image.Implemented as slot to connect to UI controls more easily
   108 	 * uploadFinished() signal is emitted with the success value of the upload
   112 	 * uploadFinished() signal is emitted with the success value of the upload
   109 	 * @param images the list image to be uploaded
   113 	 * @param images the list image to be uploaded
   110 	 * @param album the optional destination album name 
   114 	 * @param album the optional destination album name
   111 	 */
   115 	 * @return SmfError. SmfNoError if success, else appropriate error code 
   112 	void upload ( SmfPictureList* images, SmfPictureAlbum* album = NULL );
   116 	 */
       
   117 	SmfError upload ( SmfPictureList* images, SmfPictureAlbum* album = NULL );
   113 
   118 
   114 	/**
   119 	/**
   115 	 * Posts a comment for an image. uploadFinished() signal is emitted
   120 	 * Posts a comment for an image. uploadFinished() signal is emitted
   116 	 * with success of the post once comment is posted.
   121 	 * with success of the post once comment is posted.
   117 	 * @param image Image to comment on
   122 	 * @param image Image to comment on
   118 	 * @param comment Comment to post
   123 	 * @param comment Comment to post
   119 	 */
   124 	 * @return SmfError. SmfNoError if success, else appropriate error code
   120 	void postComment ( SmfPicture image, SmfComment comment );
   125 	 */
       
   126 	SmfError postComment ( SmfPicture image, SmfComment comment );
   121 	
   127 	
   122 	/**
   128 	/**
   123 	 * Request for a custom operation.
   129 	 * Request for a custom operation.
   124 	 * @param operationId OperationId
   130 	 * @param operationId OperationId
   125 	 * @param customData Custom data to be sent
   131 	 * @param customData Custom data to be sent
       
   132 	 * @return SmfError. SmfNoError if success, else appropriate error code
   126 	 * Note:-Interpretation of operationId and customData is upto the concerned
   133 	 * Note:-Interpretation of operationId and customData is upto the concerned
   127 	 * plugin and client application. service provider should provide some
   134 	 * plugin and client application. service provider should provide some
   128 	 * serializing-deserializing utilities for these custom data
   135 	 * serializing-deserializing utilities for these custom data
   129 	 */
   136 	 */
   130 	void customRequest ( const int& operationId, QByteArray* customData );
   137 	SmfError customRequest ( const int& operationId, QByteArray* customData );
       
   138 	
       
   139     /**
       
   140      * Cancels a request generated due to the call to any API which results 
       
   141      * into http request. Might return error if no request is currently pending.
       
   142      * Please note that there can be only one request pending at any point of time
       
   143      * @return Appropriate SmfError value
       
   144      */
       
   145 	SmfError cancelRequest ();
   131 	
   146 	
   132 signals:
   147 signals:
   133 	/**
   148 	/**
   134 	 * Notification on arrival of list of SmfPictureAlbum as a result of call to @ref albums().
   149 	 * Notification on arrival of list of SmfPictureAlbum as a result of call to @ref albums().
   135 	 * @param pics Picture list
   150 	 * @param pics Picture list