Mir
error_stream.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_CLIENT_ERROR_STREAM_H_
20 #define MIR_CLIENT_ERROR_STREAM_H_
21 #include "client_buffer_stream.h"
22 
23 namespace mir
24 {
25 namespace client
26 {
28 {
29 public:
31  std::string const& error_msg, MirConnection* conn,
32  frontend::BufferStreamId id, std::shared_ptr<MirWaitHandle> const& wh);
33 
36  std::shared_ptr<ClientBuffer> get_current_buffer();
37  uint32_t get_current_buffer_id();
39  MirWaitHandle* next_buffer(std::function<void()> const& done);
40  std::shared_ptr<MemoryRegion> secure_for_cpu_write();
41  int swap_interval() const;
42  MirWaitHandle* set_swap_interval(int interval);
46  MirWaitHandle* release(mir_buffer_stream_callback callback, void* context);
47  bool valid() const;
48  void buffer_available(mir::protobuf::Buffer const& buffer);
49  void buffer_unavailable();
51  MirWaitHandle* set_scale(float);
52  char const* get_error_message() const;
53  MirConnection* connection() const;
54 private:
55  std::string const error;
56  MirConnection* const connection_;
58  std::shared_ptr<MirWaitHandle> const wh;
59 };
60 }
61 }
62 #endif
Definition: size.h:30
MirWaitHandle * set_swap_interval(int interval)
Definition: error_stream.cpp:82
All things Mir.
Definition: atomic_callback.h:25
bool valid() const
Definition: error_stream.cpp:38
Definition: mir_wait_handle.h:31
void(* mir_buffer_stream_callback)(MirBufferStream *stream, void *client_context)
Callback to be passed when calling:
Definition: client_types.h:93
int swap_interval() const
Definition: error_stream.cpp:78
MirPlatformType platform_type()
Definition: error_stream.cpp:90
char const * get_error_message() const
Definition: error_stream.cpp:33
uint32_t get_current_buffer_id()
Definition: error_stream.cpp:61
Definition: mir_native_buffer.h:30
MirWaitHandle * next_buffer(std::function< void()> const &done)
Definition: error_stream.cpp:69
MirWaitHandle * get_create_wait_handle()
MirSurfaceParameters get_parameters() const
Definition: error_stream.cpp:53
MirWaitHandle * set_scale(float)
Definition: error_stream.cpp:94
void buffer_unavailable()
Definition: error_stream.cpp:100
std::shared_ptr< ClientBuffer > get_current_buffer()
Definition: error_stream.cpp:57
EGLNativeWindowType egl_native_window()
Definition: error_stream.cpp:65
Definition: error_stream.h:27
MirNativeBuffer * get_current_buffer_package()
Definition: error_stream.cpp:86
Definition: client_buffer_stream.h:69
MirConnection * connection() const
Definition: error_stream.cpp:43
frontend::BufferStreamId rpc_id() const
Definition: error_stream.cpp:48
Definition: mir_connection.h:96
#define EGLNativeWindowType
Definition: client_buffer_stream.h:56
void set_size(geometry::Size)
Definition: error_stream.cpp:101
ErrorStream(std::string const &error_msg, MirConnection *conn, frontend::BufferStreamId id, std::shared_ptr< MirWaitHandle > const &wh)
Definition: error_stream.cpp:23
MirPlatformType
The native buffer type for the system the client is connected on.
Definition: client_types.h:197
std::shared_ptr< MemoryRegion > secure_for_cpu_write()
Definition: error_stream.cpp:73
MirWaitHandle * release(mir_buffer_stream_callback callback, void *context)
void buffer_available(mir::protobuf::Buffer const &buffer)
Definition: error_stream.cpp:99
MirSurfaceParameters is the structure of minimum required information that you must provide to Mir in...
Definition: client_types.h:166

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016