Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
shell.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012-2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Thomas Voss <thomas.voss@canonical.com>
17  */
18 
19 #ifndef MIR_FRONTEND_SHELL_H_
20 #define MIR_FRONTEND_SHELL_H_
21 
23 
24 #include <sys/types.h>
25 
26 #include <memory>
27 
28 namespace mir
29 {
30 namespace scene
31 {
32 struct SurfaceCreationParameters;
33 struct PromptSessionCreationParameters;
34 }
35 namespace frontend
36 {
37 class EventSink;
38 class Session;
39 class PromptSession;
40 
41 class Shell
42 {
43 public:
44  virtual ~Shell() = default;
45 
46  virtual std::shared_ptr<Session> open_session(
47  pid_t client_pid,
48  std::string const& name,
49  std::shared_ptr<EventSink> const& sink) = 0;
50 
51  virtual void close_session(std::shared_ptr<Session> const& session) = 0;
52 
53  virtual void handle_surface_created(std::shared_ptr<Session> const& session) = 0;
54 
55  virtual std::shared_ptr<PromptSession> start_prompt_session_for(std::shared_ptr<Session> const& session,
56  scene::PromptSessionCreationParameters const& params) = 0;
57  virtual void add_prompt_provider_for(std::shared_ptr<PromptSession> const& prompt_session,
58  std::shared_ptr<Session> const& session) = 0;
59  virtual void stop_prompt_session(std::shared_ptr<PromptSession> const& prompt_session) = 0;
60 
61 protected:
62  Shell() = default;
63  Shell(const Shell&) = delete;
64  Shell& operator=(const Shell&) = delete;
65 };
66 
67 }
68 }
69 
70 #endif // MIR_FRONTEND_SHELL_H_
All things Mir.
Definition: aging_buffer.h:24
Shell & operator=(const Shell &)=delete
virtual void add_prompt_provider_for(std::shared_ptr< PromptSession > const &prompt_session, std::shared_ptr< Session > const &session)=0
virtual std::shared_ptr< PromptSession > start_prompt_session_for(std::shared_ptr< Session > const &session, scene::PromptSessionCreationParameters const &params)=0
virtual ~Shell()=default
virtual void stop_prompt_session(std::shared_ptr< PromptSession > const &prompt_session)=0
Definition: shell.h:41
virtual void handle_surface_created(std::shared_ptr< Session > const &session)=0
virtual void close_session(std::shared_ptr< Session > const &session)=0
Definition: prompt_session_creation_parameters.h:29
virtual std::shared_ptr< Session > open_session(pid_t client_pid, std::string const &name, std::shared_ptr< EventSink > const &sink)=0

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014