Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
udev_environment.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
5  * it under the terms of the GNU 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 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:
17  * Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
18  */
19 
20 #ifndef MIR_TESTING_UDEV_ENVIRONMENT
21 #define MIR_TESTING_UDEV_ENVIRONMENT
22 
23 #include <string>
24 #include <initializer_list>
25 #include <umockdev.h>
26 #include <libudev.h>
27 
28 namespace mir
29 {
30 namespace mir_test_framework
31 {
33 {
34 public:
36  ~UdevEnvironment() noexcept;
37 
38  std::string add_device(char const* subsystem,
39  char const* name,
40  char const* parent,
41  std::initializer_list<char const*> attributes,
42  std::initializer_list<char const*> properties);
43  void remove_device(std::string const& device_path);
44  void emit_device_changed(std::string const& device_path);
45 
56  void add_standard_device(std::string const& name);
57 
58  UMockdevTestbed *testbed;
59  std::string const recordings_path;
60 };
61 
62 }
63 }
64 
65 #endif //MIR_TESTING_UDEV_ENVIRONMENT
std::string const recordings_path
Definition: udev_environment.h:59
void remove_device(std::string const &device_path)
void emit_device_changed(std::string const &device_path)
UMockdevTestbed * testbed
Definition: udev_environment.h:58
Definition: udev_environment.h:32
void add_standard_device(std::string const &name)
Add a device from the set of standard device traces.
std::string add_device(char const *subsystem, char const *name, char const *parent, std::initializer_list< char const * > attributes, std::initializer_list< char const * > properties)

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014