~cemil-azizoglu/miral/mir-0.26.1-compat

« back to all changes in this revision

Viewing changes to miral-qt/src/platforms/mirserver/promptsessionlistener.cpp

  • Committer: Larry Price
  • Date: 2016-09-13 16:19:29 UTC
  • mto: (330.4.1 miral)
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: larry.price@canonical.com-20160913161929-vs9ka1capmljq1es
Removing miral-qt from release branch, updating copyright file, and adding GPL3 license to root dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2014-2015 Canonical, Ltd.
3
 
 *
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.
7
 
 *
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.
12
 
 *
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/>.
15
 
 */
16
 
 
17
 
#include "promptsessionlistener.h"
18
 
#include "logging.h"
19
 
 
20
 
namespace ms = mir::scene;
21
 
 
22
 
Q_DECLARE_METATYPE(std::shared_ptr<ms::PromptSession>)
23
 
 
24
 
PromptSessionListener::PromptSessionListener(QObject *parent) :
25
 
    QObject(parent)
26
 
{
27
 
    qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::PromptSessionListener - this=" << this;
28
 
    qRegisterMetaType<std::shared_ptr<ms::PromptSession>>("std::shared_ptr<mir::scene::PromptSession>");
29
 
}
30
 
 
31
 
PromptSessionListener::~PromptSessionListener()
32
 
{
33
 
    qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::~PromptSessionListener - this=" << this;
34
 
}
35
 
 
36
 
void PromptSessionListener::starting(std::shared_ptr<ms::PromptSession> const& prompt_session)
37
 
{
38
 
    qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::starting - this=" << this << "prompt_session=" << prompt_session.get();
39
 
    Q_EMIT promptSessionStarting(prompt_session);
40
 
}
41
 
 
42
 
void PromptSessionListener::stopping(std::shared_ptr<ms::PromptSession> const& prompt_session)
43
 
{
44
 
    qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::stopping - this=" << this << "prompt_session=" << prompt_session.get();
45
 
    Q_EMIT promptSessionStopping(prompt_session);
46
 
}
47
 
 
48
 
void PromptSessionListener::suspending(std::shared_ptr<ms::PromptSession> const& prompt_session)
49
 
{
50
 
    qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::suspending - this=" << this << "prompt_session=" << prompt_session.get();
51
 
    Q_EMIT promptSessionSuspending(prompt_session);
52
 
}
53
 
 
54
 
void PromptSessionListener::resuming(std::shared_ptr<ms::PromptSession> const& prompt_session)
55
 
{
56
 
    qCDebug(QTMIR_MIR_MESSAGES) << "PromptSessionListener::resuming - this=" << this << "prompt_session=" << prompt_session.get();
57
 
    Q_EMIT promptSessionResuming(prompt_session);
58
 
}
59
 
 
60
 
void PromptSessionListener::prompt_provider_added(ms::PromptSession const& prompt_session,
61
 
                                                  std::shared_ptr<ms::Session> const& prompt_provider)
62
 
{
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);
67
 
}
68
 
 
69
 
void PromptSessionListener::prompt_provider_removed(ms::PromptSession const& prompt_session,
70
 
                                                    std::shared_ptr<ms::Session> const& prompt_provider)
71
 
{
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);
76
 
}