Mir
null_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 General Public License version 2 or 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: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_TEST_DOUBLES_NULL_PLATFORM_IPC_OPERATIONS_H_
20 #define MIR_TEST_DOUBLES_NULL_PLATFORM_IPC_OPERATIONS_H_
21 
22 #include "mir/graphics/platform_ipc_operations.h"
23 #include "mir/graphics/platform_operation_message.h"
24 
25 namespace mir
26 {
27 namespace test
28 {
29 namespace doubles
30 {
31 class NullPlatformIpcOperations : public graphics::PlatformIpcOperations
32 {
33  public:
34  void pack_buffer(graphics::BufferIpcMessage&, graphics::Buffer const&, graphics::BufferIpcMsgType) const override
35  {
36  }
37  void unpack_buffer(graphics::BufferIpcMessage&, graphics::Buffer const&) const override
38  {
39  }
40  std::shared_ptr<graphics::PlatformIPCPackage> connection_ipc_package() override
41  {
42  return std::make_shared<graphics::PlatformIPCPackage>();
43  }
44  graphics::PlatformOperationMessage platform_operation(
45  unsigned int const, graphics::PlatformOperationMessage const&) override
46  {
47  return graphics::PlatformOperationMessage();
48  }
49 };
50 }
51 }
52 } // namespace mir
53 
54 #endif // MIR_TEST_DOUBLES_NULL_PLATFORM_IPC_OPERATIONS_H_
AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: sw_splash.h:26
void unpack_buffer(graphics::BufferIpcMessage &, graphics::Buffer const &) const override
Definition: null_platform_ipc_operations.h:37
Definition: null_platform_ipc_operations.h:31
void pack_buffer(graphics::BufferIpcMessage &, graphics::Buffer const &, graphics::BufferIpcMsgType) const override
Definition: null_platform_ipc_operations.h:34
std::shared_ptr< graphics::PlatformIPCPackage > connection_ipc_package() override
Definition: null_platform_ipc_operations.h:40
graphics::PlatformOperationMessage platform_operation(unsigned int const, graphics::PlatformOperationMessage const &) override
Definition: null_platform_ipc_operations.h:44

Copyright © 2012-2017 Canonical Ltd.
Generated on Wed Oct 11 15:14:10 UTC 2017