/usr/include/mirserver/mir/scene/prompt_session_manager.h is in libmirserver-dev 0.26.3+16.04.20170605-0ubuntu1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | /*
* Copyright © 2014 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authored By: Nick Dedekind <nick.dedekind@canonical.com>
*/
#ifndef MIR_SCENE_PROMPT_SESSION_MANAGER_H_
#define MIR_SCENE_PROMPT_SESSION_MANAGER_H_
#include <sys/types.h>
#include <memory>
#include <functional>
namespace mir
{
namespace scene
{
class Session;
class PromptSession;
struct PromptSessionCreationParameters;
class PromptSessionManager
{
public:
virtual ~PromptSessionManager() = default;
/**
* Start a new prompt session
* \param [in] session The prompt helper session
* \param [in] params The creation parameters for constructing the prompt session
*/
virtual std::shared_ptr<PromptSession> start_prompt_session_for(std::shared_ptr<Session> const& session,
PromptSessionCreationParameters const& params) const = 0;
/**
* Stop a started prompt session
* \param [in] prompt_session The prompt session
*/
virtual void stop_prompt_session(std::shared_ptr<PromptSession> const& prompt_session) const = 0;
/**
* Suspend a prompt session
* \param [in] prompt_session The prompt session
*/
virtual void suspend_prompt_session(std::shared_ptr<PromptSession> const& prompt_session) const = 0;
/**
* Resume a suspended prompt session
* \param [in] prompt_session The prompt session
*/
virtual void resume_prompt_session(std::shared_ptr<PromptSession> const& prompt_session) const = 0;
/**
* Add a prompt provider to an existing prompt session
* \param [in] prompt_session The prompt session
* \param [in] prompt_provider The prompt provider to add to the prompt session
*/
virtual void add_prompt_provider(std::shared_ptr<PromptSession> const& prompt_session,
std::shared_ptr<Session> const& prompt_provider) const = 0;
/**
* Remove a session from all associated prompt sessions
* \param [in] session The new session that is to be removed
*/
virtual void remove_session(std::shared_ptr<Session> const& session) const = 0;
/**
* Retrieve the application session for a prompt session
* \param [in] prompt_session The prompt session
*/
virtual std::shared_ptr<Session> application_for(std::shared_ptr<PromptSession> const& prompt_session) const = 0;
/**
* Retrieve the helper session for a prompt session
* \param [in] prompt_session The prompt session
*/
virtual std::shared_ptr<Session> helper_for(std::shared_ptr<PromptSession> const& prompt_session) const = 0;
/**
* Iterate over all the prompt providers associated with a prompt session
* \param [in] prompt_session The prompt session
* \param [in] f The callback function to call for each provider
*/
virtual void for_each_provider_in(std::shared_ptr<PromptSession> const& prompt_session,
std::function<void(std::shared_ptr<Session> const& prompt_provider)> const& f) const = 0;
protected:
PromptSessionManager() = default;
PromptSessionManager(const PromptSessionManager&) = delete;
PromptSessionManager& operator=(const PromptSessionManager&) = delete;
};
}
}
#endif // MIR_SCENE_PROMPT_SESSION_MANAGER_H_
|