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