2 * Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
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 3, as published
6 * by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef ANBOX_BRIDGE_PLATFORM_SERVER_H_
19 #define ANBOX_BRIDGE_PLATFORM_SERVER_H_
27 } // namespace protobuf
37 class BootFinishedEvent;
38 class WindowStateUpdateEvent;
39 class ApplicationListUpdateEvent;
41 } // namespace protobuf
44 } // namespace platform
46 class PendingCallCache;
51 namespace application {
53 } // namespace application
55 class PlatformApiSkeleton {
58 const std::shared_ptr<rpc::PendingCallCache> &pending_calls,
59 const std::shared_ptr<platform::BasePlatform> &platform,
60 const std::shared_ptr<wm::Manager> &window_manager,
61 const std::shared_ptr<application::Database> &app_db);
62 virtual ~PlatformApiSkeleton();
64 void set_clipboard_data(anbox::protobuf::bridge::ClipboardData const *request,
65 anbox::protobuf::rpc::Void *response,
66 google::protobuf::Closure *done);
67 void get_clipboard_data(anbox::protobuf::rpc::Void const *request,
68 anbox::protobuf::bridge::ClipboardData *response,
69 google::protobuf::Closure *done);
71 void handle_boot_finished_event(
72 const anbox::protobuf::bridge::BootFinishedEvent &event);
73 void handle_window_state_update_event(
74 const anbox::protobuf::bridge::WindowStateUpdateEvent &event);
75 void handle_application_list_update_event(
76 const anbox::protobuf::bridge::ApplicationListUpdateEvent &event);
78 void register_boot_finished_handler(const std::function<void()> &action);
81 std::shared_ptr<rpc::PendingCallCache> pending_calls_;
82 std::shared_ptr<platform::BasePlatform> platform_;
83 std::shared_ptr<wm::Manager> window_manager_;
84 std::shared_ptr<application::Database> app_db_;
85 std::function<void()> boot_finished_handler_;