summaryrefslogtreecommitdiff
path: root/src/httrack-library.h
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-05-14 20:12:42 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-05-14 20:12:42 +0000
commitc05f54ae04c8b905ce31b66f136df578f868d9e6 (patch)
treeb212cbe5650e4be66987ea8e98f847e91fa2da50 /src/httrack-library.h
parentae1db762e79326b07a57301ad252f8e0ae0b42a2 (diff)
Clean hts_set_error_callback() and hts_get_error_callback()
Diffstat (limited to 'src/httrack-library.h')
-rw-r--r--src/httrack-library.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/httrack-library.h b/src/httrack-library.h
index 405e4fd..e15f3ce 100644
--- a/src/httrack-library.h
+++ b/src/httrack-library.h
@@ -66,6 +66,12 @@ typedef enum hts_log_type {
typedef struct hts_stat_struct hts_stat_struct;
#endif
+/** Assert error callback. **/
+#ifndef HTS_DEF_FWSTRUCT_htsErrorCallback
+#define HTS_DEF_FWSTRUCT_htsErrorCallback
+typedef void (*htsErrorCallback) (const char *msg, const char *file, int line);
+#endif
+
/* Helpers for plugging callbacks
requires: htsdefines.h */
@@ -112,6 +118,8 @@ HTSEXT_API const hts_stat_struct* hts_get_stats(httrackp * opt);
HTSEXT_API void set_wrappers(httrackp * opt); /* LEGACY */
HTSEXT_API int plug_wrapper(httrackp * opt, const char *moduleName,
const char *argv);
+HTSEXT_API void hts_set_error_callback(htsErrorCallback handler);
+HTSEXT_API htsErrorCallback hts_get_error_callback(void);
/* Logging */
HTSEXT_API int hts_log(httrackp * opt, const char *prefix, const char *msg);