[gcab/wip/hughsie/future: 10/18] Add gcab_folder_get_comptype()
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcab/wip/hughsie/future: 10/18] Add gcab_folder_get_comptype()
- Date: Wed, 13 Dec 2017 23:03:12 +0000 (UTC)
commit c820f24fdb3219dfce8b302f00968c8372adb188
Author: Richard Hughes <richard hughsie com>
Date: Tue Dec 12 23:20:24 2017 +0000
Add gcab_folder_get_comptype()
This allows creation of a duplicate archive as we know what kind of folder
compression to use.
docs/reference/gcab-docs.sgml | 1 +
libgcab.syms | 4 ++++
libgcab/gcab-folder.c | 12 +++++++++++-
libgcab/gcab-folder.h | 1 +
libgcab/gcab-priv.h | 1 -
5 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/gcab-docs.sgml b/docs/reference/gcab-docs.sgml
index 32dc5f1..adda487 100644
--- a/docs/reference/gcab-docs.sgml
+++ b/docs/reference/gcab-docs.sgml
@@ -28,5 +28,6 @@
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
<xi:include href="xml/api-index-0.5.xml"><xi:fallback /></xi:include>
<xi:include href="xml/api-index-0.6.xml"><xi:fallback /></xi:include>
+ <xi:include href="xml/api-index-0.8.xml"><xi:fallback /></xi:include>
<xi:include href="xml/api-index-2.28.xml"><xi:fallback /></xi:include>
</book>
diff --git a/libgcab.syms b/libgcab.syms
index d4b5c19..56cb370 100644
--- a/libgcab.syms
+++ b/libgcab.syms
@@ -41,3 +41,7 @@ LIBGCAB1_0.6 {
gcab_file_get_date;
gcab_file_get_size;
} LIBGCAB1_0.5;
+
+LIBGCAB1_0.8 {
+ gcab_folder_get_comptype;
+} LIBGCAB1_0.6;
diff --git a/libgcab/gcab-folder.c b/libgcab/gcab-folder.c
index 868e00a..7034601 100644
--- a/libgcab/gcab-folder.c
+++ b/libgcab/gcab-folder.c
@@ -176,7 +176,17 @@ gcab_folder_get_ndatablocks (GCabFolder *self)
return total_size / DATABLOCKSIZE + 1 ;
}
-G_GNUC_INTERNAL gint
+/**
+ * gcab_folder_get_comptype:
+ * @cabfolder: a #GCabFolder
+ *
+ * Returns the compression used in this folder.
+ *
+ * Returns: a #GCabCompression, e.g. %GCAB_COMPRESSION_MSZIP
+ *
+ * Since: 0.8
+ **/
+gint
gcab_folder_get_comptype (GCabFolder *self)
{
return self->comptype;
diff --git a/libgcab/gcab-folder.h b/libgcab/gcab-folder.h
index 12a191b..e54a468 100644
--- a/libgcab/gcab-folder.h
+++ b/libgcab/gcab-folder.h
@@ -63,6 +63,7 @@ gboolean gcab_folder_add_file (GCabFolder *cabfolder,
GError **error);
guint gcab_folder_get_nfiles (GCabFolder *cabfolder);
GSList * gcab_folder_get_files (GCabFolder *cabfolder);
+gint gcab_folder_get_comptype (GCabFolder *cabfolder);
G_END_DECLS
diff --git a/libgcab/gcab-priv.h b/libgcab/gcab-priv.h
index b2cb232..6052a43 100644
--- a/libgcab/gcab-priv.h
+++ b/libgcab/gcab-priv.h
@@ -51,7 +51,6 @@ GFile *gcab_file_get_gfile (GCabFile *file);
cfile_t *gcab_file_get_cfile (GCabFile *file);
void gcab_file_add_attribute (GCabFile *file, guint32 attribute);
-gint gcab_folder_get_comptype (GCabFolder *folder);
gsize gcab_folder_get_ndatablocks (GCabFolder *folder);
gboolean gcab_folder_extract (GCabFolder *self,
GFile *path,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]