smf/smfservermodule/smfclient/smfgallery.cpp
changeset 25 a180113055cb
parent 18 013a02bf2bb0
equal deleted inserted replaced
24:1cee9f1b95e0 25:a180113055cb
    43  * If not supplied by the user default values are used.
    43  * If not supplied by the user default values are used.
    44  * @param names the subject or any keywords to be used to filter albums with that name
    44  * @param names the subject or any keywords to be used to filter albums with that name
    45  * @param user the user whose albums are requested 
    45  * @param user the user whose albums are requested 
    46  * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    46  * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    47  * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    47  * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
       
    48  * @return SmfError. SmfNoError if success, else appropriate error code
    48  */
    49  */
    49 void SmfGallery::albums(QStringList names, SmfContact* user, int pageNum, int perPage)
    50 SmfError SmfGallery::albums(QStringList names, SmfContact* user, int pageNum, int perPage)
    50 	{
    51 	{
    51 	m_private->albums(names,user, pageNum, perPage);	
    52 	return m_private->albums(names,user, pageNum, perPage);	
    52 	}
    53 	}
    53 
    54 
    54 /**
    55 /**
    55  * Get the picture listing asynchronously. The picturesAvailable() signal is 
    56  * Get the picture listing asynchronously. The picturesAvailable() signal is 
    56  * emitted with SmfPictureList once the pictures have arrived.
    57  * emitted with SmfPictureList once the pictures have arrived.
    57  * When the list is big user can specify the page number and per page item data.
    58  * When the list is big user can specify the page number and per page item data.
    58  * If not supplied by the user default values are used.
    59  * If not supplied by the user default values are used.
    59  * @param albums album(s) whose pictures are being requested
    60  * @param albums album(s) whose pictures are being requested
    60  * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    61  * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    61  * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    62  * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
       
    63  * @return SmfError. SmfNoError if success, else appropriate error code
    62  */
    64  */
    63 void SmfGallery::pictures(SmfPictureAlbumList &albums, int pageNum, int perPage)
    65 SmfError SmfGallery::pictures(SmfPictureAlbumList &albums, int pageNum, int perPage)
    64 	{
    66 	{
    65 	m_private->pictures( albums, pageNum, perPage);
    67 	return m_private->pictures( albums, pageNum, perPage);
    66 	}
    68 	}
    67 
    69 
    68 
    70 
    69 /**
    71 /**
    70  * Returns a user title/caption for the picture
    72  * Returns a user title/caption for the picture
       
    73  * @return SmfError. SmfNoError if success, else appropriate error code
    71  */
    74  */
    72 void SmfGallery::description ( SmfPicture& picture )
    75 SmfError SmfGallery::description ( SmfPicture& picture )
    73 	{
    76 	{
    74 	m_private->description(picture);
    77 	return m_private->description(picture);
    75 	}
    78 	}
    76 
    79 
    77 /**
    80 /**
    78  * Upload an image.Implemented as slot to connect to UI controls more easily
    81  * Upload an image.Implemented as slot to connect to UI controls more easily
    79  * uploadFinished() signal is emitted with the success value of the upload
    82  * uploadFinished() signal is emitted with the success value of the upload
    80  * @param image the image to be uploaded
    83  * @param image the image to be uploaded
    81  * @param album the optional destination album name 
    84  * @param album the optional destination album name
       
    85  * @return SmfError. SmfNoError if success, else appropriate error code 
    82  */
    86  */
    83 void SmfGallery::upload(SmfPicture* image, SmfPictureAlbum* album)
    87 SmfError SmfGallery::upload(SmfPicture* image, SmfPictureAlbum* album)
    84 	{
    88 	{
    85 	m_private->upload(image,album);
    89 	return m_private->upload(image,album);
    86 	}
    90 	}
    87 
    91 
    88 /**
    92 /**
    89  * Upload an list image.Implemented as slot to connect to UI controls more easily
    93  * Upload an list image.Implemented as slot to connect to UI controls more easily
    90  * uploadFinished() signal is emitted with the success value of the upload
    94  * uploadFinished() signal is emitted with the success value of the upload
    91  * @param images the list image to be uploaded
    95  * @param images the list image to be uploaded
    92  * @param album the optional destination album name 
    96  * @param album the optional destination album name
       
    97  * @return SmfError. SmfNoError if success, else appropriate error code 
    93  */
    98  */
    94 void SmfGallery::upload(SmfPictureList* images, SmfPictureAlbum* album) 
    99 SmfError SmfGallery::upload(SmfPictureList* images, SmfPictureAlbum* album) 
    95 	{
   100 	{
    96 	m_private->upload(images,album);
   101 	return m_private->upload(images,album);
    97 	}
   102 	}
    98 
   103 
    99 /**
   104 /**
   100  * Posts a comment for an image. uploadFinished() signal is emitted
   105  * Posts a comment for an image. uploadFinished() signal is emitted
   101  * with success of the post once comment is posted.
   106  * with success of the post once comment is posted.
   102  * @param image Image to comment on
   107  * @param image Image to comment on
   103  * @param comment Comment to post
   108  * @param comment Comment to post
       
   109  * @return SmfError. SmfNoError if success, else appropriate error code
   104  */
   110  */
   105 void SmfGallery::postComment(SmfPicture image, SmfComment comment) 
   111 SmfError SmfGallery::postComment(SmfPicture image, SmfComment comment) 
   106 	{
   112 	{
   107 	m_private->postComment(image,comment);
   113 	return m_private->postComment(image,comment);
   108 	}
   114 	}
   109    
   115    
   110 /**
   116 /**
   111  * Request for a custom operation.
   117  * Request for a custom operation.
   112  * @param operationId OperationId
   118  * @param operationId OperationId
   113  * @param customData Custom data to be sent
   119  * @param customData Custom data to be sent
       
   120  * @return SmfError. SmfNoError if success, else appropriate error code
   114  * Note:-Interpretation of operationId and customData is upto the concerned
   121  * Note:-Interpretation of operationId and customData is upto the concerned
   115  * plugin and client application. service provider should provide some
   122  * plugin and client application. service provider should provide some
   116  * serializing-deserializing utilities for these custom data
   123  * serializing-deserializing utilities for these custom data
   117  */
   124  */
   118 void SmfGallery::customRequest(const int& operationId,QByteArray* customData)
   125 SmfError SmfGallery::customRequest(const int& operationId,QByteArray* customData)
   119 	{
   126 	{
   120 	m_private->customRequest(operationId, customData);
   127 	return m_private->customRequest(operationId, customData);
   121 	}
   128 	}
   122 
   129 
   123 /**
   130 /**
   124 * Gets the base provider info
   131 * Gets the base provider info
   125 */
   132 */
   126 SmfProvider* SmfGallery::getProvider() const
   133 SmfProvider* SmfGallery::getProvider() const
   127 	{
   134 	{
   128 	return m_baseProvider;
   135 	return m_baseProvider;
   129 	}
   136 	}
       
   137 
       
   138 SmfError SmfGallery::cancelRequest()
       
   139 	{
       
   140 	return m_private->cancelRequest();
       
   141 	}