rename filewatcher struct

This commit is contained in:
2025-03-29 14:12:40 +02:00
parent 89beab3506
commit c9205336c1
3 changed files with 18 additions and 18 deletions

View File

@@ -24,7 +24,7 @@ typedef struct {
HiFileEventType type;
} hiFileEvent;
struct hiFileWatcherContext;
struct hiFileWatcher;
/**
* FileEvents is a thread safe list of events.
*
@@ -38,13 +38,13 @@ struct hiFileEvents;
*
* Will start the watcher thread immediately.
*/
struct hiFileWatcherContext *hi_file_watcher_create(void);
struct hiFileWatcher *hi_file_watcher_create(void);
/**
* Destroy a previously created file watcher context.
*
* Will join the thread and destroy event stack.
*/
void hi_file_watcher_destroy(struct hiFileWatcherContext *context);
void hi_file_watcher_destroy(struct hiFileWatcher *context);
/**
* Add a file to the watch list of a file watcher.
*
@@ -52,13 +52,13 @@ void hi_file_watcher_destroy(struct hiFileWatcherContext *context);
* @param pathname Absolute path to the file or directory
* @param flags The events that will be watched for
*/
HiloadResult hi_file_watcher_add(struct hiFileWatcherContext *context,
HiloadResult hi_file_watcher_add(struct hiFileWatcher *context,
const char *pathname, u32 flags);
/**
* Can be used to poke file watcher thread to make sure it empties
* events before doing something, e.g. for shutting it down.
*/
void hi_file_watcher_notify(struct hiFileWatcherContext *context);
void hi_file_watcher_notify(struct hiFileWatcher *context);
/**
* Frees held memory but doesn't zero fields
@@ -68,7 +68,7 @@ void hi_file_event_free(hiFileEvent *event);
* Pop an event from event stack. Call `hi_file_event_destroy` when done with
* it.
*/
hiFileEvent hi_file_event_pop(struct hiFileWatcherContext *ctx);
hiFileEvent hi_file_event_pop(struct hiFileWatcher *ctx);
/**
* Free and zero held memory. Call after pop.
*/