Mir
platform_ipc_operations.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 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_GRAPHICS_PLATFORM_IPC_OPERATIONS_H_
20 #define MIR_GRAPHICS_PLATFORM_IPC_OPERATIONS_H_
21 
22 #include "platform_ipc_package.h"
23 #include <memory>
24 
25 namespace mir
26 {
27 namespace graphics
28 {
29 enum class BufferIpcMsgType
30 {
31  full_msg, //pack the full ipc representation of the buffer
32  update_msg //assume the client has a full representation, and pack only updates to the buffer
33 };
34 class Buffer;
35 class BufferIpcMessage;
37 
39 {
40 public:
41  virtual ~PlatformIpcOperations() = default;
53  virtual void pack_buffer(BufferIpcMessage& message, Buffer const& buffer, BufferIpcMsgType msg_type) const = 0;
54 
63  virtual void unpack_buffer(BufferIpcMessage& message, Buffer const& buffer) const = 0;
64 
70  virtual std::shared_ptr<PlatformIPCPackage> connection_ipc_package() = 0;
71 
72 
79  virtual PlatformOperationMessage platform_operation(
80  unsigned int const opcode, PlatformOperationMessage const& message) = 0;
81 
82 protected:
83  PlatformIpcOperations() = default;
85  PlatformIpcOperations& operator=(PlatformIpcOperations const&) = delete;
86 
87 };
88 
89 }
90 }
91 
92 #endif /* MIR_GRAPHICS_BUFFER_IPC_PACKER_H_ */
Definition: as_render_target.h:27
BufferIpcMsgType
Definition: platform_ipc_operations.h:29
Definition: platform_ipc_operations.h:38
Definition: buffer.h:44
Definition: platform_operation_message.h:30

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 13:49:26 UTC 2017