|
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 posting updates to a social site |
|
16 * |
|
17 */ |
|
18 #ifndef SMFPOSTPROVIDER_H |
|
19 #define SMFPOSTPROVIDER_H |
|
20 |
|
21 class SmfProvider; //base-class for service provider |
|
22 class SmfContact; //class for Contact in a social network |
|
23 class SmfLocationInfo; //class for geo location |
|
24 class SmfPost; //class for information (text, image and url) contained in post in social network |
|
25 |
|
26 /** |
|
27 * Interface to search for contacts/connections from a service provider. This class |
|
28 * provides basic functionality to allow applications to obtain list of |
|
29 * contacts or friends in a social networking service. |
|
30 * |
|
31 * Note that branding information for the particular service implementation |
|
32 * is available from base-class functions. See also: |
|
33 * SmfProvider::serviceName(), SmfProvider::serviceIcon(), SmfProvider::description() |
|
34 * |
|
35 * All of the functionality described here should be implemented by a service |
|
36 * specific plug-in object. |
|
37 */ |
|
38 class SmfPostProvider : public SmfProvider |
|
39 { |
|
40 Q_OBJECT; |
|
41 |
|
42 public: |
|
43 // Seeing as this is a plug-in implementation, these will realistically |
|
44 // be generated by SMF factory of some kind |
|
45 SmfPostProvider(QObject* parent = 0); |
|
46 ~SmfPostProvider(); |
|
47 |
|
48 public: |
|
49 // Get the friend listing - might be made asynchrnous later |
|
50 virtual QList<SmfPost> getPosts(SmfStatusData statusData) = 0; // list of contact objects |
|
51 virtual SmfContactModel model() = 0; // maybe we can make a QItemModel-derived model? |
|
52 |
|
53 |
|
54 slots: |
|
55 virtual void updatePost(SmfPost postData,SmfLocationInfo location) = 0; // list of contact objects |
|
56 virtual void updatePostDirected(SmfPost postData,SmfContact contact,SmfLocationInfo location) = 0; // list of contact objects |
|
57 virtual QList<SmfContact> postAppearence(SmfPresenceInfo appearence) = 0; // appear offline, busy, do-not-disturb |
|
58 |
|
59 signals: |
|
60 // Notification of remote changes to the contactlist, |
|
61 // probably should be done through model |
|
62 virtual void friendsChanged() = 0; |
|
63 virtual void followersChanged() = 0; |
|
64 virtual void groupChanged() = 0; |
|
65 }; |
|
66 |
|
67 #endif // SMFPOSTPROVIDER_H |