/* * Copyright © 2013-2014 Canonical Ltd. * * 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 warranty of * MERCHANTABILITY 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 . * * Authored by: Robert Carr * Andreas Pokorny */ #ifndef MIR_INPUT_ANDROID_DEFAULT_ANDROID_INPUT_CONFIGURATION_H_ #define MIR_INPUT_ANDROID_DEFAULT_ANDROID_INPUT_CONFIGURATION_H_ #include "mir/input/input_configuration.h" #include "mir/cached_ptr.h" namespace android { class InputReaderInterface; class InputReaderPolicyInterface; class InputListenerInterface; class EventHubInterface; } namespace droidinput = android; namespace mir { namespace input { class InputRegion; class CursorListener; class InputReport; class InputDispatcher; namespace android { class InputThread; class DefaultInputConfiguration : public mir::input::InputConfiguration { public: DefaultInputConfiguration(std::shared_ptr const& dispatcher, std::shared_ptr const& input_region, std::shared_ptr const& cursor_listener, std::shared_ptr const& input_report); virtual ~DefaultInputConfiguration(); std::shared_ptr the_input_channel_factory() override; std::shared_ptr the_input_manager() override; protected: virtual std::shared_ptr the_event_hub(); virtual std::shared_ptr the_reader(); virtual std::shared_ptr the_input_translator(); virtual std::shared_ptr the_reader_thread(); virtual std::shared_ptr the_reader_policy(); private: CachedPtr input_manager; CachedPtr reader_thread; CachedPtr event_hub; CachedPtr reader_policy; CachedPtr reader; std::shared_ptr const input_dispatcher; std::shared_ptr const input_region; std::shared_ptr const cursor_listener; std::shared_ptr const input_report; }; } } } // namespace mir #endif // MIR_INPUT_ANDROID_DEFAULT_ANDROID_INPUT_CONFIGURATION_H_