Emit error signal when login fails
[situare] / src / engine / contactmanagerprivate.h
1 #ifndef CONTACTMANAGERPRIVATE_H
2 #define CONTACTMANAGERPRIVATE_H
3
4 #include <QObject>
5
6 #include <QContactManager>
7
8 class ContactManager;
9
10 QTM_USE_NAMESPACE
11
12 /**
13 * @brief Manages phone address book contacts.
14 */
15 class ContactManagerPrivate : public QObject
16 {
17     Q_OBJECT
18
19 public:
20     /**
21     * @brief Constructor
22     *
23     * @param parent QObject
24     */
25     ContactManagerPrivate(QObject *parent = 0);
26
27 /*******************************************************************************
28 * MEMBER FUNCTIONS AND SLOTS
29 ******************************************************************************/
30 public:
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 private:
48     /**
49     * @brief Parses Facebook id from account URI.
50     *
51     * @param accountUri Accounts universal resource identifier.
52     * @return Facebook ID or empty if cannot parse the ID.
53     */
54     QString parseFacebookId(const QString &accountUri) const;
55
56 /******************************************************************************
57 * DATA MEMBERS
58 ******************************************************************************/
59 private:
60     QContactManager *m_manager;             ///< Contact manager
61     QHash<QString, QString> m_contactGuids; ///< List of contact GUIDS
62 };
63
64 #endif // CONTACTMANAGERPRIVATE_H