[shotwell/shotwell-0.30] More GPhoto2 vapi fixes



commit ba76254a176b47a5bbe6c19a9e45f0efdf9288d0
Author: Jens Georg <mail jensge org>
Date:   Sat Mar 13 23:22:50 2021 +0100

    More GPhoto2 vapi fixes

 src/camera/ImportPage.vala |  2 +-
 vapi/libgphoto2.vapi       | 17 ++++++++---------
 2 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index e4b1418a..19bcd48b 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -1362,7 +1362,7 @@ public class ImportPage : CheckerboardPage {
         if (fsid >= sifs.length)
             return null;
         
-        return (sifs[fsid].fields & GPhoto.CameraStorageInfoFields.BASE) != 0 ? sifs[fsid].basedir : "/";
+        return (sifs[fsid].fields & GPhoto.CameraStorageInfoFields.BASE) != 0 ? (string)sifs[fsid].basedir : 
"/";
     }
     
     public static string? get_fulldir(GPhoto.Camera camera, string camera_name, int fsid, string folder) {
diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi
index 7e569823..29be131a 100644
--- a/vapi/libgphoto2.vapi
+++ b/vapi/libgphoto2.vapi
@@ -74,7 +74,7 @@ namespace GPhoto {
         [CCode (cname="gp_camera_folder_delete_all")]
         public Result delete_all_files(string folder, Context context);
         [CCode (cname="gp_camera_folder_put_file")]
-        public Result put_file(string folder, CameraFile file, Context context);
+        public Result put_file(string folder, string filename, CameraFileType type, CameraFile file, Context 
context);
         [CCode (cname="gp_camera_folder_make_dir")]
         public Result make_dir(string folder, string name, Context context);
         [CCode (cname="gp_camera_folder_remove_dir")]
@@ -140,7 +140,6 @@ namespace GPhoto {
     public enum CameraFileInfoFields {
         NONE,
         TYPE,
-        NAME,
         SIZE,
         WIDTH,
         HEIGHT,
@@ -159,7 +158,7 @@ namespace GPhoto {
         public CameraFileInfoFields fields;
         public CameraFileStatus status;
         public ulong size;
-        public string type;
+        public char type[64];
         public uint width;
         public uint height;
         public string name;
@@ -176,7 +175,7 @@ namespace GPhoto {
         public CameraFileInfoFields fields;
         public CameraFileStatus status;
         public ulong size;
-        public string type;
+        public char type[64];
         public uint width;
         public uint height;
         public string name;
@@ -266,7 +265,7 @@ namespace GPhoto {
         public Result append(string name, string value);
         public Result reset();
         public Result sort();
-        public Result find_by_name(out int? index, string name);
+        public Result find_by_name(out int index, string name);
         public Result get_name(int index, out unowned string name);
         public Result get_value(int index, out unowned string value);
         public Result set_name(int index, string name);
@@ -314,9 +313,9 @@ namespace GPhoto {
     )]
     public struct CameraStorageInformation {
         public CameraStorageInfoFields fields;
-        public string basedir;
-        public string label;
-        public string description;
+        public char basedir[256];
+        public char label[256];
+        public char description[256];
         public int type;
         public int fstype;
         public int access;
@@ -485,7 +484,7 @@ namespace GPhoto {
     
     [CCode (
         cheader_filename="gphoto2/gphoto2-version.h",
-        cprefix="GP_VERSION"
+        cprefix="GP_VERSION_"
     )]
     public enum VersionVerbosity {
         SHORT,


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