[file-roller/wip/jtojnar/gir-cleanups: 2/2] Always use FrArchiveCaps enum instead of guint8 typedef




commit c72310fc5f15b3d9a2c1aaae116ffc5627687f26
Author: Jan Tojnar <jtojnar gmail com>
Date:   Thu Aug 18 14:32:39 2022 +0200

    Always use FrArchiveCaps enum instead of guint8 typedef

 src/fr-archive-libarchive.c | 4 ++--
 src/fr-archive.c            | 4 ++--
 src/fr-archive.h            | 4 ++--
 src/fr-command-7z.c         | 4 ++--
 src/fr-command-ace.c        | 4 ++--
 src/fr-command-alz.c        | 4 ++--
 src/fr-command-ar.c         | 4 ++--
 src/fr-command-arj.c        | 4 ++--
 src/fr-command-cfile.c      | 4 ++--
 src/fr-command-cpio.c       | 4 ++--
 src/fr-command-dpkg.c       | 4 ++--
 src/fr-command-iso.c        | 4 ++--
 src/fr-command-jar.c        | 4 ++--
 src/fr-command-lha.c        | 4 ++--
 src/fr-command-lrzip.c      | 4 ++--
 src/fr-command-rar.c        | 4 ++--
 src/fr-command-rpm.c        | 4 ++--
 src/fr-command-tar.c        | 4 ++--
 src/fr-command-unarchiver.c | 4 ++--
 src/fr-command-unsquashfs.c | 4 ++--
 src/fr-command-unstuff.c    | 4 ++--
 src/fr-command-zip.c        | 4 ++--
 src/fr-command-zoo.c        | 4 ++--
 src/typedefs.h              | 4 +---
 24 files changed, 47 insertions(+), 49 deletions(-)
---
diff --git a/src/fr-archive-libarchive.c b/src/fr-archive-libarchive.c
index 1dcf1573..ecfa11dd 100644
--- a/src/fr-archive-libarchive.c
+++ b/src/fr-archive-libarchive.c
@@ -105,12 +105,12 @@ fr_archive_libarchive_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_archive_libarchive_get_capabilities (FrArchive  *archive,
                                        const char *mime_type,
                                        gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
 
diff --git a/src/fr-archive.c b/src/fr-archive.c
index 0629fb46..d02563e0 100644
--- a/src/fr-archive.c
+++ b/src/fr-archive.c
@@ -271,7 +271,7 @@ fr_archive_base_get_mime_types (FrArchive *self)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_archive_base_get_capabilities (FrArchive  *self,
                                  const char *mime_type,
                                  gboolean    check_command)
@@ -506,7 +506,7 @@ fr_archive_update_capabilities (FrArchive *self)
 }
 
 
-FrArchiveCap
+FrArchiveCaps
 fr_archive_get_capabilities (FrArchive  *self,
                             const char *mime_type,
                             gboolean    check_command)
diff --git a/src/fr-archive.h b/src/fr-archive.h
index 342b0217..5e225545 100644
--- a/src/fr-archive.h
+++ b/src/fr-archive.h
@@ -246,7 +246,7 @@ struct _FrArchiveClass {
        /*< virtual functions >*/
 
        const char ** (*get_mime_types)    (FrArchive           *archive);
-       FrArchiveCap  (*get_capabilities)  (FrArchive           *archive,
+       FrArchiveCaps  (*get_capabilities)  (FrArchive           *archive,
                                            const char          *mime_type,
                                            gboolean             check_command);
        void          (*set_mime_type)     (FrArchive           *archive,
@@ -360,7 +360,7 @@ gboolean      fr_archive_is_capable_of           (FrArchive           *archive,
  */
 const char ** fr_archive_get_supported_types     (FrArchive           *archive);
 void          fr_archive_update_capabilities     (FrArchive           *archive);
-FrArchiveCap  fr_archive_get_capabilities        (FrArchive           *archive,
+FrArchiveCaps  fr_archive_get_capabilities        (FrArchive           *archive,
                                                  const char          *mime_type,
                                                  gboolean             check_command);
 void          fr_archive_set_mime_type           (FrArchive           *archive,
diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
index ba7d1c29..dcf4b51a 100644
--- a/src/fr-command-7z.c
+++ b/src/fr-command-7z.c
@@ -651,12 +651,12 @@ has_rar_support (gboolean check_command)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_7z_get_capabilities (FrArchive  *archive,
                                const char *mime_type,
                                gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        /*
diff --git a/src/fr-command-ace.c b/src/fr-command-ace.c
index 2a445696..7bcf4c00 100644
--- a/src/fr-command-ace.c
+++ b/src/fr-command-ace.c
@@ -251,12 +251,12 @@ fr_command_ace_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_ace_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available ("unace", check_command))
diff --git a/src/fr-command-alz.c b/src/fr-command-alz.c
index 05794a6a..5e137e97 100644
--- a/src/fr-command-alz.c
+++ b/src/fr-command-alz.c
@@ -313,12 +313,12 @@ fr_command_alz_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_alz_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available ("unalz", check_command))
diff --git a/src/fr-command-ar.c b/src/fr-command-ar.c
index 66ca78ff..77a76098 100644
--- a/src/fr-command-ar.c
+++ b/src/fr-command-ar.c
@@ -291,12 +291,12 @@ fr_command_ar_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_ar_get_capabilities (FrArchive  *archive,
                                const char *mime_type,
                                gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available ("ar", check_command)) {
diff --git a/src/fr-command-arj.c b/src/fr-command-arj.c
index 3bcf037d..24319b26 100644
--- a/src/fr-command-arj.c
+++ b/src/fr-command-arj.c
@@ -331,12 +331,12 @@ fr_command_arj_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_arj_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES | FR_ARCHIVE_CAN_ENCRYPT;
        if (_g_program_is_available ("arj", check_command))
diff --git a/src/fr-command-cfile.c b/src/fr-command-cfile.c
index c347756c..0b0e746b 100644
--- a/src/fr-command-cfile.c
+++ b/src/fr-command-cfile.c
@@ -548,12 +548,12 @@ fr_command_cfile_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_cfile_get_capabilities (FrArchive  *archive,
                                   const char *mime_type,
                                   gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_DO_NOTHING;
        if (_g_mime_type_matches (mime_type, "application/x-gzip")) {
diff --git a/src/fr-command-cpio.c b/src/fr-command-cpio.c
index a7333983..6b61f27e 100644
--- a/src/fr-command-cpio.c
+++ b/src/fr-command-cpio.c
@@ -232,12 +232,12 @@ fr_command_cpio_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_cpio_get_capabilities (FrArchive  *archive,
                                  const char *mime_type,
                                  gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available (CPIO_PATH, check_command))
diff --git a/src/fr-command-dpkg.c b/src/fr-command-dpkg.c
index 95256a7c..2f61b72d 100644
--- a/src/fr-command-dpkg.c
+++ b/src/fr-command-dpkg.c
@@ -219,12 +219,12 @@ fr_command_dpkg_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_dpkg_get_capabilities (FrArchive  *archive,
                                   const char *mime_type,
                                   gboolean    check_command)
 {
-        FrArchiveCap capabilities;
+        FrArchiveCaps capabilities;
 
         capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
         if (_g_program_is_available ("dpkg-deb", check_command))
diff --git a/src/fr-command-iso.c b/src/fr-command-iso.c
index 3c686808..d15d48e6 100644
--- a/src/fr-command-iso.c
+++ b/src/fr-command-iso.c
@@ -212,12 +212,12 @@ fr_command_iso_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_iso_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available ("isoinfo", check_command))
diff --git a/src/fr-command-jar.c b/src/fr-command-jar.c
index 08854e13..09be71cb 100644
--- a/src/fr-command-jar.c
+++ b/src/fr-command-jar.c
@@ -162,12 +162,12 @@ fr_command_jar_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_jar_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available ("zip", check_command))
diff --git a/src/fr-command-lha.c b/src/fr-command-lha.c
index 17381dc6..91f12e43 100644
--- a/src/fr-command-lha.c
+++ b/src/fr-command-lha.c
@@ -311,12 +311,12 @@ fr_command_lha_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_lha_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available ("lha", check_command))
diff --git a/src/fr-command-lrzip.c b/src/fr-command-lrzip.c
index f0010601..d3970a53 100644
--- a/src/fr-command-lrzip.c
+++ b/src/fr-command-lrzip.c
@@ -178,12 +178,12 @@ fr_command_lrzip_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_lrzip_get_capabilities (FrArchive  *archive,
                                   const char *mime_type,
                                   gboolean    check_command)
 {
-       FrArchiveCap capabilities = FR_ARCHIVE_CAN_DO_NOTHING;
+       FrArchiveCaps capabilities = FR_ARCHIVE_CAN_DO_NOTHING;
 
        if (_g_program_is_available ("lrzip", check_command))
                capabilities |= FR_ARCHIVE_CAN_READ_WRITE;
diff --git a/src/fr-command-rar.c b/src/fr-command-rar.c
index 7951314d..9f98aabf 100644
--- a/src/fr-command-rar.c
+++ b/src/fr-command-rar.c
@@ -767,12 +767,12 @@ fr_command_rar_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_rar_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES | FR_ARCHIVE_CAN_ENCRYPT | 
FR_ARCHIVE_CAN_ENCRYPT_HEADER;
        if (_g_program_is_available ("rar", check_command))
diff --git a/src/fr-command-rpm.c b/src/fr-command-rpm.c
index e0735686..af2d8788 100644
--- a/src/fr-command-rpm.c
+++ b/src/fr-command-rpm.c
@@ -233,12 +233,12 @@ fr_command_rpm_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_rpm_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available (CPIO_PATH, check_command))
diff --git a/src/fr-command-tar.c b/src/fr-command-tar.c
index 8c70cf02..c2f2f939 100644
--- a/src/fr-command-tar.c
+++ b/src/fr-command-tar.c
@@ -1182,12 +1182,12 @@ fr_command_tar_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_tar_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
 
diff --git a/src/fr-command-unarchiver.c b/src/fr-command-unarchiver.c
index 1c159845..9ab5c176 100644
--- a/src/fr-command-unarchiver.c
+++ b/src/fr-command-unarchiver.c
@@ -265,12 +265,12 @@ fr_command_unarchiver_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_unarchiver_get_capabilities (FrArchive  *archive,
                                        const char *mime_type,
                                        gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_DO_NOTHING;
        if (_g_program_is_available ("lsar", check_command) && _g_program_is_available ("unar", 
check_command))
diff --git a/src/fr-command-unsquashfs.c b/src/fr-command-unsquashfs.c
index 62c7dad9..c67bf9b0 100644
--- a/src/fr-command-unsquashfs.c
+++ b/src/fr-command-unsquashfs.c
@@ -179,12 +179,12 @@ fr_command_unsquashfs_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_unsquashfs_get_capabilities (FrArchive  *archive,
                                         const char *mime_type,
                                         gboolean    check_command)
 {
-        FrArchiveCap capabilities;
+        FrArchiveCaps capabilities;
 
         capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
         if (_g_program_is_available ("unsquashfs", check_command))
diff --git a/src/fr-command-unstuff.c b/src/fr-command-unstuff.c
index a5301417..072dd713 100644
--- a/src/fr-command-unstuff.c
+++ b/src/fr-command-unstuff.c
@@ -291,12 +291,12 @@ fr_command_unstuff_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_unstuff_get_capabilities (FrArchive  *archive,
                                     const char *mime_type,
                                     gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available ("unstuff", check_command))
diff --git a/src/fr-command-zip.c b/src/fr-command-zip.c
index 17e47f87..bec5ca22 100644
--- a/src/fr-command-zip.c
+++ b/src/fr-command-zip.c
@@ -406,12 +406,12 @@ fr_command_zip_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_zip_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available ("zip", check_command)) {
diff --git a/src/fr-command-zoo.c b/src/fr-command-zoo.c
index ebb9f4ca..bcd9fc6f 100644
--- a/src/fr-command-zoo.c
+++ b/src/fr-command-zoo.c
@@ -330,12 +330,12 @@ fr_command_zoo_get_mime_types (FrArchive *archive)
 }
 
 
-static FrArchiveCap
+static FrArchiveCaps
 fr_command_zoo_get_capabilities (FrArchive  *archive,
                                 const char *mime_type,
                                 gboolean    check_command)
 {
-       FrArchiveCap capabilities;
+       FrArchiveCaps capabilities;
 
        capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
        if (_g_program_is_available ("zoo", check_command))
diff --git a/src/typedefs.h b/src/typedefs.h
index 5af3571e..481e6a71 100644
--- a/src/typedefs.h
+++ b/src/typedefs.h
@@ -64,12 +64,10 @@ typedef enum { /*< skip >*/
        FR_ARCHIVE_CAN_ENCRYPT = 1 << 3,
        FR_ARCHIVE_CAN_ENCRYPT_HEADER = 1 << 4,
        FR_ARCHIVE_CAN_CREATE_VOLUMES = 1 << 5
-} FrArchiveCap;
+} FrArchiveCaps;
 
 #define FR_ARCHIVE_CAN_READ_WRITE (FR_ARCHIVE_CAN_READ | FR_ARCHIVE_CAN_WRITE)
 
-typedef guint8 FrArchiveCaps;
-
 typedef struct {
        const char    *mime_type;
        FrArchiveCaps  current_capabilities;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]