summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/content.c7
-rw-r--r--content/content_protected.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c
index be39b15a6..3d06f8e07 100644
--- a/content/content.c
+++ b/content/content.c
@@ -670,6 +670,9 @@ bool content_add_user(struct content *c,
user->next = c->user_list->next;
c->user_list->next = user;
+ if (c->handler->add_user != NULL)
+ c->handler->add_user(c);
+
return true;
}
@@ -699,6 +702,10 @@ void content_remove_user(struct content *c,
assert(0);
return;
}
+
+ if (c->handler->remove_user != NULL)
+ c->handler->remove_user(c);
+
next = user->next;
user->next = next->next;
free(next);
diff --git a/content/content_protected.h b/content/content_protected.h
index 7311da604..e5ff1cae2 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -82,6 +82,8 @@ struct content_handler {
bool (*matches_quirks)(const struct content *c, bool quirks);
const char *(*get_encoding)(const struct content *c, enum content_encoding_type op);
content_type (*type)(void);
+ void (*add_user)(struct content *c);
+ void (*remove_user)(struct content *c);
/** handler dependant content sensitive internal data interface. */
void * (*get_internal)(const struct content *c, void *context);