blob: 2f7ef2c93f5da1348a8282e78f102fabce113c79 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/**
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