/*
- * Copyright (c) 2005, Hervcalloc Drolon, FreeImage Team
+ * Copyright (c) 2005, Herve Drolon, FreeImage Team
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Write formatted data to a string and send the string to a user callback.
@param cinfo Codec context info
@param event_type Event type or callback to use to send the message
-@param fmt Format-control string (plus optionnal arguments)
+@param fmt Format-control string (plus optional arguments)
@return Returns true if successful, returns false otherwise
+* FIXME Change by its v2 version this function after ended the merge
*/
-bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...);
+opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...);
+
/* ----------------------------------------------------------------------- */
/*@}*/
+/**
+ * Write formatted data to a string and send the string to a user callback.
+ *
+ * @param event_mgr Event handler
+ * @param event_type Event type or callback to use to send the message
+ * @param fmt Format-control string (plus optional arguments)
+ *
+ * @return Returns true if successful, returns false otherwise
+ */
+opj_bool opj_event_msg_v2(opj_event_mgr_t* event_mgr, int event_type, const char *fmt, ...);
+
+/**
+ * Default callback function. No message sent to output.
+ */
+void opj_default_callback (const char *msg, void *client_data);
+
+/**
+ * Default info callback function, message is sent to the stdout output.
+ */
+void opj_info_default_callback (const char *msg, void *client_data);
+
+/**
+ * Default warning callback function, message is sent to stderr output.
+ */
+void opj_warning_default_callback (const char *msg, void *client_data);
+
+/**
+ * Default error callback function, message is sent to stderr output.
+ */
+void opj_error_default_callback (const char *msg, void *client_data);
+
+
/*@}*/
#endif /* __EVENT_H */