diff options
-rw-r--r-- | content/content.c | 17 | ||||
-rw-r--r-- | content/content.h | 2 | ||||
-rw-r--r-- | content/content_protected.h | 2 |
3 files changed, 21 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c index 9e01171ea..1a1fc9927 100644 --- a/content/content.c +++ b/content/content.c @@ -1302,6 +1302,23 @@ struct bitmap *content__get_bitmap(struct content *c) } /** + * Return whether a content is currently locked + * + * \param c Content to test + * \return true iff locked, else false + */ + +bool content_is_locked(hlcache_handle *h) +{ + return content__is_locked(hlcache_handle_get_content(h)); +} + +bool content__is_locked(struct content *c) +{ + return c->locked; +} + +/** * Retrieve the low-level cache handle for a content * * \param h Content to retrieve from diff --git a/content/content.h b/content/content.h index a76783bdf..8a24e712f 100644 --- a/content/content.h +++ b/content/content.h @@ -145,4 +145,6 @@ void content_invalidate_reuse_data(struct hlcache_handle *c); const char *content_get_refresh_url(struct hlcache_handle *c); struct bitmap *content_get_bitmap(struct hlcache_handle *c); +bool content_is_locked(struct hlcache_handle *h); + #endif diff --git a/content/content_protected.h b/content/content_protected.h index 16760180b..3fd6c8329 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -220,4 +220,6 @@ void content__invalidate_reuse_data(struct content *c); const char *content__get_refresh_url(struct content *c); struct bitmap *content__get_bitmap(struct content *c); +bool content__is_locked(struct content *c); + #endif |