1 /* GepubArchive 2 * 3 * Copyright (C) 2011 Daniel Garcia <danigm@wadobo.com> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef __GEPUB_ARCHIVE_H__ 21 #define __GEPUB_ARCHIVE_H__ 22 23 #include <glib-object.h> 24 #include <gio/gio.h> 25 #include <glib.h> 26 27 G_BEGIN_DECLS 28 29 #define GEPUB_TYPE_ARCHIVE (gepub_archive_get_type ()) 30 #define GEPUB_ARCHIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GEPUB_TYPE_ARCHIVE, GepubArchive)) 31 #define GEPUB_ARCHIVE_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, GEPUB_TYPE_ARCHIVE, GepubArchiveClass)) 32 #define GEPUB_IS_ARCHIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, GEPUB_TYPE_ARCHIVE)) 33 #define GEPUB_IS_ARCHIVE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE (obj, GEPUB_TYPE_ARCHIVE)) 34 #define GEPUB_ARCHIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEPUB_TYPE_ARCHIVE, GepubArchiveClass)) 35 36 typedef struct _GepubArchive GepubArchive; 37 typedef struct _GepubArchiveClass GepubArchiveClass; 38 39 GType gepub_archive_get_type (void) G_GNUC_CONST; 40 41 GepubArchive *gepub_archive_new (const gchar *path); 42 GList *gepub_archive_list_files (GepubArchive *archive); 43 GBytes *gepub_archive_read_entry (GepubArchive *archive, 44 const gchar *path); 45 gchar *gepub_archive_get_root_file (GepubArchive *archive); 46 47 G_END_DECLS 48 49 #endif /* __GEPUB_ARCHIVE_H__ */ 50