[vala] gio-2.0: Move g_content_type_* functions into a ContentType namespace



commit 02ff2621a2ab49a783c80ff78bca9bbb0838c43d
Author: Evan Nemerson <evan coeus-group com>
Date:   Sat Oct 23 01:38:27 2010 -0700

    gio-2.0: Move g_content_type_* functions into a ContentType namespace
    
    Fixes bug 624053.

 vapi/gio-2.0.vapi                         |   33 +++++++++++++++++++++++++++++
 vapi/packages/gio-2.0/gio-2.0-custom.vala |   30 ++++++++++++++++++++++++++
 vapi/packages/gio-2.0/gio-2.0.metadata    |    7 +++--
 3 files changed, 67 insertions(+), 3 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index 4995c32..df524e9 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -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")]
diff --git a/vapi/packages/gio-2.0/gio-2.0-custom.vala b/vapi/packages/gio-2.0/gio-2.0-custom.vala
index ad3be52..28aef3b 100644
--- a/vapi/packages/gio-2.0/gio-2.0-custom.vala
+++ b/vapi/packages/gio-2.0/gio-2.0-custom.vala
@@ -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);
 }
diff --git a/vapi/packages/gio-2.0/gio-2.0.metadata b/vapi/packages/gio-2.0/gio-2.0.metadata
index 4905040..380828b 100644
--- a/vapi/packages/gio-2.0/gio-2.0.metadata
+++ b/vapi/packages/gio-2.0/gio-2.0.metadata
@@ -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"



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