aboutsummaryrefslogtreecommitdiffstats
path: root/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-11-26 22:14:39 +0100
committerDavid Robillard <d@drobilla.net>2018-11-26 22:14:39 +0100
commitaf475a0c5ee0f61c3046caa0d9b563c07a14d995 (patch)
tree6b6db89aa95772dbd60cff12315d535f709d812a /serd/serd.h
parent2a1a2522b23122e2428019489df9ddb5b0ec30ea (diff)
downloadserd-af475a0c5ee0f61c3046caa0d9b563c07a14d995.tar.gz
serd-af475a0c5ee0f61c3046caa0d9b563c07a14d995.tar.bz2
serd-af475a0c5ee0f61c3046caa0d9b563c07a14d995.zip
Rename SerdError to SerdMessage
Towards more general usage for all types of logging.
Diffstat (limited to 'serd/serd.h')
-rw-r--r--serd/serd.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/serd/serd.h b/serd/serd.h
index 29bff936..8aa22f7a 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -349,14 +349,14 @@ typedef struct {
} SerdBuffer;
/**
- An error description.
+ A message description.
*/
typedef struct {
- SerdStatus status; /**< Error code */
- const SerdCursor* cursor; /**< Origin of error, or NULL */
+ SerdStatus status; /**< Status code */
+ const SerdCursor* cursor; /**< Origin of message, or NULL */
const char* fmt; /**< Message format string (printf style) */
va_list* args; /**< Arguments for fmt */
-} SerdError;
+} SerdMessage;
/**
A parsed URI.
@@ -882,13 +882,13 @@ serd_node_free(SerdNode* node);
*/
/**
- Sink (callback) for errors.
+ Sink (callback) for log messages.
@param handle Handle for user data.
- @param error Error description.
+ @param msg Message description.
*/
-typedef SerdStatus (*SerdErrorSink)(void* handle,
- const SerdError* error);
+typedef SerdStatus (*SerdMessageSink)(void* handle,
+ const SerdMessage* msg);
/**
Sink (callback) for base URI changes.
@@ -960,16 +960,16 @@ const SerdNode*
serd_world_get_blank(SerdWorld* world);
/**
- Set a function to be called when errors occur.
+ Set a function to be called with log messages (typically errors).
- The `error_sink` will be called with `handle` as its first argument. If
- no error function is set, errors are printed to stderr.
+ The `msg_sink` will be called with `handle` as its first argument. If
+ no sink is set, messages are printed to stderr.
*/
SERD_API
void
-serd_world_set_error_sink(SerdWorld* world,
- SerdErrorSink error_sink,
- void* handle);
+serd_world_set_message_sink(SerdWorld* world,
+ SerdMessageSink msg_sink,
+ void* handle);
/**
@}