~ci-train-bot/online-accounts-api/online-accounts-api-ubuntu-zesty-2222

« back to all changes in this revision

Viewing changes to src/lib/OnlineAccounts/manager_p.h

  • Committer: Bileto Bot
  • Author(s): Alberto Mardegan
  • Date: 2016-11-10 09:13:15 UTC
  • mfrom: (26.4.27 providers-1627001)
  • Revision ID: ci-train-bot@canonical.com-20161110091315-imfazs4gg2mn3mea
Add provider information to public API

Allow clients to retrieve the list of available service providers, consisting of translated display name and icon URL.
Also, add a service() method to the Account class, to get the data associated with each account. (LP: #1627001, #1638769)

Approved by: Alexandre Abreu

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
    Account *ensureAccount(const AccountInfo &info);
60
60
 
 
61
    static Service serviceFromMap(const QVariantMap &map);
 
62
    Service service(const QString &serviceId) {
 
63
        return m_services.value(serviceId);
 
64
    }
 
65
 
61
66
private:
62
67
    void retrieveAccounts();
63
68
 
71
76
    DBusInterface m_daemon;
72
77
    QDBusPendingCallWatcher *m_getAccountsCall;
73
78
    QMap<QPair<AccountId,QString>,AccountData> m_accounts;
 
79
    QMap<QString,Service> m_services;
74
80
    mutable Manager *q_ptr;
75
81
};
76
82