Add first stub methods to send window status updates from Android to host
This commit is contained in:
parent
a39c1b2bd2
commit
6ee8734cf3
10 changed files with 130 additions and 18 deletions
|
|
@ -48,10 +48,14 @@ public:
|
|||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) = 0;
|
||||
|
||||
virtual void handle_notification(anbox::protobuf::bridge::Notification const *request,
|
||||
virtual void update_window_state(anbox::protobuf::rpc::Void const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) = 0;
|
||||
|
||||
virtual void remove_window(anbox::protobuf::rpc::Void const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) = 0;
|
||||
|
||||
private:
|
||||
std::shared_ptr<rpc::PendingCallCache> pending_calls_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,10 +34,12 @@ PlatformMessageProcessor::~PlatformMessageProcessor() {
|
|||
}
|
||||
|
||||
void PlatformMessageProcessor::dispatch(rpc::Invocation const& invocation) {
|
||||
if (invocation.method_name() == "handle_notification")
|
||||
invoke(this, server_.get(), &PlatformApiSkeleton::handle_notification, invocation);
|
||||
else if (invocation.method_name() == "boot_finished")
|
||||
if (invocation.method_name() == "boot_finished")
|
||||
invoke(this, server_.get(), &PlatformApiSkeleton::boot_finished, invocation);
|
||||
else if (invocation.method_name() == "update_window_state")
|
||||
invoke(this, server_.get(), &PlatformApiSkeleton::update_window_state, invocation);
|
||||
else if (invocation.method_name() == "remove_window")
|
||||
invoke(this, server_.get(), &PlatformApiSkeleton::remove_window, invocation);
|
||||
}
|
||||
|
||||
void PlatformMessageProcessor::process_event_sequence(const std::string&) {
|
||||
|
|
|
|||
|
|
@ -33,15 +33,6 @@ PlatformApiSekeleton::PlatformApiSekeleton(const std::shared_ptr<rpc::PendingCal
|
|||
PlatformApiSekeleton::~PlatformApiSekeleton() {
|
||||
}
|
||||
|
||||
void PlatformApiSekeleton::handle_notification(anbox::protobuf::bridge::Notification const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) {
|
||||
(void) request;
|
||||
(void) response;
|
||||
DEBUG("");
|
||||
done->Run();
|
||||
}
|
||||
|
||||
void PlatformApiSekeleton::boot_finished(anbox::protobuf::rpc::Void const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) {
|
||||
|
|
@ -54,6 +45,28 @@ void PlatformApiSekeleton::boot_finished(anbox::protobuf::rpc::Void const *reque
|
|||
done->Run();
|
||||
}
|
||||
|
||||
void PlatformApiSekeleton::update_window_state(anbox::protobuf::rpc::Void const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) {
|
||||
(void) request;
|
||||
(void) response;
|
||||
|
||||
DEBUG("");
|
||||
|
||||
done->Run();
|
||||
}
|
||||
|
||||
void PlatformApiSekeleton::remove_window(anbox::protobuf::rpc::Void const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) {
|
||||
(void) request;
|
||||
(void) response;
|
||||
|
||||
DEBUG("");
|
||||
|
||||
done->Run();
|
||||
}
|
||||
|
||||
void PlatformApiSekeleton::on_boot_finished(const std::function<void()> &action) {
|
||||
on_boot_finished_action_ = action;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,11 +36,15 @@ public:
|
|||
PlatformApiSekeleton(const std::shared_ptr<rpc::PendingCallCache> &pending_calls);
|
||||
virtual ~PlatformApiSekeleton();
|
||||
|
||||
void handle_notification(anbox::protobuf::bridge::Notification const *request,
|
||||
void boot_finished(anbox::protobuf::rpc::Void const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) override;
|
||||
|
||||
void update_window_state(anbox::protobuf::rpc::Void const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) override;
|
||||
|
||||
void boot_finished(anbox::protobuf::rpc::Void const *request,
|
||||
void remove_window(anbox::protobuf::rpc::Void const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue