Remove hi_ prefixes from internal code. Add documentation.
This commit is contained in:
@@ -7,15 +7,40 @@
|
||||
typedef struct FileWatcherContext FileWatcherContext;
|
||||
typedef struct FileWatch FileWatch;
|
||||
|
||||
FileWatch *file_watch_find_by_wd(FileWatcherContext *ctx,
|
||||
int wd, size_t *index);
|
||||
FileWatch *file_watch_find_by_path(FileWatcherContext *ctx,
|
||||
const char *path, size_t *index);
|
||||
/**
|
||||
* Search for a FileWatch matching by watch descriptor.
|
||||
*
|
||||
* @param ctx
|
||||
* @param wd Watch descriptor given by inotipy
|
||||
* @param index Will contain the first occurrance of a matching FileWatch. Can
|
||||
* be null.
|
||||
*/
|
||||
FileWatch *file_watch_find_by_wd(FileWatcherContext *ctx, int wd,
|
||||
size_t *index);
|
||||
/**
|
||||
* Search for a FileWatch in a particular context matching by filepath.
|
||||
* @param ctx
|
||||
* @param path An absolute path for the file searched for
|
||||
* @param index Will contain the first occurrance of a matching FileWatch. Can
|
||||
* be null. */
|
||||
FileWatch *file_watch_find_by_path(FileWatcherContext *ctx, const char *path,
|
||||
size_t *index);
|
||||
|
||||
HiResult file_watch_add(FileWatcherContext *ctx, u32 mask,
|
||||
const char *path);
|
||||
HiResult file_watch_remove(FileWatcherContext *ctx,
|
||||
const char *path);
|
||||
/**
|
||||
* Create FileWatch, start monitoring for changes and generating events.
|
||||
*
|
||||
* Creats a parent FileWatch if it doesn't already exist.
|
||||
*/
|
||||
HiResult file_watch_add(FileWatcherContext *ctx, u32 mask, const char *path);
|
||||
|
||||
/**
|
||||
* Stop a watch, clear all references and free memory
|
||||
*/
|
||||
HiResult file_watch_remove(FileWatcherContext *ctx, const char *path);
|
||||
|
||||
/**
|
||||
* Free memory and clear all watches in this context
|
||||
*/
|
||||
void file_watch_destroy_watches(FileWatcherContext *ctx);
|
||||
|
||||
#endif // FILEWATCH_H_
|
||||
|
||||
Reference in New Issue
Block a user