diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-11-26 16:24:48 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-11-26 17:32:47 +0000 |
commit | 2fef76db1555f49cff7f2baeec7fa084c8a5facb (patch) | |
tree | f91d762a0bd065e461142a27f20fc2815ebf94b7 /content/content.c | |
parent | 840284b24d1a03c14592dd907894b136a37c495c (diff) | |
download | netsurf-2fef76db1555f49cff7f2baeec7fa084c8a5facb.tar.gz netsurf-2fef76db1555f49cff7f2baeec7fa084c8a5facb.tar.bz2 |
add errorcode content broadcast API
Diffstat (limited to 'content/content.c')
-rw-r--r-- | content/content.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c index 353abeeb0..1a92e408b 100644 --- a/content/content.c +++ b/content/content.c @@ -678,6 +678,23 @@ void content_broadcast(struct content *c, content_msg msg, } } +/* exported interface documented in content_protected.h */ +void content_broadcast_errorcode(struct content *c, nserror errorcode) +{ + struct content_user *user, *next; + union content_msg_data data; + + assert(c); + + data.errorcode = errorcode; + + for (user = c->user_list->next; user != 0; user = next) { + next = user->next; /* user may be destroyed during callback */ + if (user->callback != 0) + user->callback(c, CONTENT_MSG_ERRORCODE, data, user->pw); + } +} + /** * A window containing the content has been opened. |