HawkTracer  0.10.0
file_dump_listener.h
Go to the documentation of this file.
1 
7 #ifndef HAWKTRACER_LISTENERS_FILE_DUMP_LISTENER_H
8 #define HAWKTRACER_LISTENERS_FILE_DUMP_LISTENER_H
9 
10 #include <hawktracer/timeline.h>
11 
12 #include <stdio.h>
13 
15 
16 typedef struct _HT_FileDumpListener HT_FileDumpListener;
17 
45  HT_Timeline* timeline, const char* filename, size_t buffer_size, HT_ErrorCode *out_err);
46 
60 HT_API HT_FileDumpListener* ht_file_dump_listener_create(const char* filename, size_t buffer_size, HT_ErrorCode *out_err);
61 
68 
74 HT_API void ht_file_dump_listener_callback(TEventPtr events, size_t size, HT_Boolean serialized, void* user_data);
75 
91 
103 
105 
106 #endif /* HAWKTRACER_LISTENERS_FILE_DUMP_LISTENER_H */
HT_API HT_FileDumpListener * ht_file_dump_listener_create(const char *filename, size_t buffer_size, HT_ErrorCode *out_err)
Creates an instance of a file dump listener.
#define HT_API
Defines a directive for exporting/importing symbols from DLL.
Definition: macros.h:76
#define HT_DECLS_END
Defines an end of C linkage block.
Definition: macros.h:17
typedefHT_DECLS_BEGIN struct _HT_FileDumpListener HT_FileDumpListener
Definition: file_dump_listener.h:16
HT_API HT_ErrorCode ht_file_dump_listener_flush(HT_FileDumpListener *listener, HT_Boolean flush_stream)
Flushes internal listener buffer.
typedefHT_DECLS_BEGIN struct _HT_Timeline HT_Timeline
Definition: timeline.h:23
HT_API void ht_file_dump_listener_destroy(HT_FileDumpListener *listener)
Destroys an instance of the listener.
HT_ErrorCode
Defines list of possible errors returned by library functions.
Definition: base_types.h:48
int HT_Boolean
A standard boolean type, possible values: HT_TRUE, HT_FALSE.
Definition: base_types.h:20
HT_API HT_FileDumpListener * ht_file_dump_listener_register(HT_Timeline *timeline, const char *filename, size_t buffer_size, HT_ErrorCode *out_err)
Creates a file dump listener and registers it to a timeline.
HT_API void ht_file_dump_listener_stop(HT_FileDumpListener *listener)
Stops listening to new events.
HT_API void ht_file_dump_listener_callback(TEventPtr events, size_t size, HT_Boolean serialized, void *user_data)
A listener callback.
#define HT_DECLS_BEGIN
Defines a beginning of C linkage block.
Definition: macros.h:16
uint8_t * TEventPtr
A pointer to a list of HT_Event (or derived) objects.
Definition: base_types.h:22