blob: 7194e0e4ca509a43782a3d17437e0c19ac7fbe8f [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 MONITOR_H
10#define MONITOR_H
11
12#include <sys/epoll.h>
13
14class Monitor {
15public:
16 Monitor();
17 ~Monitor();
18
19 void close();
20 bool init();
21 bool add(const int fd);
22 int wait(struct epoll_event *const events, int maxevents, int timeout);
23
24private:
25
26 int mFd;
27
28 // Intentionally unimplemented
29 Monitor(const Monitor &);
30 Monitor &operator=(const Monitor &);
31};
32
33#endif // MONITOR_H