Mir
scene_report.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: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 
20 #ifndef MIR_REPORT_LOGGING_SCENE_REPORT_H_
21 #define MIR_REPORT_LOGGING_SCENE_REPORT_H_
22 
23 #include "mir/scene/scene_report.h"
24 
25 #include <map>
26 #include <memory>
27 #include <mutex>
28 
29 namespace mir
30 {
31 namespace logging
32 {
33 class Logger;
34 }
35 namespace report
36 {
37 namespace logging
38 {
39 
41 {
42 public:
43  SceneReport(std::shared_ptr<mir::logging::Logger> const& log);
44 
45  void surface_created(BasicSurfaceId id, std::string const& name);
46  void surface_added(BasicSurfaceId id, std::string const& name);
47  void surface_removed(BasicSurfaceId id, std::string const& name);
48  void surface_deleted(BasicSurfaceId id, std::string const& name);
49 
50 private:
51  std::shared_ptr<mir::logging::Logger> const logger;
52 
53  std::mutex mutex;
54  std::map<BasicSurfaceId, std::string> surfaces;
55 };
56 }
57 }
58 }
59 
60 #endif /* MIR_REPORT_LOGGING_SCENE_REPORT_H_ */
All things Mir.
Definition: atomic_callback.h:25
Definition: scene_report.h:29
void log(ml::Severity severity, std::string const &message)
Definition: logger.cpp:78
surface_removed
Definition: scene_report_tp.h:46
surface_added
Definition: scene_report_tp.h:41
Definition: scene_report.h:40
surface_deleted
Definition: scene_report_tp.h:51

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