Mir
authorizing_display_changer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 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: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_FRONTEND_UNAUTHORIZED_DISPLAY_CHANGER_H_
20 #define MIR_FRONTEND_UNAUTHORIZED_DISPLAY_CHANGER_H_
21 
23 
24 namespace mir
25 {
26 namespace frontend
27 {
28 
41 {
42 public:
44  std::shared_ptr<frontend::DisplayChanger> const& changer,
45  bool configuration_is_authorized,
46  bool base_configuration_modification_is_authorized);
47 
48  std::shared_ptr<graphics::DisplayConfiguration> base_configuration() override;
49  void configure(
50  std::shared_ptr<frontend::Session> const&,
51  std::shared_ptr<graphics::DisplayConfiguration> const&) override;
53  std::shared_ptr<graphics::DisplayConfiguration> const&) override;
55  std::weak_ptr<Session> const&,
56  std::shared_ptr<graphics::DisplayConfiguration> const&,
57  std::chrono::seconds) override;
59  std::shared_ptr<Session> const&,
60  std::shared_ptr<graphics::DisplayConfiguration> const&) override;
61 
62 
63 private:
64  std::shared_ptr<frontend::DisplayChanger> const changer;
65 
66  bool const configure_display_is_allowed;
67  bool const set_base_configuration_is_allowed;
68 };
69 
70 }
71 }
72 
73 #endif /* MIR_FRONTEND_UNAUTHORIZED_DISPLAY_CHANGER_H_ */
std::shared_ptr< graphics::DisplayConfiguration > base_configuration() override
Definition: authorizing_display_changer.cpp:57
All things Mir.
Definition: atomic_callback.h:25
void preview_base_configuration(std::weak_ptr< Session > const &, std::shared_ptr< graphics::DisplayConfiguration > const &, std::chrono::seconds) override
Definition: authorizing_display_changer.cpp:81
void configure(std::shared_ptr< frontend::Session > const &, std::shared_ptr< graphics::DisplayConfiguration > const &) override
Definition: authorizing_display_changer.cpp:62
void set_base_configuration(std::shared_ptr< graphics::DisplayConfiguration > const &) override
Definition: authorizing_display_changer.cpp:72
AuthorizingDisplayChanger(std::shared_ptr< frontend::DisplayChanger > const &changer, bool configuration_is_authorized, bool base_configuration_modification_is_authorized)
Definition: authorizing_display_changer.cpp:47
Definition: display_changer.h:35
void confirm_base_configuration(std::shared_ptr< Session > const &, std::shared_ptr< graphics::DisplayConfiguration > const &) override
Definition: authorizing_display_changer.cpp:96
Adaptor to selectively permit display configuration calls.
Definition: authorizing_display_changer.h:40

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016