2
* Copyright (C) 2014-2015 Canonical, Ltd.
4
* This program is free software: you can redistribute it and/or modify it under
5
* the terms of the GNU Lesser General Public License version 3, as published by
6
* the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10
* SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
#include "promptsessionlistener.h"
20
namespace ms = mir::scene;
22
Q_DECLARE_METATYPE(std::shared_ptr<ms::PromptSession>)
24
PromptSessionListener::PromptSessionListener(QObject *parent) :
27
qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::PromptSessionListener - this=" << this;
28
qRegisterMetaType<std::shared_ptr<ms::PromptSession>>("std::shared_ptr<mir::scene::PromptSession>");
31
PromptSessionListener::~PromptSessionListener()
33
qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::~PromptSessionListener - this=" << this;
36
void PromptSessionListener::starting(std::shared_ptr<ms::PromptSession> const& prompt_session)
38
qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::starting - this=" << this << "prompt_session=" << prompt_session.get();
39
Q_EMIT promptSessionStarting(prompt_session);
42
void PromptSessionListener::stopping(std::shared_ptr<ms::PromptSession> const& prompt_session)
44
qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::stopping - this=" << this << "prompt_session=" << prompt_session.get();
45
Q_EMIT promptSessionStopping(prompt_session);
48
void PromptSessionListener::suspending(std::shared_ptr<ms::PromptSession> const& prompt_session)
50
qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::suspending - this=" << this << "prompt_session=" << prompt_session.get();
51
Q_EMIT promptSessionSuspending(prompt_session);
54
void PromptSessionListener::resuming(std::shared_ptr<ms::PromptSession> const& prompt_session)
56
qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::resuming - this=" << this << "prompt_session=" << prompt_session.get();
57
Q_EMIT promptSessionResuming(prompt_session);
60
void PromptSessionListener::prompt_provider_added(ms::PromptSession const& prompt_session,
61
std::shared_ptr<ms::Session> const& prompt_provider)
63
qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::prompt_provider_added - this=" << this
64
<< "prompt_session=" << &prompt_session
65
<< "prompt_provider=" << prompt_provider.get();
66
Q_EMIT promptProviderAdded(&prompt_session, prompt_provider);
69
void PromptSessionListener::prompt_provider_removed(ms::PromptSession const& prompt_session,
70
std::shared_ptr<ms::Session> const& prompt_provider)
72
qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::prompt_provider_removed - this=" << this
73
<< "prompt_session=" << &prompt_session
74
<< "prompt_provider=" << prompt_provider.get();
75
Q_EMIT promptProviderRemoved(&prompt_session, prompt_provider);