]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Update to taglib_c 1.5, patch by Andreas Brauchli, fixes bug 566919
authorJürg Billeter <j@bitron.ch>
Wed, 7 Jan 2009 20:09:01 +0000 (20:09 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Wed, 7 Jan 2009 20:09:01 +0000 (20:09 +0000)
2009-01-07  Jürg Billeter  <j@bitron.ch>

* vapi/taglib_c.vapi:

Update to taglib_c 1.5, patch by Andreas Brauchli, fixes bug 566919

svn path=/trunk/; revision=2283

ChangeLog
vapi/taglib_c.vapi

index 0f2452f23bc8f17f45c242dba73281a20d44ffdd..b6f28a9eb02bec0e1ff498d16ad344b251241243 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-07  Jürg Billeter  <j@bitron.ch>
+
+       * vapi/taglib_c.vapi:
+
+       Update to taglib_c 1.5, patch by Andreas Brauchli, fixes bug 566919
+
 2009-01-07  Jürg Billeter  <j@bitron.ch>
 
        * vapi/gobject-2.0.vapi:
index a5c0145a6269b407a3ca9224dd79fbed9fd4e17d..c690e725b61c23cf4eb20369646ba73ad3c85b2d 100644 (file)
@@ -1,6 +1,6 @@
 /* taglib_c.vapi
  *
- * Copyright (C) 2008 Andreas Brauchli
+ * Copyright (C) 2009 Andreas Brauchli
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
 [CCode (cprefix = "TagLib_", lower_case_cprefix = "taglib_", cheader_filename = "tag_c.h")]
 namespace TagLib
 {
-       [CCode (free_function = "taglib_file_free", lower_case_cprefix = "taglib_file_")]
+       public static void set_strings_unicode (bool unicode);
+       /* TagLib can keep track of strings that are created when outputting tag values
+        * and clear them using taglib_tag_clear_strings().  This is enabled by default.
+        * However if you wish to do more fine grained management of strings, you can do
+        * so by setting a management to FALSE.
+        */
+       public static void set_string_management_enabled (bool management);
+
+       [CCode (free_function = "taglib_file_free")]
        [Compact]
        public class File
        {
-               [CCode (cname = "taglib_file_new")]
                public File (string filename);
-
-               [CCode (cname = "taglib_file_new_type")]
                public File.type (string filename, FileType type);
 
-               public Tag tag();
-               public AudioProperties audioproperties(); //FIXME: should be assigned to a const TagLib_Audio_Properties*
-               public int save();
+               public bool is_valid ();
+               public unowned Tag tag {
+                       [CCode (cname = "taglib_file_tag")]
+                       get;
+               }
+               public /*immutable*/ unowned AudioProperties audioproperties {
+                       [CCode (cname = "taglib_file_audioproperties")]
+                       get;
+               }
+               public bool save ();
        }
 
-       [CCode (free_function = "", lower_case_cprefix = "taglib_tag_")]
+       [CCode (free_function = "")]
        [Compact]
        public class Tag
        {
-               public weak string title();
-               public weak string artist();
-               public weak string album();
-               public weak string comment();
-               public weak string genre();
-               public uint year();
-               public uint track();
+               public unowned string title {
+                       [CCode (cname = "taglib_tag_title")]
+                       get;
+                       set;
+               }
+               public unowned string artist {
+                       [CCode (cname = "taglib_tag_artist")]
+                       get;
+                       set;
+               }
+               public unowned string album {
+                       [CCode (cname = "taglib_tag_album")]
+                       get;
+                       set;
+               }
+               public unowned string comment {
+                       [CCode (cname = "taglib_tag_comment")]
+                       get;
+                       set;
+               }
+               public unowned string genre {
+                       [CCode (cname = "taglib_tag_genre")]
+                       get;
+                       set;
+               }
+               public uint year {
+                       [CCode (cname = "taglib_tag_year")]
+                       get;
+                       set;
+               }
+               public uint track {
+                       [CCode (cname = "taglib_tag_track")]
+                       get;
+                       set;
+               }
 
-               public void set_title(string title);
-               public void set_artist(string artist);
-               public void set_album(string album);
-               public void set_comment(string comment);
-               public void set_genre(string genre);
-               public void set_year(uint year);
-               public void set_track(uint track);
+               public static void free_strings ();
        }
 
-       [CCode (free_function = "", cname = "TagLib_AudioProperties", cprefix = "taglib_audioproperties_")]
+       [CCode (free_function = "", cname = "TagLib_AudioProperties")]
        [Compact]
        public class AudioProperties
        {
-               public int length ();
-               public int bitrate ();
-               public int samplerate ();
-               public int channels ();
-       }
-
-       namespace TagLib
-       {
-               /* By default all strings coming into or out of TagLib's C API are in UTF8.
-                * However, it may be desirable for TagLib to operate on Latin1 (ISO-8859-1)
-                * strings in which case this should be set to FALSE.
-                */
-               [CCode (cname = "taglib_set_strings_unicode")]
-               public static void set_strings_unicode (int unicode);
-
-               /* TagLib can keep track of strings that are created when outputting tag values
-                * and clear them using taglib_tag_clear_strings().  This is enabled by default.
-                * However if you wish to do more fine grained management of strings, you can do
-                * so by setting a management to FALSE.
-                */
-               [CCode (cname = "taglib_set_string_management_enabled")]
-               public static void set_string_management_enabled (int management);
-
-               [CCode (cname = "taglib_tag_free_strings")]
-               public static void free_strings ();
+               public int length {
+                       [CCode (cname = "taglib_audioproperties_length")]
+                       get;
+               }
+               public int bitrate {
+                       [CCode (cname = "taglib_audioproperties_bitrate")]
+                       get;
+               }
+               public int samplerate {
+                       [CCode (cname = "taglib_audioproperties_samplerate")]
+                       get;
+               }
+               public int channels {
+                       [CCode (cname = "taglib_audioproperties_channels")]
+                       get;
+               }
        }
 
        [CCode (cname = "TagLib_File_Type", cprefix = "TagLib_File_")]
@@ -96,7 +121,24 @@ namespace TagLib
                MPEG,
                OggVorbis,
                FLAC,
-               MPC
+               MPC,
+               OggFlac,
+               WavPack,
+               Speex,
+               TrueAudio
+       }
+
+       namespace ID3v2 {
+               [CCode (cname = "taglib_id3v2_set_default_text_encoding")]
+               public void set_default_text_encoding (Encoding encoding);
+
+               [CCode (cname = "TagLib_ID3v2_Encoding", cprefix = "TagLib_ID3v2_")]
+               public enum Encoding {
+                       Latin1,
+                       UTF16,
+                       UTF16BE,
+                       UTF8
+               }
        }
 }