Mir
session.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 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: Robert Carr <racarr@canonical.com>
17  */
18 
19 #ifndef MIR_FRONTEND_SESSION_H_
20 #define MIR_FRONTEND_SESSION_H_
21 
22 #include "mir_toolkit/common.h"
25 
26 #include <memory>
27 #include <string>
28 
29 namespace mir
30 {
31 namespace graphics
32 {
33 class DisplayConfiguration;
34 struct BufferProperties;
35 }
36 
37 namespace frontend
38 {
39 class Surface;
40 class BufferStream;
41 
42 class Session
43 {
44 public:
45  virtual ~Session() = default;
46 
47  virtual std::shared_ptr<Surface> get_surface(SurfaceId surface) const = 0;
48 
49  virtual std::shared_ptr<BufferStream> get_buffer_stream(BufferStreamId stream) const = 0;
51  virtual void destroy_buffer_stream(BufferStreamId stream) = 0;
52 
53  virtual std::string name() const = 0;
54 
55 protected:
56  Session() = default;
57  Session(Session const&) = delete;
58  Session& operator=(Session const&) = delete;
59 };
60 
61 }
62 }
63 
64 #endif // MIR_FRONTEND_SESSION_H_
Definition: session.h:42
All things Mir.
Definition: atomic_callback.h:25
virtual std::shared_ptr< Surface > get_surface(SurfaceId surface) const =0
Session & operator=(Session const &)=delete
virtual std::shared_ptr< BufferStream > get_buffer_stream(BufferStreamId stream) const =0
virtual BufferStreamId create_buffer_stream(graphics::BufferProperties const &props)=0
virtual ~Session()=default
virtual void destroy_buffer_stream(BufferStreamId stream)=0
Buffer creation properties.
Definition: buffer_properties.h:48
virtual std::string name() const =0

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