aboutsummaryrefslogtreecommitdiff
path: root/daemon/UEvent.h
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2014-04-07 12:00:00 -0700
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:54:15 -0800
commit020278c1a682ea75ddb63fe4e0d373116935199f (patch)
tree697ac3d6fc26467eca30e00d0e6bed1d6f6f1c5b /daemon/UEvent.h
parentf1f81bcde6ec1647ad617d68b4626951e3c1d019 (diff)
gator: Version 5.185.18
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
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 @@
+/**
+ * Copyright (C) ARM Limited 2013-2014. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef UEVENT_H
+#define UEVENT_H
+
+struct UEventResult {
+ const char *mAction;
+ const char *mDevPath;
+ const char *mSubsystem;
+ char mBuf[1<<13];
+};
+
+class UEvent {
+public:
+ UEvent();
+ ~UEvent();
+
+ bool init();
+ bool read(UEventResult *const result);
+ int getFd() const { return mFd; }
+
+private:
+ int mFd;
+
+ // Intentionally undefined
+ UEvent(const UEvent &);
+ UEvent &operator=(const UEvent &);
+};
+
+#endif // UEVENT_H