22 * Uses Symbian client-server for Symbian |
22 * Uses Symbian client-server for Symbian |
23 * QDbus for linux |
23 * QDbus for linux |
24 * QLocalserver for rest of the platforms |
24 * QLocalserver for rest of the platforms |
25 * Note:- only symbian client-server impl is provided at the moment |
25 * Note:- only symbian client-server impl is provided at the moment |
26 **/ |
26 **/ |
|
27 #ifndef SMFGALLERY_P_H |
|
28 #define SMFGALLERY_P_H |
27 |
29 |
28 #include "smfprovider.h" |
30 #include "smfprovider.h" |
29 #include "smfclientglobal.h" |
31 #include "SmfClientGlobal.h" |
30 #include "smfglobal.h" |
32 #include "smfGlobal.h" |
31 #include "smfobserver.h" |
33 #include "SmfObserver.h" |
32 |
34 |
33 class SmfProvider; |
35 class SmfProvider; |
34 |
36 |
35 |
37 |
36 #include <QObject> |
38 #include <QObject> |
37 #include <QDateTime> |
39 #include <QDateTime> |
38 #include <QStringList> |
40 #include <QStringList> |
39 |
41 |
40 #include "smfobserver.h" |
42 #include "SmfObserver.h" |
41 #include "smfgallery.h" |
43 #include "smfgallery.h" |
42 #ifdef Q_OS_SYMBIAN |
44 #ifdef Q_OS_SYMBIAN |
43 class CSmfClientSymbian; |
45 class CSmfClientSymbian; |
44 #else |
46 #else |
45 class SmfClientQt; |
47 class SmfClientQt; |
52 |
54 |
53 SmfGalleryPrivate(SmfGallery* gallery=0); |
55 SmfGalleryPrivate(SmfGallery* gallery=0); |
54 ~SmfGalleryPrivate(); |
56 ~SmfGalleryPrivate(); |
55 |
57 |
56 /** |
58 /** |
57 * Get the picture listing asynchronously. |
59 * Get the album listing asynchronously. |
58 * The picturesAvailable() signal is emitted with SmfPictureList once the pictures have arrived. |
60 * The albumsAvailable() signal is emitted with SmfPictureAlbumList once the albums have arrived. |
59 * When the list is big user can specify the page number and per page item data. |
61 * When the list is big user can specify the page number and per page item data. |
60 * If not supplied by the user default values are used. |
62 * If not supplied by the user default values are used. |
|
63 * @param names the subject or any keywords to be used to filter albums with that name |
|
64 * @param user the user whose albums are requested |
61 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
65 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
62 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
66 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
63 */ |
67 */ |
64 void pictures(int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE); |
68 void albums(QStringList names, SmfContact* user, int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE); |
|
69 |
65 |
70 |
66 /** |
71 /** |
67 * Returns a user title/caption for the picture |
72 * Get the picture listing asynchronously. |
|
73 * The picturesAvailable() signal is emitted with SmfPictureList once the pictures have arrived. |
|
74 * When the list is big user can specify the page number and per page item data. |
|
75 * If not supplied by the user default values are used. |
|
76 * @param albums album(s) whose pictures are being requested |
|
77 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
|
78 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
68 */ |
79 */ |
69 QString description(SmfPicture& picture); // A user title or caption, maybe? |
80 void pictures(SmfPictureAlbumList albums, int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE); |
70 |
81 |
71 /** |
82 /** |
72 * Upload an image.Implemented as slot to connect to UI controls more easily |
83 * Upload an image.Implemented as slot to connect to UI controls more easily |
73 * uploadFinished() signal is emitted with the success value of the upload |
84 * uploadFinished() signal is emitted with the success value of the upload |
74 * @param image the image to be uploaded |
85 * @param image the image to be uploaded |
|
86 * @param album the optional destination album name |
75 */ |
87 */ |
76 void upload(SmfPicture* image) ; |
88 void upload(SmfPicture* image, SmfPictureAlbum* album=NULL) ; |
77 |
89 |
78 /** |
90 /** |
79 * Upload an list image.Implemented as slot to connect to UI controls more easily |
91 * Upload an list image.Implemented as slot to connect to UI controls more easily |
80 * uploadFinished() signal is emitted with the success value of the upload |
92 * uploadFinished() signal is emitted with the success value of the upload |
81 * @param images the list image to be uploaded |
93 * @param images the list image to be uploaded |
|
94 * @param album the optional destination album name |
82 */ |
95 */ |
83 void upload(SmfPictureList* images) ; |
96 void upload(SmfPictureList* images, SmfPictureAlbum* album=NULL) ; |
84 |
97 |
85 /** |
98 /** |
86 * Posts a comment for an image. uploadFinished() signal is emitted |
99 * Posts a comment for an image. uploadFinished() signal is emitted |
87 * with success of the post once comment is posted. |
100 * with success of the post once comment is posted. |
88 * @param image Image to comment on |
101 * @param image Image to comment on |
89 * @param comment Comment to post |
102 * @param comment Comment to post |
90 */ |
103 */ |
91 void postComment(SmfPicture image, SmfComment comment) ; |
104 void postComment(SmfPicture image, SmfComment comment) ; |
92 //from smfobserver |
105 |
|
106 /** from smfobserver */ |
93 void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error); |
107 void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error); |
|
108 |
|
109 |
94 private: |
110 private: |
95 SmfProvider* m_baseProvider; |
111 SmfProvider* m_baseProvider; |
96 //serialized byte array of provider+other info to be sent to the server |
112 //serialized byte array of provider+other info to be sent to the server |
97 //The order:- SmfProvider then params in order of their appearance in fn |
113 //The order:- SmfProvider then params in order of their appearance in fn |
98 QByteArray m_serializedDataToServer; |
114 QByteArray m_serializedDataToServer; |
|
115 //serialized xtra info, order of serialization follows order of param |
|
116 QByteArray m_xtraInfoSerialized; |
99 #ifdef Q_OS_SYMBIAN |
117 #ifdef Q_OS_SYMBIAN |
100 CSmfClientSymbian* m_SmfClientPrivate; |
118 CSmfClientSymbian* m_SmfClientPrivate; |
101 friend class CSmfClientSymbian; |
119 friend class CSmfClientSymbian; |
102 #else |
120 #else |
103 SmfClientQt* m_SmfClientPrivate; |
121 SmfClientQt* m_SmfClientPrivate; |
104 friend class SmfClientQt; |
122 friend class SmfClientQt; |
105 #endif |
123 #endif |
106 bool m_connected; |
124 bool m_connected; |
107 SmfGallery* m_gallery; |
125 SmfGallery* m_gallery; |
108 SmfPictureList* m_picList; |
126 SmfPictureList* m_picList; |
|
127 int m_xtraInfoFlag; |
|
128 int m_pageInfoFlag; |
109 void writeLog(QString log) const{}; |
129 void writeLog(QString log) const{}; |
110 |
130 |
111 }; |
131 }; |
|
132 #endif |
112 |
133 |
113 |
134 |
114 |
135 |
115 |
136 |
116 |
137 |
117 |
138 |
118 |
|