Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mir_client_host_connection.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: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_NESTED_MIR_CLIENT_HOST_CONNECTION_H_
20 #define MIR_GRAPHICS_NESTED_MIR_CLIENT_HOST_CONNECTION_H_
21 
22 #include "host_connection.h"
24 
25 #include <string>
26 
27 struct MirConnection;
28 
29 namespace msh = mir::shell;
30 
31 namespace mir
32 {
33 namespace graphics
34 {
35 namespace nested
36 {
37 
39 {
40 public:
41  MirClientHostConnection(std::string const& host_socket, std::string const& name, std::shared_ptr<msh::HostLifecycleEventListener> const& host_lifecycle_event_listener);
43 
44  std::vector<int> platform_fd_items() override;
45  EGLNativeDisplayType egl_native_display() override;
46  std::shared_ptr<MirDisplayConfiguration> create_display_config() override;
47  std::shared_ptr<HostSurface> create_surface(MirSurfaceParameters const&) override;
48  void set_display_config_change_callback(std::function<void()> const& cb) override;
50 
51  void drm_auth_magic(int magic) override;
52  void drm_set_gbm_device(struct gbm_device* dev) override;
53 
54 private:
55  MirConnection* const mir_connection;
56  std::function<void()> conf_change_callback;
57  std::shared_ptr<msh::HostLifecycleEventListener> const host_lifecycle_event_listener;
58 };
59 
60 }
61 }
62 }
63 
64 #endif /* MIR_GRAPHICS_NESTED_MIR_CLIENT_HOST_CONNECTION_H_ */
All things Mir.
Definition: aging_buffer.h:24
Definition: client_types.h:266
Definition: session_manager.h:31
void drm_set_gbm_device(struct gbm_device *dev) override
Definition: mir_client_host_connection.h:38
std::shared_ptr< HostSurface > create_surface(MirSurfaceParameters const &) override
std::shared_ptr< MirDisplayConfiguration > create_display_config() override
Definition: host_connection.h:53
EGLNativeDisplayType egl_native_display() override
void apply_display_config(MirDisplayConfiguration &) override
void set_display_config_change_callback(std::function< void()> const &cb) override
MirClientHostConnection(std::string const &host_socket, std::string const &name, std::shared_ptr< msh::HostLifecycleEventListener > const &host_lifecycle_event_listener)
Definition: mir_client_host_connection.cpp:88
Definition: mir_connection.h:72
MirSurfaceParameters is the structure of minimum required information that you must provide to Mir in...
Definition: client_types.h:135
std::vector< int > platform_fd_items() override

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