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 graphics
27 {
28 class PlatformIpcOperations;
29 class GraphicBufferAllocator;
30 }
31 namespace input
32 {
33 class CursorImages;
34 }
35 
36 namespace scene
37 {
38 class ApplicationNotRespondingDetector;
39 class CoordinateTranslator;
40 }
41 
42 namespace frontend
43 {
44 class Shell;
45 class SessionMediatorReport;
46 class DisplayChanger;
47 class Screencast;
48 class SessionAuthorizer;
49 class EventSinkFactory;
50 
52 {
53 public:
54  explicit DefaultIpcFactory(
55  std::shared_ptr<Shell> const& shell,
56  std::shared_ptr<SessionMediatorReport> const& sm_report,
57  std::shared_ptr<graphics::PlatformIpcOperations> const& platform_ipc_operations,
58  std::shared_ptr<DisplayChanger> const& display_changer,
59  std::shared_ptr<graphics::GraphicBufferAllocator> const& buffer_allocator,
60  std::shared_ptr<Screencast> const& screencast,
61  std::shared_ptr<SessionAuthorizer> const& session_authorizer,
62  std::shared_ptr<input::CursorImages> const& cursor_images,
63  std::shared_ptr<scene::CoordinateTranslator> const& translator,
64  std::shared_ptr<scene::ApplicationNotRespondingDetector> const& anr_detector);
65 
66  std::shared_ptr<detail::DisplayServer> make_ipc_server(
67  SessionCredentials const &creds,
68  std::shared_ptr<EventSinkFactory> const& sink_factory,
69  std::shared_ptr<MessageSender> const& message_sender,
70  ConnectionContext const &connection_context) override;
71 
72  virtual std::shared_ptr<ResourceCache> resource_cache() override;
73 
74  virtual std::shared_ptr<detail::DisplayServer> make_mediator(
75  std::shared_ptr<Shell> const& shell,
76  std::shared_ptr<graphics::PlatformIpcOperations> const& platform_ipc_operations,
77  std::shared_ptr<DisplayChanger> const& changer,
78  std::shared_ptr<graphics::GraphicBufferAllocator> const& buffer_allocator,
79  std::shared_ptr<SessionMediatorReport> const& sm_report,
80  std::shared_ptr<EventSinkFactory> const& sink_factory,
81  std::shared_ptr<MessageSender> const& message_sender,
82  std::shared_ptr<Screencast> const& effective_screencast,
83  ConnectionContext const& connection_context,
84  std::shared_ptr<input::CursorImages> const& cursor_images);
85 
86 private:
87  std::shared_ptr<Shell> const shell;
88  std::shared_ptr<Shell> const no_prompt_shell;
89  std::shared_ptr<SessionMediatorReport> const sm_report;
90  std::shared_ptr<ResourceCache> const cache;
91  std::shared_ptr<graphics::PlatformIpcOperations> const platform_ipc_operations;
92  std::shared_ptr<DisplayChanger> const display_changer;
93  std::shared_ptr<graphics::GraphicBufferAllocator> const buffer_allocator;
94  std::shared_ptr<Screencast> const screencast;
95  std::shared_ptr<SessionAuthorizer> const session_authorizer;
96  std::shared_ptr<input::CursorImages> const cursor_images;
97  std::shared_ptr<scene::CoordinateTranslator> const translator;
98  std::shared_ptr<scene::ApplicationNotRespondingDetector> const anr_detector;
99 };
100 }
101 }
102 
103 #endif /* MIR_FRONTEND_DEFAULT_IPC_FACTORY_H_ */
All things Mir.
Definition: atomic_callback.h:25
virtual std::shared_ptr< ResourceCache > resource_cache() override
Definition: default_ipc_factory.cpp:105
Definition: session_credentials.h:27
Definition: default_ipc_factory.h:51
DefaultIpcFactory(std::shared_ptr< Shell > const &shell, std::shared_ptr< SessionMediatorReport > const &sm_report, std::shared_ptr< graphics::PlatformIpcOperations > const &platform_ipc_operations, std::shared_ptr< DisplayChanger > const &display_changer, std::shared_ptr< graphics::GraphicBufferAllocator > const &buffer_allocator, std::shared_ptr< Screencast > const &screencast, std::shared_ptr< SessionAuthorizer > const &session_authorizer, std::shared_ptr< input::CursorImages > const &cursor_images, std::shared_ptr< scene::CoordinateTranslator > const &translator, std::shared_ptr< scene::ApplicationNotRespondingDetector > const &anr_detector)
Definition: default_ipc_factory.cpp:35
Definition: connection_context.h:32
Definition: protobuf_ipc_factory.h:41
std::shared_ptr< detail::DisplayServer > make_ipc_server(SessionCredentials const &creds, std::shared_ptr< EventSinkFactory > const &sink_factory, std::shared_ptr< MessageSender > const &message_sender, ConnectionContext const &connection_context) override
Definition: default_ipc_factory.cpp:61
virtual std::shared_ptr< detail::DisplayServer > make_mediator(std::shared_ptr< Shell > const &shell, std::shared_ptr< graphics::PlatformIpcOperations > const &platform_ipc_operations, std::shared_ptr< DisplayChanger > const &changer, std::shared_ptr< graphics::GraphicBufferAllocator > const &buffer_allocator, std::shared_ptr< SessionMediatorReport > const &sm_report, std::shared_ptr< EventSinkFactory > const &sink_factory, std::shared_ptr< MessageSender > const &message_sender, std::shared_ptr< Screencast > const &effective_screencast, ConnectionContext const &connection_context, std::shared_ptr< input::CursorImages > const &cursor_images)
Definition: default_ipc_factory.cpp:110

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015