source: trunk/WINDOW/aw_inotify.hxx

Last change on this file was 16551, checked in by westram, 7 years ago
File size: 1.2 KB
Line 
1// =============================================================== //
2//                                                                 //
3//   File      : aw_inotify.hxx                                    //
4//   Purpose   : watch file/directory changes                      //
5//                                                                 //
6//   Coded by Ralf Westram (coder@reallysoft.de) in October 2017   //
7//   http://www.arb-home.de/                                       //
8//                                                                 //
9// =============================================================== //
10
11#ifndef AW_INOTIFY_HXX
12#define AW_INOTIFY_HXX
13
14#ifndef CB_H
15#include <cb.h>
16#endif
17
18enum ChangeReason {
19    CR_MODIFIED,
20    CR_DELETED, // will be suppressed if the file still exists
21    CR_CREATED,
22};
23
24#define CHANGE_REASONS (CR_CREATED+1)
25
26DECLARE_CBTYPE_FFV_AND_BUILDERS(FileChangedCallback, void, const char*, ChangeReason);   // generates makeFileChangedCallback
27
28void AW_add_inotification(const char *file, const FileChangedCallback& fccb);
29void AW_remove_inotification(const char *file, const FileChangedCallback& fccb);
30
31
32#else
33#error aw_inotify.hxx included twice
34#endif // AW_INOTIFY_HXX
Note: See TracBrowser for help on using the repository browser.