~brandontschaefer/mir/first-round-deprecation

« back to all changes in this revision

Viewing changes to src/server/graphics/display_configuration_observer_multiplexer.h

  • Committer: Brandon Schaefer
  • Date: 2016-12-13 17:59:30 UTC
  • mfrom: (3787.1.93 development-branch)
  • Revision ID: brandon.schaefer@canonical.com-20161213175930-j9o7qn0b11n3kzlm
* Merge trunk, fix conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2016 Canonical Ltd.
 
3
 *
 
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.
 
7
 *
 
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.
 
12
 *
 
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/>.
 
15
 *
 
16
 * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
 
17
 */
 
18
 
 
19
#ifndef MIR_DISPLAY_CONFIGURATION_MULTIPLEXER_H_
 
20
#define MIR_DISPLAY_CONFIGURATION_MULTIPLEXER_H_
 
21
 
 
22
#include "mir/observer_registrar.h"
 
23
#include "mir/observer_multiplexer.h"
 
24
#include "mir/graphics/display_configuration_observer.h"
 
25
 
 
26
namespace mir
 
27
{
 
28
namespace graphics
 
29
{
 
30
class DisplayConfigurationObserverMultiplexer : public ObserverMultiplexer<DisplayConfigurationObserver>
 
31
{
 
32
public:
 
33
    DisplayConfigurationObserverMultiplexer(std::shared_ptr<Executor> const& default_executor);
 
34
 
 
35
    void initial_configuration(std::shared_ptr<DisplayConfiguration const> const& config) override;
 
36
 
 
37
    void configuration_applied(std::shared_ptr<DisplayConfiguration const> const& config) override;
 
38
 
 
39
    void base_configuration_updated(std::shared_ptr<DisplayConfiguration const> const& base_config) override;
 
40
 
 
41
    void configuration_failed(
 
42
        std::shared_ptr<DisplayConfiguration const> const& attempted,
 
43
        std::exception const& error) override;
 
44
 
 
45
    void catastrophic_configuration_error(
 
46
        std::shared_ptr<DisplayConfiguration const> const& failed_fallback,
 
47
        std::exception const& error) override;
 
48
 
 
49
private:
 
50
    std::shared_ptr<Executor> const executor;
 
51
};
 
52
 
 
53
}
 
54
}
 
55
 
 
56
#endif //MIR_DISPLAY_CONFIGURATION_MULTIPLEXER_H_