gator: Merge gator version 5.23.1
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / tools / gator / daemon / Monitor.h
1 /**
2  * Copyright (C) ARM Limited 2013-2015. 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         void close();
20         bool init();
21         bool add(const int fd);
22         int wait(struct epoll_event *const events, int maxevents, int timeout);
23
24 private:
25
26         int mFd;
27
28         // Intentionally unimplemented
29         Monitor(const Monitor &);
30         Monitor &operator=(const Monitor &);
31 };
32
33 #endif // MONITOR_H