diff -r 000000000000 -r 5d2360e70d9f example/clientapi/smf/smfpostprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example/clientapi/smf/smfpostprovider.h Tue Mar 02 16:24:32 2010 +0530 @@ -0,0 +1,67 @@ +/* +* Copyright (c) 2010 Sasken Communication Technologies Ltd. +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the "{License}" +* which accompanies this distribution, and is available +* at the URL "{LicenseUrl}". +* +* Initial Contributors: +* Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution +* +* Contributors: +* +* Description: +* Interface spefication for posting updates to a social site +* +*/ +#ifndef SMFPOSTPROVIDER_H +#define SMFPOSTPROVIDER_H + +class SmfProvider; //base-class for service provider +class SmfContact; //class for Contact in a social network +class SmfLocationInfo; //class for geo location +class SmfPost; //class for information (text, image and url) contained in post in social network + +/** + * Interface to search for contacts/connections from a service provider. This class + * provides basic functionality to allow applications to obtain list of + * contacts or friends in a social networking service. + * + * Note that branding information for the particular service implementation + * is available from base-class functions. See also: + * SmfProvider::serviceName(), SmfProvider::serviceIcon(), SmfProvider::description() + * + * All of the functionality described here should be implemented by a service + * specific plug-in object. + */ +class SmfPostProvider : public SmfProvider +{ + Q_OBJECT; + +public: + // Seeing as this is a plug-in implementation, these will realistically + // be generated by SMF factory of some kind + SmfPostProvider(QObject* parent = 0); + ~SmfPostProvider(); + +public: + // Get the friend listing - might be made asynchrnous later + virtual QList getPosts(SmfStatusData statusData) = 0; // list of contact objects + virtual SmfContactModel model() = 0; // maybe we can make a QItemModel-derived model? + + +slots: + virtual void updatePost(SmfPost postData,SmfLocationInfo location) = 0; // list of contact objects + virtual void updatePostDirected(SmfPost postData,SmfContact contact,SmfLocationInfo location) = 0; // list of contact objects + virtual QList postAppearence(SmfPresenceInfo appearence) = 0; // appear offline, busy, do-not-disturb + +signals: + // Notification of remote changes to the contactlist, + // probably should be done through model + virtual void friendsChanged() = 0; + virtual void followersChanged() = 0; + virtual void groupChanged() = 0; +}; + +#endif // SMFPOSTPROVIDER_H