-/* Create zip reader to read the file called FILENAME.
- If ERRS is non-null if will be used to contain any error messages
- which the reader wishes to report.
- */
-struct zip_reader *zip_reader_create (const char *filename, struct string *errs);
+/* Create zip reader to read the file called FILENAME. If successful, stores
+ the new zip_reader in *ZRP and returns NULL; on error, returns an error
+ message that the caller must free and stores NULL in *ZRP.
+
+ The client must eventually unref *ZRP. */
+char *zip_reader_create (const char *filename, struct zip_reader **zrp)
+ WARN_UNUSED_RESULT;
+
+/* Reference counting. */
+struct zip_reader *zip_reader_ref (const struct zip_reader *);
+void zip_reader_unref (struct zip_reader *zr);
+
+/* Returns the name of ZR's member IDX, IDX >= 0. Returns NULL if ZR has fewer
+ than (IDX + 1) members. */
+const char *zip_reader_get_member_name(const struct zip_reader *zr,
+ size_t idx);