1 /* |
|
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "{License}" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "{LicenseUrl}". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Interface spefication for a remote picture gallery |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef SMFGALLERY_H |
|
20 #define SMFGALLERY_H |
|
21 |
|
22 class SmfProvider; |
|
23 class SmfPicture; |
|
24 class SmfGalleryModel; |
|
25 class SmfComment; //user id, string, and url |
|
26 |
|
27 /** |
|
28 * Interface to a remote gallery service. This class |
|
29 * provides some basic gallery functionality to allow applications |
|
30 * to interact with a picture gallery in a social network. |
|
31 * |
|
32 * Note that branding information for the particular service implementation |
|
33 * is available from base-class functions. See also: |
|
34 * SmfProvider::serviceName(), SmfProvider::serviceIcon() |
|
35 * |
|
36 * All of the functionality described here should be implemented by a service |
|
37 * specific plug-in object. |
|
38 */ |
|
39 class SmfGallery : public SmfProvider |
|
40 { |
|
41 Q_OBJECT; |
|
42 |
|
43 public: |
|
44 // Seeing as this is a plug-in implementation, these will realistically |
|
45 // be generated by SMF factory of some kind |
|
46 SmfGallery(QObject* parent = 0); |
|
47 ~SmfGallery(); |
|
48 |
|
49 public: |
|
50 // Get the picture listing |
|
51 virtual QList<SmfPicture> pictures() = 0; // basic list of picture objects |
|
52 virtual SmfGalleryModel model() = 0; // maybe we can make a QItemModel-derived model? |
|
53 virtual QString description() = 0; // A user title or caption, maybe? |
|
54 |
|
55 slots: |
|
56 // Upload an image, note these can be slots to connect to UI controls more easily |
|
57 virtual int upload(SmfPicture image) = 0; |
|
58 virtual int upload(QList<SmfPicture> images) = 0; |
|
59 virtual int postComment(SmfPicture image, SmfComment comment) = 0; |
|
60 |
|
61 signals: |
|
62 // Notification of remote changes to the gallery, |
|
63 // probably should be done through model |
|
64 virtual void galleryUpdated() = 0; |
|
65 }; |
|
66 |
|
67 #endif // SMFGALLERY_H |
|
68 |
|