]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0: Move g_content_type_* functions into a ContentType namespace
authorEvan Nemerson <evan@coeus-group.com>
Sat, 23 Oct 2010 08:38:27 +0000 (01:38 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Sat, 23 Oct 2010 08:38:27 +0000 (01:38 -0700)
Fixes bug 624053.

vapi/gio-2.0.vapi
vapi/packages/gio-2.0/gio-2.0-custom.vala
vapi/packages/gio-2.0/gio-2.0.metadata

index 4995c32ad84a3097fbe5d83573659c1aa0f5bc47..df524e9fc21f69a566da20bb779d93532271db61 100644 (file)
@@ -25,6 +25,29 @@ namespace GLib {
                [CCode (cname = "g_bus_watch_name_on_connection_with_closures", cheader_filename = "gio/gio.h")]
                public static uint watch_name_on_connection (GLib.DBusConnection connection, string name, GLib.BusNameWatcherFlags flags, [CCode (type = "GClosure*")] owned GLib.BusNameAppearedCallback name_appeared_handler, [CCode (type = "GClosure*")] owned GLib.BusNameVanishedCallback name_vanished_handler);
        }
+       [CCode (cprefix = "GContentType", lower_case_cprefix = "g_content_type_", gir_namespace = "Gio", gir_version = "2.0")]
+       namespace ContentType {
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static bool can_be_executable (string type);
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static bool equals (string type1, string type2);
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static string from_mime_type (string mime_type);
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static string get_description (string type);
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static GLib.Icon get_icon (string type);
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static string get_mime_type (string type);
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static string guess (string filename, uchar[] data, out bool result_uncertain);
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static string guess_for_tree (GLib.File root);
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static bool is_a (string type, string supertype);
+               [CCode (cheader_filename = "gio/gio.h")]
+               public static bool is_unknown (string type);
+       }
        [CCode (cheader_filename = "gio/gio.h")]
        public class AppLaunchContext : GLib.Object {
                [CCode (has_construct_function = false)]
@@ -2429,24 +2452,34 @@ namespace GLib {
        public const string VOLUME_IDENTIFIER_KIND_UUID;
        [CCode (cheader_filename = "gio/gio.h")]
        public const string VOLUME_MONITOR_EXTENSION_POINT_NAME;
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.can_be_executable")]
        [CCode (cname = "g_content_type_can_be_executable", cheader_filename = "gio/gio.h")]
        public static bool g_content_type_can_be_executable (string type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.equals")]
        [CCode (cname = "g_content_type_equals", cheader_filename = "gio/gio.h")]
        public static bool g_content_type_equals (string type1, string type2);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.from_mime_type")]
        [CCode (cname = "g_content_type_from_mime_type", cheader_filename = "gio/gio.h")]
        public static string g_content_type_from_mime_type (string mime_type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.get_description")]
        [CCode (cname = "g_content_type_get_description", cheader_filename = "gio/gio.h")]
        public static string g_content_type_get_description (string type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.get_icon")]
        [CCode (cname = "g_content_type_get_icon", cheader_filename = "gio/gio.h")]
        public static GLib.Icon g_content_type_get_icon (string type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.get_mime_type")]
        [CCode (cname = "g_content_type_get_mime_type", cheader_filename = "gio/gio.h")]
        public static string g_content_type_get_mime_type (string type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.guess")]
        [CCode (cname = "g_content_type_guess", cheader_filename = "gio/gio.h")]
        public static string g_content_type_guess (string filename, uchar[] data, out bool result_uncertain);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.guess_for_tree")]
        [CCode (cname = "g_content_type_guess_for_tree", cheader_filename = "gio/gio.h")]
        public static string g_content_type_guess_for_tree (GLib.File root);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.is_a")]
        [CCode (cname = "g_content_type_is_a", cheader_filename = "gio/gio.h")]
        public static bool g_content_type_is_a (string type, string supertype);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.is_unknown")]
        [CCode (cname = "g_content_type_is_unknown", cheader_filename = "gio/gio.h")]
        public static bool g_content_type_is_unknown (string type);
        [CCode (cname = "g_content_types_get_registered", cheader_filename = "gio/gio.h")]
index ad3be523f19e1af25529d4d7c048d7f801f129e9..28aef3be1d2ee7200eca30f94a50c04c54cf0bc5 100644 (file)
@@ -76,4 +76,34 @@ namespace GLib {
                public T get_proxy_sync<T> (string? name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError;
                public uint register_object<T> (string object_path, T object) throws GLib.IOError;
        }
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.can_be_executable")]
+       [CCode (cname = "g_content_type_can_be_executable", cheader_filename = "gio/gio.h")]
+       public static bool g_content_type_can_be_executable (string type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.equals")]
+       [CCode (cname = "g_content_type_equals", cheader_filename = "gio/gio.h")]
+       public static bool g_content_type_equals (string type1, string type2);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.from_mime_type")]
+       [CCode (cname = "g_content_type_from_mime_type", cheader_filename = "gio/gio.h")]
+       public static string g_content_type_from_mime_type (string mime_type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.get_description")]
+       [CCode (cname = "g_content_type_get_description", cheader_filename = "gio/gio.h")]
+       public static string g_content_type_get_description (string type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.get_icon")]
+       [CCode (cname = "g_content_type_get_icon", cheader_filename = "gio/gio.h")]
+       public static GLib.Icon g_content_type_get_icon (string type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.get_mime_type")]
+       [CCode (cname = "g_content_type_get_mime_type", cheader_filename = "gio/gio.h")]
+       public static string g_content_type_get_mime_type (string type);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.guess")]
+       [CCode (cname = "g_content_type_guess", cheader_filename = "gio/gio.h")]
+       public static string g_content_type_guess (string filename, uchar[] data, out bool result_uncertain);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.guess_for_tree")]
+       [CCode (cname = "g_content_type_guess_for_tree", cheader_filename = "gio/gio.h")]
+       public static string g_content_type_guess_for_tree (GLib.File root);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.is_a")]
+       [CCode (cname = "g_content_type_is_a", cheader_filename = "gio/gio.h")]
+       public static bool g_content_type_is_a (string type, string supertype);
+       [Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.is_unknown")]
+       [CCode (cname = "g_content_type_is_unknown", cheader_filename = "gio/gio.h")]
+       public static bool g_content_type_is_unknown (string type);
 }
index 4905040c2f462868750cf68dea64580c08523b7f..380828b06f9962af4f1cc9ff503dd831ebbe0c7c 100644 (file)
@@ -17,9 +17,10 @@ g_buffered_input_stream_peek.count hidden="1"
 g_buffered_input_stream_peek.offset default_value="0"
 g_buffered_input_stream_peek_buffer type_name="uint8" is_array="1" array_length_type="gsize"
 g_buffered_input_stream_peek_buffer.count hidden="1"
-g_content_type_from_mime_type transfer_ownership="1"
-g_content_type_get_* transfer_ownership="1"
-g_content_type_guess* transfer_ownership="1"
+g_content_type_* parent="ContentType"
+g_content_type_from_mime_type parent="ContentType" transfer_ownership="1"
+g_content_type_get_* parent="ContentType" transfer_ownership="1"
+g_content_type_guess* parent="ContentType" transfer_ownership="1"
 g_content_type_guess.data_size hidden="1"
 g_content_type_guess.result_uncertain is_out="1"
 g_content_types_get_registered type_arguments="string" transfer_ownership="1"