summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/UEvent.h')
-rw-r--r--daemon/UEvent.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/daemon/UEvent.h b/daemon/UEvent.h
new file mode 100644
index 0000000..2f7ef2c
--- /dev/null
+++ b/daemon/UEvent.h
@@ -0,0 +1,36 @@
1/**
2 * Copyright (C) ARM Limited 2013-2014. All rights reserved.
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 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef UEVENT_H
10#define UEVENT_H
11
12struct UEventResult {
13 const char *mAction;
14 const char *mDevPath;
15 const char *mSubsystem;
16 char mBuf[1<<13];
17};
18
19class UEvent {
20public:
21 UEvent();
22 ~UEvent();
23
24 bool init();
25 bool read(UEventResult *const result);
26 int getFd() const { return mFd; }
27
28private:
29 int mFd;
30
31 // Intentionally undefined
32 UEvent(const UEvent &);
33 UEvent &operator=(const UEvent &);
34};
35
36#endif // UEVENT_H