Mir
default_ipc_factory.h
Go to the documentation of this file.
1 /*
2  * Copyright © 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: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 #ifndef MIR_FRONTEND_DEFAULT_IPC_FACTORY_H_
20 #define MIR_FRONTEND_DEFAULT_IPC_FACTORY_H_
21 
22 #include "protobuf_ipc_factory.h"
23 
24 namespace mir
25 {
26 namespace cookie
27 {
28 class Authority;
29 }
30 namespace graphics
31 {
32 class PlatformIpcOperations;
33 class GraphicBufferAllocator;
34 }
35 namespace input
36 {
37 class CursorImages;
38 class InputDeviceHub;
39 }
40 
41 namespace scene
42 {
43 class ApplicationNotRespondingDetector;
44 class CoordinateTranslator;
45 }
46 
47 namespace frontend
48 {
49 class Shell;
50 class SessionMediatorReport;
51 class DisplayChanger;
52 class Screencast;
53 class SessionAuthorizer;
54 class EventSinkFactory;
55 
57 {
58 public:
59  explicit DefaultIpcFactory(
60  std::shared_ptr<Shell> const& shell,
61  std::shared_ptr<SessionMediatorReport> const& sm_report,
62  std::shared_ptr<graphics::PlatformIpcOperations> const& platform_ipc_operations,
63  std::shared_ptr<DisplayChanger> const& display_changer,
64  std::shared_ptr<graphics::GraphicBufferAllocator> const& buffer_allocator,
65  std::shared_ptr<Screencast> const& screencast,
66  std::shared_ptr<SessionAuthorizer> const& session_authorizer,
67  std::shared_ptr<input::CursorImages> const& cursor_images,
68  std::shared_ptr<scene::CoordinateTranslator> const& translator,
69  std::shared_ptr<scene::ApplicationNotRespondingDetector> const& anr_detector,
70  std::shared_ptr<cookie::Authority> const& cookie_authority,
71  std::shared_ptr<input::InputDeviceHub> const& seat);
72 
73  std::shared_ptr<detail::DisplayServer> make_ipc_server(
74  SessionCredentials const &creds,
75  std::shared_ptr<EventSinkFactory> const& sink_factory,
76  std::shared_ptr<MessageSender> const& message_sender,
77  ConnectionContext const &connection_context) override;
78 
79  virtual std::shared_ptr<ResourceCache> resource_cache() override;
80 
81  virtual std::shared_ptr<detail::DisplayServer> make_mediator(
82  std::shared_ptr<Shell> const& shell,
83  std::shared_ptr<graphics::PlatformIpcOperations> const& platform_ipc_operations,
84  std::shared_ptr<DisplayChanger> const& changer,
85  std::shared_ptr<graphics::GraphicBufferAllocator> const& buffer_allocator,
86  std::shared_ptr<SessionMediatorReport> const& sm_report,
87  std::shared_ptr<EventSinkFactory> const& sink_factory,
88  std::shared_ptr<MessageSender> const& message_sender,
89  std::shared_ptr<Screencast> const& effective_screencast,
90  ConnectionContext const& connection_context,
91  std::shared_ptr<input::CursorImages> const& cursor_images);
92 
93 private:
94  std::shared_ptr<Shell> const shell;
95  std::shared_ptr<Shell> const no_prompt_shell;
96  std::shared_ptr<SessionMediatorReport> const sm_report;
97  std::shared_ptr<ResourceCache> const cache;
98  std::shared_ptr<graphics::PlatformIpcOperations> const platform_ipc_operations;
99  std::shared_ptr<DisplayChanger> const display_changer;
100  std::shared_ptr<graphics::GraphicBufferAllocator> const buffer_allocator;
101  std::shared_ptr<Screencast> const screencast;
102  std::shared_ptr<SessionAuthorizer> const session_authorizer;
103  std::shared_ptr<input::CursorImages> const cursor_images;
104  std::shared_ptr<scene::CoordinateTranslator> const translator;
105  std::shared_ptr<scene::ApplicationNotRespondingDetector> const anr_detector;
106  std::shared_ptr<cookie::Authority> const cookie_authority;
107  std::shared_ptr<input::InputDeviceHub> const hub;
108 };
109 }
110 }
111 
112 #endif /* MIR_FRONTEND_DEFAULT_IPC_FACTORY_H_ */
All things Mir.
Definition: atomic_callback.h:25
Definition: session_credentials.h:27
Definition: default_ipc_factory.h:56
Definition: connection_context.h:32
Definition: protobuf_ipc_factory.h:41

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016