[gvfs] build: Bump libgdata dependency to support latest features



commit 8b47b09a5adf35ee52d5a1e5f52fb5a6597b2598
Author: Mayank Sharma <mayank8019 gmail com>
Date:   Wed Aug 28 12:25:54 2019 +0530

    build: Bump libgdata dependency to support latest features
    
    libgdata API has been augmented with GDataDocumentsProperty API in the
    latest release 0.17.11. Since, we're using that API to support copy/move
    operations, we bump the required dependency version accordingly.
    
    We also remove the HAVE_LIBGDATA_* ifdefs since we require libgdata
    version >= 0.17.11 for the google backend to work properly.

 daemon/gvfsbackendgoogle.c | 16 ----------------
 meson.build                |  5 +----
 2 files changed, 1 insertion(+), 20 deletions(-)
---
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c
index 1e9850cc..c8a70030 100644
--- a/daemon/gvfsbackendgoogle.c
+++ b/daemon/gvfsbackendgoogle.c
@@ -1237,11 +1237,7 @@ build_file_info (GVfsBackendGoogle      *self,
         {
           goffset size;
 
-#if HAVE_LIBGDATA_0_17_7
           size = gdata_documents_entry_get_file_size (GDATA_DOCUMENTS_ENTRY (entry));
-#else
-          size = gdata_documents_entry_get_quota_used (GDATA_DOCUMENTS_ENTRY (entry));
-#endif
           g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_STANDARD_SIZE, (guint64) size);
         }
     }
@@ -1598,11 +1594,7 @@ g_vfs_backend_google_copy (GVfsBackend           *_self,
   insert_entry (self, GDATA_ENTRY (new_entry));
   g_hash_table_foreach (self->monitors, emit_create_event, entry_path);
 
-#if HAVE_LIBGDATA_0_17_7
   size = gdata_documents_entry_get_file_size (new_entry);
-#else
-  size = gdata_documents_entry_get_quota_used (new_entry);
-#endif
   g_vfs_job_progress_callback (size, size, job);
   g_vfs_job_succeeded (G_VFS_JOB (job));
 
@@ -2621,11 +2613,7 @@ g_vfs_backend_google_push (GVfsBackend           *_self,
         }
     }
 
-#if HAVE_LIBGDATA_0_17_7
   size = gdata_documents_entry_get_file_size (GDATA_DOCUMENTS_ENTRY (new_document));
-#else
-  size = gdata_documents_entry_get_quota_used (GDATA_DOCUMENTS_ENTRY (new_document));
-#endif
   g_vfs_job_progress_callback (size, size, job);
   g_vfs_job_succeeded (G_VFS_JOB (job));
 
@@ -2645,7 +2633,6 @@ g_vfs_backend_google_push (GVfsBackend           *_self,
 
 /* ---------------------------------------------------------------------------------------------------- */
 
-#if HAVE_LIBGDATA_0_17_9
 static void
 fs_info_cb (GObject      *source_object,
             GAsyncResult *res,
@@ -2683,7 +2670,6 @@ fs_info_cb (GObject      *source_object,
  out:
   g_debug ("- query_fs_info\n");
 }
-#endif
 
 static gboolean
 g_vfs_backend_google_query_fs_info (GVfsBackend           *_self,
@@ -2704,7 +2690,6 @@ g_vfs_backend_google_query_fs_info (GVfsBackend           *_self,
   g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, type);
   g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE, TRUE);
 
-#if HAVE_LIBGDATA_0_17_9
   if (g_file_attribute_matcher_matches (matcher, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE) ||
       g_file_attribute_matcher_matches (matcher, G_FILE_ATTRIBUTE_FILESYSTEM_FREE) ||
       g_file_attribute_matcher_matches (matcher, G_FILE_ATTRIBUTE_FILESYSTEM_USED))
@@ -2714,7 +2699,6 @@ g_vfs_backend_google_query_fs_info (GVfsBackend           *_self,
       gdata_documents_service_get_metadata_async (self->service, cancellable, fs_info_cb, job);
       return TRUE;
     }
-#endif
 
   g_vfs_job_succeeded (G_VFS_JOB (job));
 
diff --git a/meson.build b/meson.build
index 62256295..8fcfee7f 100644
--- a/meson.build
+++ b/meson.build
@@ -417,10 +417,7 @@ enable_google = get_option('google')
 if enable_google
   assert(enable_goa, 'Google backend requested but GOA is required')
 
-  libgdata_dep = dependency('libgdata', version: '>= 0.17.3')
-  foreach version: ['0.17.7', '0.17.9']
-    config_h.set10('HAVE_LIBGDATA_' + version.underscorify(), libgdata_dep.version().version_compare('>= ' + 
version))
-  endforeach
+  libgdata_dep = dependency('libgdata', version: '>= 0.17.11')
 endif
 
 # *** Check for gphoto2 ***


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