| 17 | class Lock; |
| 18 | |
| 19 | class InotifyEventLoop { |
| 20 | public: |
| 21 | InotifyEventLoop( |
| 22 | int inotifyInstance, |
| 23 | InotifyService *inotifyService |
| 24 | ); |
| 25 | |
| 26 | bool isLooping(); |
| 27 | |
| 28 | void work(); |
| 29 | |
| 30 | ~InotifyEventLoop(); |
| 31 | private: |
| 32 | static const int BUFFER_SIZE = 8192; |
| 33 | struct InotifyRenameEvent { |
| 34 | uint32_t cookie; |
| 35 | bool isDirectory; |
| 36 | bool isStarted; |
| 37 | std::string name; |
| 38 | int wd; |
| 39 | }; |
| 40 | |
| 41 | int mInotifyInstance; |
| 42 | InotifyService *mInotifyService; |
| 43 | |
| 44 | pthread_t mEventLoop; |
| 45 | std::mutex mMutex; |
| 46 | SingleshotSemaphore mLoopingSemaphore; |
| 47 | bool mStarted; |
| 48 | }; |
| 49 | |
| 50 | #endif |
nothing calls this directly
no outgoing calls
no test coverage detected