X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fsrc%2Fanbox%2Fbridge%2Fplatform_api_skeleton.h;fp=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fsrc%2Fanbox%2Fbridge%2Fplatform_api_skeleton.h;h=02fe1d6ca3295dad4088df00057601cca081dd8f;hb=e26c1ec581be598521517829adba8c8dd23a768f;hp=0000000000000000000000000000000000000000;hpb=6699c1aea74eeb0eb400e6299079f0c7576f716f;p=iec.git diff --git a/src/type3_AndroidCloud/anbox-master/src/anbox/bridge/platform_api_skeleton.h b/src/type3_AndroidCloud/anbox-master/src/anbox/bridge/platform_api_skeleton.h new file mode 100644 index 0000000..02fe1d6 --- /dev/null +++ b/src/type3_AndroidCloud/anbox-master/src/anbox/bridge/platform_api_skeleton.h @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2016 Simon Fels + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + */ + +#ifndef ANBOX_BRIDGE_PLATFORM_SERVER_H_ +#define ANBOX_BRIDGE_PLATFORM_SERVER_H_ + +#include +#include + +namespace google { +namespace protobuf { +class Closure; +} // namespace protobuf +} // namespace google + +namespace anbox { +namespace protobuf { +namespace rpc { +class Void; +} // namespace rpc +namespace bridge { +class ClipboardData; +class BootFinishedEvent; +class WindowStateUpdateEvent; +class ApplicationListUpdateEvent; +} // namespace bridge +} // namespace protobuf +namespace platform { +class BasePlatform; +} // namespace platform +namespace rpc { +class PendingCallCache; +} // namespace rpc +namespace wm { +class Manager; +} // namespace wm +namespace application { +class Database; +} // namespace application +namespace bridge { +class PlatformApiSkeleton { + public: + PlatformApiSkeleton( + const std::shared_ptr &pending_calls, + const std::shared_ptr &platform, + const std::shared_ptr &window_manager, + const std::shared_ptr &app_db); + virtual ~PlatformApiSkeleton(); + + void set_clipboard_data(anbox::protobuf::bridge::ClipboardData const *request, + anbox::protobuf::rpc::Void *response, + google::protobuf::Closure *done); + void get_clipboard_data(anbox::protobuf::rpc::Void const *request, + anbox::protobuf::bridge::ClipboardData *response, + google::protobuf::Closure *done); + + void handle_boot_finished_event( + const anbox::protobuf::bridge::BootFinishedEvent &event); + void handle_window_state_update_event( + const anbox::protobuf::bridge::WindowStateUpdateEvent &event); + void handle_application_list_update_event( + const anbox::protobuf::bridge::ApplicationListUpdateEvent &event); + + void register_boot_finished_handler(const std::function &action); + + private: + std::shared_ptr pending_calls_; + std::shared_ptr platform_; + std::shared_ptr window_manager_; + std::shared_ptr app_db_; + std::function boot_finished_handler_; +}; +} // namespace bridge +} // namespace anbox + +#endif