Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 <memory>
23 
24 namespace mir
25 {
26 namespace graphics
27 {
28 enum class BufferIpcMsgType
29 {
30  full_msg, //pack the full ipc representation of the buffer
31  update_msg //assume the client has a full representation, and pack only updates to the buffer
32 };
33 class Buffer;
34 class BufferIpcMessage;
35 struct PlatformIPCPackage;
36 
38 {
39 public:
40  virtual ~PlatformIpcOperations() = default;
52  virtual void pack_buffer(BufferIpcMessage& message, Buffer const& buffer, BufferIpcMsgType msg_type) const = 0;
53 
62  virtual void unpack_buffer(BufferIpcMessage& message, Buffer const& buffer) const = 0;
63 
69  virtual std::shared_ptr<PlatformIPCPackage> connection_ipc_package() = 0;
70 
71 protected:
72  PlatformIpcOperations() = default;
75 
76 };
77 
78 }
79 }
80 
81 #endif /* MIR_GRAPHICS_BUFFER_IPC_PACKER_H_ */
All things Mir.
Definition: aging_buffer.h:24
PlatformIpcOperations & operator=(PlatformIpcOperations const &)=delete
BufferIpcMsgType
Definition: platform_ipc_operations.h:28
Definition: buffer_ipc_message.h:32
virtual void unpack_buffer(BufferIpcMessage &message, Buffer const &buffer) const =0
Arranges the IPC package for a buffer that was sent over IPC client to server.
Definition: platform_ipc_operations.h:37
virtual ~PlatformIpcOperations()=default
virtual void pack_buffer(BufferIpcMessage &message, Buffer const &buffer, BufferIpcMsgType msg_type) const =0
Arranges the IPC package for a buffer that is to be sent through the frontend from server to client...
Definition: buffer.h:34
virtual std::shared_ptr< PlatformIPCPackage > connection_ipc_package()=0
Gets the connection package for the platform.

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