[gcab] libgcab: add more compression method in enum
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcab] libgcab: add more compression method in enum
- Date: Fri, 25 Jan 2013 21:08:31 +0000 (UTC)
commit b4327ee697b47b34645f91ce33c22885f558c3ac
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date: Fri Jan 25 22:07:04 2013 +0100
libgcab: add more compression method in enum
libgcab/gcab-folder.c | 2 +-
libgcab/gcab-folder.h | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libgcab/gcab-folder.c b/libgcab/gcab-folder.c
index 953c3c9..4998167 100644
--- a/libgcab/gcab-folder.c
+++ b/libgcab/gcab-folder.c
@@ -279,7 +279,7 @@ G_GNUC_INTERNAL GCabFolder *
gcab_folder_new_with_cfolder (const cfolder_t *folder, GInputStream *stream)
{
GCabFolder *self = g_object_new (GCAB_TYPE_FOLDER,
- "compression", folder->typecomp,
+ "compression", folder->typecomp & GCAB_COMPRESSION_MASK,
NULL);
self->stream = g_object_ref (stream);
self->cfolder = *folder;
diff --git a/libgcab/gcab-folder.h b/libgcab/gcab-folder.h
index 420111c..9189ea4 100644
--- a/libgcab/gcab-folder.h
+++ b/libgcab/gcab-folder.h
@@ -46,6 +46,9 @@ typedef struct _GCabFolder GCabFolder;
* GCabCompression:
* @GCAB_COMPRESSION_NONE: No compression.
* @GCAB_COMPRESSION_MSZIP: MSZIP compression.
+ * @GCAB_COMPRESSION_QUANTUM: QUANTUM compression.
+ * @GCAB_COMPRESSION_LZX: LZX compression.
+ * @GCAB_COMPRESSION_MASK: compression value mask.
*
* Compression used by the #GCabFolder.
**/
@@ -53,6 +56,10 @@ typedef enum
{
GCAB_COMPRESSION_NONE = 0,
GCAB_COMPRESSION_MSZIP = 1,
+ GCAB_COMPRESSION_QUANTUM = 2,
+ GCAB_COMPRESSION_LZX = 3,
+
+ GCAB_COMPRESSION_MASK = 0xf,
} GCabCompression;
GType gcab_folder_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]