Debian Codegraph @

tests/online-accounts-ui/mock/ui-server-mock.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2014 Canonical Ltd.
3 *
4 * Contact: Alberto Mardegan <[email protected]>
5 *
6 * This file is part of lomiri-online-accounts-ui
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 "ui-server-mock.h"
22
23 #include <QDebug>
24
25 using namespace OnlineAccountsUi;
26
27 static UiServer *m_instance = 0;
28
29 UiServerPrivate::UiServerPrivate(const QString &address,
30 UiServer *server):
31 QObject(server),
32 q_ptr(server),
33 m_address(address)
34 {
35 }
36
37 UiServerPrivate::~UiServerPrivate()
38 {
39 }
40
41 UiServer::UiServer(const QString &address,
42 QObject *parent):
43 QObject(parent),
44 d_ptr(new UiServerPrivate(address, this))
45 {
46 m_instance = this;
47 }
48
49 UiServer::~UiServer()
50 {
51 m_instance = 0;
52 }
53
54 UiServer *UiServer::instance()
55 {
56 return m_instance;
57 }
58
59 bool UiServer::init()
60 {
61 return true;
62 }