Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 Platform;
29 class GraphicBufferAllocator;
30 }
31 namespace input
32 {
33 class CursorImages;
34 }
35 
36 namespace frontend
37 {
38 class Shell;
39 class SessionMediatorReport;
40 class DisplayChanger;
41 class Screencast;
42 class SessionAuthorizer;
43 
45 {
46 public:
47  explicit DefaultIpcFactory(
48  std::shared_ptr<Shell> const& shell,
49  std::shared_ptr<SessionMediatorReport> const& sm_report,
50  std::shared_ptr<graphics::Platform> const& graphics_platform,
51  std::shared_ptr<DisplayChanger> const& display_changer,
52  std::shared_ptr<graphics::GraphicBufferAllocator> const& buffer_allocator,
53  std::shared_ptr<Screencast> const& screencast,
54  std::shared_ptr<SessionAuthorizer> const& session_authorizer,
55  std::shared_ptr<input::CursorImages> const& cursor_images);
56 
57  std::shared_ptr<detail::DisplayServer> make_ipc_server(
58  SessionCredentials const& creds,
59  std::shared_ptr<EventSink> const& sink,
60  ConnectionContext const& connection_context) override;
61 
62  virtual std::shared_ptr<ResourceCache> resource_cache() override;
63 
64  virtual std::shared_ptr<detail::DisplayServer> make_mediator(
65  std::shared_ptr<Shell> const& shell,
66  std::shared_ptr<graphics::Platform> const& graphics_platform,
67  std::shared_ptr<DisplayChanger> const& changer,
68  std::shared_ptr<graphics::GraphicBufferAllocator> const& buffer_allocator,
69  std::shared_ptr<SessionMediatorReport> const& sm_report,
70  std::shared_ptr<EventSink> const& sink,
71  std::shared_ptr<Screencast> const& effective_screencast,
72  ConnectionContext const& connection_context,
73  std::shared_ptr<input::CursorImages> const& cursor_images);
74 
75 private:
76  std::shared_ptr<Shell> const shell;
77  std::shared_ptr<Shell> const no_prompt_shell;
78  std::shared_ptr<SessionMediatorReport> const sm_report;
79  std::shared_ptr<ResourceCache> const cache;
80  std::shared_ptr<graphics::Platform> const graphics_platform;
81  std::shared_ptr<DisplayChanger> const display_changer;
82  std::shared_ptr<graphics::GraphicBufferAllocator> const buffer_allocator;
83  std::shared_ptr<Screencast> const screencast;
84  std::shared_ptr<SessionAuthorizer> const session_authorizer;
85  std::shared_ptr<input::CursorImages> const cursor_images;
86 };
87 }
88 }
89 
90 #endif /* MIR_FRONTEND_DEFAULT_IPC_FACTORY_H_ */
All things Mir.
Definition: aging_buffer.h:24
virtual std::shared_ptr< ResourceCache > resource_cache() override
Definition: default_ipc_factory.cpp:97
DefaultIpcFactory(std::shared_ptr< Shell > const &shell, std::shared_ptr< SessionMediatorReport > const &sm_report, std::shared_ptr< graphics::Platform > const &graphics_platform, 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)
Definition: default_ipc_factory.cpp:33
Definition: session_credentials.h:27
Definition: default_ipc_factory.h:44
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:55
virtual std::shared_ptr< detail::DisplayServer > make_mediator(std::shared_ptr< Shell > const &shell, std::shared_ptr< graphics::Platform > const &graphics_platform, 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:102

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