1539866d4ca6613bd916e560aaf28b6f2b878f68
[situare] / src / engine / contactmanager.h
1 #ifndef CONTACTMANAGER_H
2 #define CONTACTMANAGER_H
3
4 #include <QObject>
5 #include <QHash>
6
7 class ContactManagerPrivate;
8
9 /**
10 * @brief Manages phone address book contacts.
11 */
12 class ContactManager : public QObject
13 {
14     Q_OBJECT
15 public:
16     /**
17     * @brief Friend class for ContactManagerPrivate.
18     */
19     friend class ContactManagerPrivate;
20
21     /**
22     * @brief Constructor
23     *
24     * @param parent QObject
25     */
26     ContactManager(QObject *parent = 0);
27
28 /*******************************************************************************
29 * MEMBER FUNCTIONS AND SLOTS
30 ******************************************************************************/
31     /**
32     * @brief Returns contact's guid from contact's facebook ID.
33     *
34     * @param facebookId contact's facebook ID
35     * @return contact guid
36     */
37     QString contactGuid(const QString &facebookId) const;
38
39     /**
40     * @brief Requests contact guids.
41     *
42     * Guid is a globally unique ID of a contact, which can be used with
43     * other datastores.
44     */
45     void requestContactGuids();
46
47 /*******************************************************************************
48 * SIGNALS
49 ******************************************************************************/
50 signals:
51     /**
52     * @brief Signal for contacts guids added.
53     *
54     * Contact guids has Facebook ID as key and Guid as value.. Guid is a globally
55     * unique ID of a contact, which can be used with other datastores.
56     * @param contactGuids list of contact guids
57     */
58     void contactsGuidsAdded(const QHash<QString, QString> &contactGuids);
59
60 /******************************************************************************
61 * DATA MEMBERS
62 ******************************************************************************/
63 private:
64     ContactManagerPrivate *m_contactManagerPrivate; ///< ContactManagerPrivate
65 };
66
67 #endif // CONTACTMANAGER_H