Debian Codegraph @

online-accounts-plugins/lib/LomiriOnlineAccountsPlugin/account-manager.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2013 Canonical Ltd.
3 *
4 * Contact: Alberto Mardegan <[email protected]>
5 *
6 * This file is part of liblomiri-online-accounts-plugin
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "account-manager.h"
22
23 using namespace OnlineAccountsUi;
24 using namespace Accounts;
25
26 AccountManager *AccountManager::m_instance = 0;
27
28 AccountManager *AccountManager::instance()
29 {
30 if (!m_instance) {
31 m_instance = new AccountManager;
32 /* to ensure that all the installed services are parsed into
33 * libaccounts' DB, we enumerate them here.
34 * TODO: a click package hook would be a more proper fix.
35 */
36 m_instance->serviceList();
37 }
38
39 return m_instance;
40 }
41
42 AccountManager::AccountManager(QObject *parent):
43 Accounts::Manager(parent)
44 {
45 }
46
47 AccountManager::~AccountManager()
48 {
49 }