cci_identifier_t in_identifier)
{
cc_int32 err = ccNoError;
+ ccs_ccache_t ccache = NULL;
if (!io_cache_collection) { err = cci_check_error (ccErrBadParam); }
if (!in_identifier ) { err = cci_check_error (ccErrBadParam); }
+ if (!err) {
+ err = ccs_cache_collection_find_ccache (io_cache_collection,
+ in_identifier,
+ &ccache);
+ }
+
+ if (!err) {
+ /* Notify before deletion because after deletion the ccache
+ * will no longer exist (and won't know about its clients) */
+ err = ccs_ccache_changed (ccache, io_cache_collection);
+ }
+
if (!err) {
err = ccs_ccache_list_remove (io_cache_collection->ccaches,
in_identifier);
}
-
+
return cci_check_error (err);
}
struct ccs_ccache_d ccs_ccache_initializer = { NULL, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL };
-static cc_int32 ccs_ccache_changed (ccs_ccache_t io_ccache,
- ccs_cache_collection_t io_cache_collection);
-
/* ------------------------------------------------------------------------ */
cc_int32 ccs_ccache_new (ccs_ccache_t *out_ccache,
/* ------------------------------------------------------------------------ */
-static cc_int32 ccs_ccache_changed (ccs_ccache_t io_ccache,
- ccs_cache_collection_t io_cache_collection)
+cc_int32 ccs_ccache_changed (ccs_ccache_t io_ccache,
+ ccs_cache_collection_t io_cache_collection)
{
cc_int32 err = ccNoError;
cci_stream_t reply_data = NULL;
}
}
}
-
+
cci_stream_release (reply_data);
return cci_check_error (err);
cc_int32 ccs_ccache_release (ccs_ccache_t io_ccache);
+cc_int32 ccs_ccache_changed (ccs_ccache_t io_ccache,
+ ccs_cache_collection_t io_cache_collection);
+
cc_int32 ccs_ccache_compare_identifier (ccs_ccache_t in_ccache,
cci_identifier_t in_identifier,
cc_uint32 *out_equal);