6 * @section LICENSE |
6 * @section LICENSE |
7 * |
7 * |
8 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
8 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
9 * All rights reserved. |
9 * All rights reserved. |
10 * This component and the accompanying materials are made available |
10 * This component and the accompanying materials are made available |
11 * under the terms of the "{License}" |
11 * under the terms of the "Eclipse Public License v1.0" |
12 * which accompanies this distribution, and is available |
12 * which accompanies this distribution, and is available |
13 * at the URL "{LicenseUrl}". |
13 * at the URL "http://www.eclipse.org/legal/epl-v10.html" |
14 * |
14 * |
15 * @section DESCRIPTION |
15 * @section DESCRIPTION |
16 * |
16 * |
17 * Interface specification for plugins that implement gallery related services |
17 * Interface specification for plugins that implement gallery related services |
18 */ |
18 */ |
19 |
19 |
20 #ifndef SMFGALLERYPLUGIN_H_ |
20 #ifndef SMFGALLERYPLUGIN_H_ |
21 #define SMFGALLERYPLUGIN_H_ |
21 #define SMFGALLERYPLUGIN_H_ |
22 |
22 |
23 #include <smfproviderbase.h> |
23 #include <smfpluginbase.h> |
24 #include <smfpicture.h> |
24 #include <smfpicture.h> |
25 #include <smfcomment.h> |
25 #include <smfcomment.h> |
26 |
26 |
27 /** |
27 /** |
|
28 * @ingroup smf_plugin_group |
28 * Interface specification for plugins that implement gallery related services |
29 * Interface specification for plugins that implement gallery related services |
29 * like getting pictures, their description, uploading, posting comments |
30 * like getting pictures, their description, uploading, posting comments |
30 * on pictures etc |
31 * on pictures etc |
31 * |
32 * |
32 * All of the functionality described here should be implemented by a service |
33 * All of the functionality described here should be implemented by a service |
65 * Destructor |
66 * Destructor |
66 */ |
67 */ |
67 ~SmfGalleryPlugin( ); |
68 ~SmfGalleryPlugin( ); |
68 |
69 |
69 /** |
70 /** |
70 * Method to get the provider information |
|
71 * @return Instance of SmfProviderBase |
|
72 */ |
|
73 virtual SmfProviderBase* getProviderInfo( ) = 0; |
|
74 |
|
75 /** |
|
76 * Method to get a list of pictures |
71 * Method to get a list of pictures |
77 * @param aRequest [out] The request data to be sent to network |
72 * @param aRequest [out] The request data to be sent to network |
78 * @param aPageNum The page to be extracted |
73 * @param aPageNum The page to be extracted |
79 * @param aItemsPerPage Number of items per page |
74 * @param aItemsPerPage Number of items per page |
80 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
75 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
81 */ |
76 */ |
82 virtual SmfPluginError pictures( SmfPluginRequestData *aRequest, |
77 virtual SmfPluginError pictures( SmfPluginRequestData *aRequest, |
83 const int aPageNum = 0, |
78 const int aPageNum = SMF_FIRST_PAGE, |
84 const int aItemsPerPage = 10) = 0; |
79 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
85 |
80 |
86 /** |
81 /** |
87 * Method to get a description |
82 * Method to get a description |
|
83 * @param aRequest [out] The request data to be sent to network |
88 * @param aImage The image abot which the description is required |
84 * @param aImage The image abot which the description is required |
89 * @param aRequest [out] The request data to be sent to network |
|
90 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
85 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
91 */ |
86 */ |
92 virtual SmfPluginError description( const SmfPicture &aImage, |
87 virtual SmfPluginError description( SmfPluginRequestData *aRequest, |
93 SmfPluginRequestData *aRequest ) = 0; |
88 const SmfPicture &aImage ) = 0; |
94 |
89 |
95 /** |
90 /** |
96 * Method to upload a picture |
91 * Method to upload a picture |
|
92 * @param aRequest [out] The request data to be sent to network |
97 * @param aImage The image to be uploaded |
93 * @param aImage The image to be uploaded |
98 * @param aRequest [out] The request data to be sent to network |
|
99 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
94 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
100 */ |
95 */ |
101 virtual SmfPluginError upload( const SmfPicture &aImage, |
96 virtual SmfPluginError upload( SmfPluginRequestData *aRequest, |
102 SmfPluginRequestData *aRequest ) = 0; |
97 const SmfPicture &aImage ) = 0; |
103 |
98 |
104 /** |
99 /** |
105 * Method to upload a list of pictures |
100 * Method to upload a list of pictures |
|
101 * @param aRequest [out] The request data to be sent to network |
106 * @param aImages The list of images to be uploaded |
102 * @param aImages The list of images to be uploaded |
107 * @param aRequest [out] The request data to be sent to network |
|
108 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
103 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
109 */ |
104 */ |
110 virtual SmfPluginError upload( const QList<SmfPicture> &aImages, |
105 virtual SmfPluginError upload( SmfPluginRequestData *aRequest, |
111 SmfPluginRequestData *aRequest ) = 0; |
106 const QList<SmfPicture> &aImages ) = 0; |
112 |
107 |
113 /** |
108 /** |
114 * Method to post comment on a picture |
109 * Method to post comment on a picture is available |
115 * is available |
110 * @param aRequest [out] The request data to be sent to network |
116 * @param aImage The image on which comment is to be posted |
111 * @param aImage The image on which comment is to be posted |
117 * @param aComment The comment to be posted |
112 * @param aComment The comment to be posted |
118 * @param aRequest [out] The request data to be sent to network |
|
119 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
113 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
120 */ |
114 */ |
121 virtual SmfPluginError postComment( const SmfPicture &aImage, |
115 virtual SmfPluginError postComment( SmfPluginRequestData *aRequest, |
122 const SmfComment &aComment, |
116 const SmfPicture &aImage, |
123 SmfPluginRequestData *aRequest ) = 0; |
117 const SmfComment &aComment ) = 0; |
124 |
|
125 /** |
|
126 * Method to get the result for a network request. |
|
127 * @param aTransportResult The result of transport operation |
|
128 * @param aReply The QNetworkReply instance for the request |
|
129 * @param aResult [out] An output parameter to the plugin manager.If the |
|
130 * return value is SmfSendRequestAgain, QVariant will be of type |
|
131 * SmfPluginRequestData. |
|
132 * If last operation was pictures(), aResult will be of type QList<SmfPicture> |
|
133 * If last operation was description(), aResult will be of type QString |
|
134 * If last operation was upload() or postComment(), aResult will be of |
|
135 * type bool |
|
136 * @param aRetType [out] SmfPluginRetType |
|
137 * @param aIsLastPage [out] true if this the last page, else false |
|
138 * @return SmfPluginError |
|
139 */ |
|
140 virtual SmfPluginError responseAvailable( |
|
141 const SmfTransportResult aTransportResult, |
|
142 QNetworkReply *aReply, |
|
143 QVariant* aResult, |
|
144 SmfPluginRetType aRetType, |
|
145 bool aIsLastPage) = 0; |
|
146 |
118 |
147 }; |
119 }; |
148 |
120 |
149 Q_DECLARE_INTERFACE( SmfGalleryPlugin, "org.symbian.smf.plugin.gallery/v1.0" ); |
121 Q_DECLARE_INTERFACE( SmfGalleryPlugin, "org.symbian.smf.plugin.gallery/v1.0" ); |
150 |
122 |