Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
device_quirks.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser 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_GRAPHICS_ANDROID_DEVICE_QUIRKS_H_
20 #define MIR_GRAPHICS_ANDROID_DEVICE_QUIRKS_H_
21 
22 #include <hybris/properties/properties.h>
23 #include <string>
24 
25 namespace mir
26 {
27 namespace graphics
28 {
29 namespace android
30 {
32 {
33 public:
34  PropertiesWrapper() = default;
35  virtual ~PropertiesWrapper() = default;
36  virtual int property_get(
37  char const* key,
38  char* value,
39  char const* default_value) const = 0;
40 private:
41  PropertiesWrapper(PropertiesWrapper const&) = delete;
42  PropertiesWrapper& operator=(PropertiesWrapper const&) = delete;
43 };
44 
46 {
47 public:
48  int property_get(
49  char const* key,
50  char* value,
51  char const* default_value) const;
52 };
53 
55 {
56 public:
57  DeviceQuirks(PropertiesWrapper const& properties);
58 
59  unsigned int num_framebuffers() const;
60  bool gralloc_reopenable_after_close() const;
61 private:
62  DeviceQuirks(DeviceQuirks const&) = delete;
63  DeviceQuirks & operator=(DeviceQuirks const&) = delete;
64  std::string const device_name;
65  unsigned int const num_framebuffers_;
66  bool const gralloc_reopenable_after_close_;
67 };
68 }
69 }
70 }
71 #endif /* MIR_GRAPHICS_ANDROID_DEVICE_QUIRKS_H_ */
All things Mir.
Definition: aging_buffer.h:24
Definition: device_quirks.h:54
virtual int property_get(char const *key, char *value, char const *default_value) const =0
int property_get(char const *key, char *value, char const *default_value) const
Definition: device_quirks.cpp:23
DeviceQuirks(PropertiesWrapper const &properties)
Definition: device_quirks.cpp:56
Definition: device_quirks.h:45
Definition: device_quirks.h:31
bool gralloc_reopenable_after_close() const
Definition: device_quirks.cpp:68
Definition: android_input_receiver.h:32
unsigned int num_framebuffers() const
Definition: device_quirks.cpp:63

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014