accounts-qt 1.17
manager_p.h
1/* vi: set et sw=4 ts=4 cino=t0,(0: */
2/*
3 * This file is part of libaccounts-qt
4 *
5 * Copyright (C) 2009-2011 Nokia Corporation.
6 * Copyright (C) 2012-2016 Canonical Ltd.
7 *
8 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public License
12 * version 2.1 as published by the Free Software Foundation.
13 *
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 * 02110-1301 USA
23 */
24
25#include "account.h"
26#include "manager.h"
27
28#include <QHash>
29#include <QPointer>
30#include <libaccounts-glib.h>
31
32namespace Accounts {
33
34class Manager::Private
35{
36 Q_DECLARE_PUBLIC(Manager)
37
38public:
39 Private():
40 q_ptr(0),
41 m_manager(0)
42 {
43 }
44
45 ~Private() {
46 }
47
48 void init(Manager *q, AgManager *manager);
49
50 mutable Manager *q_ptr;
51 AgManager *m_manager; //real manager
52 Error lastError;
53 QHash<AccountId,QPointer<Account> > m_accounts;
54
55 static void on_account_created(Manager *self, AgAccountId id);
56 static void on_account_deleted(Manager *self, AgAccountId id);
57 static void on_account_updated(Manager *self, AgAccountId id);
58 static void on_enabled_event(Manager *self, AgAccountId id);
59};
60
61} //namespace Accounts