summaryrefslogtreecommitdiff
path: root/other/apidsl/tox.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'other/apidsl/tox.in.h')
-rw-r--r--other/apidsl/tox.in.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/other/apidsl/tox.in.h b/other/apidsl/tox.in.h
index 4c9c4972..074897ad 100644
--- a/other/apidsl/tox.in.h
+++ b/other/apidsl/tox.in.h
@@ -609,6 +609,57 @@ static this new(const options_t *options) {
609void kill(); 609void kill();
610 610
611 611
612/**
613 * Severity level of log messages.
614 */
615enum class LOG_LEVEL {
616 /**
617 * Very detailed traces including all network activity.
618 */
619 LOG_TRACE,
620 /**
621 * Debug messages such as which port we bind to.
622 */
623 LOG_DEBUG,
624 /**
625 * Informational log messages such as video call status changes.
626 */
627 LOG_INFO,
628 /**
629 * Warnings about internal inconsistency or logic errors.
630 */
631 LOG_WARNING,
632 /**
633 * Severe unexpected errors caused by external or internal inconsistency.
634 */
635 LOG_ERROR,
636}
637
638/**
639 * This event is triggered when the toxcore library logs an internal message.
640 * This is mostly useful for debugging. This callback can be called from any
641 * function, not just $iterate. This means the user data lifetime must at
642 * least extend between registering and unregistering it or $kill.
643 *
644 * Other toxcore modules such as toxav may concurrently call this callback at
645 * any time. Thus, user code must make sure it is equipped to handle concurrent
646 * execution, e.g. by employing appropriate mutex locking. The callback
647 * registration function must not be called during execution of any other Tox
648 * library function (toxcore or toxav).
649 */
650event log {
651 /**
652 * @param level The severity of the log message.
653 * @param file The source file from which the message originated.
654 * @param line The source line from which the message originated.
655 * @param func The function from which the message originated.
656 * @param message The log message.
657 */
658 typedef void(LOG_LEVEL level, string file, uint32_t line, string func,
659 string message);
660}
661
662
612uint8_t[size] savedata { 663uint8_t[size] savedata {
613 /** 664 /**
614 * Calculates the number of bytes required to store the tox instance with 665 * Calculates the number of bytes required to store the tox instance with