4coder/4ed_file_track.h

57 lines
1.3 KiB
C
Raw Normal View History

2016-08-22 19:31:19 +00:00
/*
* Mr. 4th Dimention - Allen Webster
*
* 20.07.2016
*
* File tracking API.
*
*/
2016-08-22 19:31:19 +00:00
// TOP
#if !defined(FILE_TRACK_4TECH_H)
2016-08-22 19:31:19 +00:00
#define FILE_TRACK_4TECH_H
#if !defined(FILE_TRACK_LINK)
# define FILE_TRACK_LINK static
#endif
typedef struct{
u8 opaque[128];
} File_Track_System;
2016-08-22 19:31:19 +00:00
typedef i32 File_Track_Result;
2016-08-22 19:31:19 +00:00
enum{
FileTrack_Good,
FileTrack_MemoryTooSmall,
FileTrack_OutOfTableMemory,
FileTrack_OutOfListenerMemory,
FileTrack_NoMoreEvents,
FileTrack_FileSystemError
};
FILE_TRACK_LINK File_Track_Result
init_track_system(File_Track_System *system, void *table_memory, i32 table_memory_size, void *listener_memory, i32 listener_memory_size);
2016-08-22 19:31:19 +00:00
FILE_TRACK_LINK File_Track_Result
2016-08-26 01:42:46 +00:00
add_listener(File_Track_System *system, char *filename);
2016-08-22 19:31:19 +00:00
FILE_TRACK_LINK File_Track_Result
2016-08-26 01:42:46 +00:00
remove_listener(File_Track_System *system, char *filename);
2016-08-22 23:54:20 +00:00
FILE_TRACK_LINK File_Track_Result
move_track_system(File_Track_System *system, void *mem, i32 size);
2016-08-22 19:31:19 +00:00
FILE_TRACK_LINK File_Track_Result
expand_track_system_listeners(File_Track_System *system, void *mem, i32 size);
2016-08-22 19:31:19 +00:00
FILE_TRACK_LINK File_Track_Result
get_change_event(File_Track_System *system, u8 *buffer, i32 max);
FILE_TRACK_LINK File_Track_Result
2016-08-22 19:31:19 +00:00
shut_down_track_system(File_Track_System *system);
#endif
// BOTTOM