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

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015