Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: udev_listener.h

Issue 6854002: Merge monitor_reconfigure into powerd. (Closed) Base URL: ssh://gitrw.chromium.org:9222/power_manager.git@master
Patch Set: Round 5 Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef POWER_MANAGER_UDEV_LISTENER_H_
6 #define POWER_MANAGER_UDEV_LISTENER_H_
7
8 #include <string>
9
10 #include <glib.h>
11 #include <libudev.h>
12
13 namespace power_manager {
14
15 class UdevCallback {
16 public:
17 virtual ~UdevCallback() {}
18 virtual void Run(GIOChannel* source, GIOCondition condition) = 0;
19 };
20
21 class UdevListener {
22 public:
23 UdevListener(UdevCallback* callback, std::string subsystem);
Daniel Erat 2011/04/14 19:18:46 nit: const std::string&
marcheu 2011/04/14 19:54:57 Done.
24 ~UdevListener();
25 bool Init();
26
27 private:
28 static gboolean EventHandler(GIOChannel* source,
29 GIOCondition condition,
30 gpointer data);
31
32 // Callback on udev event; not owned.
33 UdevCallback* callback_;
34
35 struct udev_monitor* monitor_;
36 struct udev* udev_;
37 std::string subsystem_;
38 };
Daniel Erat 2011/04/14 19:18:46 include "base/basictypes.h" and add DISALLOW_COPY_
marcheu 2011/04/14 19:54:57 Done.
39
40 } // namespace power_manager
41
42 #endif // POWER_MANAGER_UDEV_LISTENER_H_
OLDNEW
« powerd_unittest.cc ('K') | « resolution_selector_unittest.cc ('k') | udev_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698