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 profile of a contact in a social networking site |
|
16 * |
|
17 /*************************************************************************************************/ |
|
18 |
|
19 #ifndef SMFPROFILE_H |
|
20 #define SMFPROFILE_H |
|
21 |
|
22 #include <QContactDetail> |
|
23 |
|
24 class SmfProvider; |
|
25 |
|
26 /** |
|
27 * Interface for a contact from a service provider. This class |
|
28 * provides basic functionality to allow applications to obtain details of a |
|
29 * contact (self or friends) in a social networking service. |
|
30 * |
|
31 * All of the functionality described here should be implemented by a service |
|
32 * specific plug-in object. |
|
33 */ |
|
34 class SmfContact : public QObject |
|
35 { |
|
36 Q_OBJECT; |
|
37 |
|
38 public: |
|
39 // Seeing as this is a plug-in implementation, these will realistically |
|
40 // be generated by SMF factory of some kind |
|
41 SmfContact(QObject* parent = 0); |
|
42 ~SmfContact(); |
|
43 |
|
44 |
|
45 private: |
|
46 /* |
|
47 QContactAddress Address; |
|
48 QContactAnniversary Anniversary; |
|
49 QContactAvatar Avatar; |
|
50 QContactBirthday Birthday; |
|
51 QContactEmailAddress EmailAddress; |
|
52 QContactGender Gender; |
|
53 QContactGeolocation Geolocation; |
|
54 QContactGuid Guid; |
|
55 QContactName Name; |
|
56 QContactNickname Nickname; |
|
57 QContactNote Note; |
|
58 QContactOnlineAccount OnlineAccount; |
|
59 QContactOrganization Organization; |
|
60 QContactPhoneNumber PhoneNumber; |
|
61 QContactTimestamp Timestamp; |
|
62 QContactType Type; |
|
63 QContactUrl Url; |
|
64 */ |
|
65 QVariantMap details; |
|
66 |
|
67 public: |
|
68 virtual QStringList subTypes() const; |
|
69 |
|
70 slots: |
|
71 virtual void value(const QString& subType,const QVariant& info); //for any contact |
|
72 virtual bool setValue( const QString & key, const QVariant & value );//for self contact only |
|
73 |
|
74 signals: |
|
75 virtual void detailsUpdated(const QString& key); //for setvalue on self contact |
|
76 }; |
|
77 #endif // SMFPROFILE_H |
|