needed functionality to storage-stream.
return info->casefile;
}
+/* Destroys SOURCE and returns the casefile that it
+ encapsulated. */
+struct casefile *
+storage_source_decapsulate (struct case_source *source)
+{
+ struct storage_stream_info *info = source->aux;
+ struct casefile *casefile;
+
+ assert (source->class == &storage_source_class);
+ casefile = info->casefile;
+ info->casefile = NULL;
+ destroy_storage_stream_info (info);
+ return casefile;
+}
+
struct case_source *
storage_source_create (struct casefile *cf)
{
extern const struct case_source_class storage_source_class;
struct casefile *storage_source_get_casefile (struct case_source *);
+struct casefile *storage_source_decapsulate (struct case_source *);
struct case_source *storage_source_create (struct casefile *);
#endif /* storage-stream.h */