2
* Copyright © 2016 Canonical Ltd.
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,
6
* as published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
19
#ifndef MIR_DISPLAY_CONFIGURATION_MULTIPLEXER_H_
20
#define MIR_DISPLAY_CONFIGURATION_MULTIPLEXER_H_
22
#include "mir/observer_registrar.h"
23
#include "mir/observer_multiplexer.h"
24
#include "mir/graphics/display_configuration_observer.h"
30
class DisplayConfigurationObserverMultiplexer : public ObserverMultiplexer<DisplayConfigurationObserver>
33
DisplayConfigurationObserverMultiplexer(std::shared_ptr<Executor> const& default_executor);
35
void initial_configuration(std::shared_ptr<DisplayConfiguration const> const& config) override;
37
void configuration_applied(std::shared_ptr<DisplayConfiguration const> const& config) override;
39
void base_configuration_updated(std::shared_ptr<DisplayConfiguration const> const& base_config) override;
41
void configuration_failed(
42
std::shared_ptr<DisplayConfiguration const> const& attempted,
43
std::exception const& error) override;
45
void catastrophic_configuration_error(
46
std::shared_ptr<DisplayConfiguration const> const& failed_fallback,
47
std::exception const& error) override;
50
std::shared_ptr<Executor> const executor;
56
#endif //MIR_DISPLAY_CONFIGURATION_MULTIPLEXER_H_