Mir
client_buffer_stream_factory.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 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: Robert Carr <robert.carr@canonical.com>
17  */
18 
19 #ifndef MIR_CLIENT_CLIENT_BUFFER_STREAM_FACTORY_H_
20 #define MIR_CLIENT_CLIENT_BUFFER_STREAM_FACTORY_H_
21 
22 #include "mir_protobuf.pb.h"
23 
25 #include "mir/geometry/size.h"
26 
27 #include <memory>
28 
29 class MirConnection;
30 namespace mir
31 {
32 namespace client
33 {
34 namespace rpc
35 {
36 class DisplayServer;
37 }
38 class ClientBufferStream;
39 class BufferStream;
40 
42 {
43 public:
44  virtual std::shared_ptr<ClientBufferStream> make_consumer_stream(
46  protobuf::BufferStream const& protobuf_bs, std::string const& surface_name, geometry::Size) = 0;
47  virtual std::shared_ptr<ClientBufferStream> make_producer_stream(
49  protobuf::BufferStream const& protobuf_bs, std::string const& surface_name, geometry::Size) = 0;
50 
51  // For creating buffer stream owned by client.
55  protobuf::BufferStreamParameters const& params,
56  mir_buffer_stream_callback callback, void* context) = 0;
57 
58 protected:
59  ClientBufferStreamFactory() = default;
60  virtual ~ClientBufferStreamFactory() = default;
63 };
64 }
65 }
66 
67 #endif // MIR_CLIENT_CLIENT_BUFFER_STREAM_FACTORY_H_
Definition: size.h:30
All things Mir.
Definition: atomic_callback.h:25
void(* mir_buffer_stream_callback)(MirBufferStream *stream, void *client_context)
Callback to be passed when calling:
Definition: client_types.h:84
virtual std::shared_ptr< ClientBufferStream > make_consumer_stream(MirConnection *, client::rpc::DisplayServer &server, protobuf::BufferStream const &protobuf_bs, std::string const &surface_name, geometry::Size)=0
Definition: client_buffer_stream_factory.h:41
virtual std::shared_ptr< ClientBufferStream > make_producer_stream(MirConnection *, client::rpc::DisplayServer &server, protobuf::BufferStream const &protobuf_bs, std::string const &surface_name, geometry::Size)=0
Definition: client_buffer_stream.h:45
Definition: mir_connection.h:88
ClientBufferStreamFactory & operator=(const ClientBufferStreamFactory &)=delete
virtual ~ClientBufferStreamFactory()=default
Definition: mir_display_server.h:33

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