20 #ifndef MIR_TEST_STUB_SERVER_TOOL_H_
21 #define MIR_TEST_STUB_SERVER_TOOL_H_
23 #include "mir_protobuf.pb.h"
24 #include <condition_variable>
40 const mir::protobuf::SurfaceParameters* request,
41 mir::protobuf::Surface* response,
42 google::protobuf::Closure* done)
override
44 response->mutable_id()->set_value(13);
45 response->set_width(request->width());
46 response->set_height(request->height());
47 response->set_pixel_format(request->pixel_format());
48 response->mutable_buffer()->set_buffer_id(22);
50 std::unique_lock<std::mutex> lock(
guard);
58 ::google::protobuf::RpcController* ,
60 ::mir::protobuf::Buffer* response,
61 ::google::protobuf::Closure* done)
override
63 response->set_buffer_id(22);
65 std::unique_lock<std::mutex> lock(
guard);
73 ::mir::protobuf::Void* ,
74 ::google::protobuf::Closure* done)
override
81 ::google::protobuf::RpcController*,
82 const ::mir::protobuf::ConnectParameters* request,
83 ::mir::protobuf::Connection*,
84 ::google::protobuf::Closure* done)
override
86 app_name = request->application_name();
90 virtual void disconnect(google::protobuf::RpcController* ,
91 const mir::protobuf::Void* ,
92 mir::protobuf::Void* ,
93 google::protobuf::Closure* done)
override
95 std::unique_lock<std::mutex> lock(
guard);
101 const mir::protobuf::DRMMagic* request,
102 mir::protobuf::DRMAuthMagicStatus* response,
103 google::protobuf::Closure* done)
override
105 std::unique_lock<std::mutex> lock(
guard);
107 response->set_status_code(0);
113 const ::mir::protobuf::DisplayConfiguration*,
114 ::mir::protobuf::DisplayConfiguration*,
115 ::google::protobuf::Closure* done)
override