Re: Patch to deprecate the gnome_vfs_async_*_as_channel functions



Mikael Hallendal wrote:
Hi,

Argh, and here is the actual patch.

As mentioned here on the list in the past the gnome_vfs_async_*_as_channel API doesn't behave as intended [1], [2] and [3] and all functions aren't even implemented [4].

My suggestion is to deprecate them since no one seems to have noticed that it's totally broken (ie. no one uses them) so at least me get the idea that they aren't that useful.

If someone in the future has need for them they could be fixed/rewritten and undeprecated.

Can I commit this patch?

Best Regards,
   Mikael Hallendal

[1] http://bugzilla.gnome.org/show_bug.cgi?id=157266
[2] http://bugzilla.gnome.org/show_bug.cgi?id=157265
[3] http://bugzilla.gnome.org/show_bug.cgi?id=157261
[4] http://bugzilla.gnome.org/show_bug.cgi?id=138398



--
Imendio AB, http://www.imendio.com/
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-vfs/ChangeLog,v
retrieving revision 1.2143
diff -u -B -p -r1.2143 ChangeLog
--- ChangeLog	14 Mar 2005 22:29:59 -0000	1.2143
+++ ChangeLog	18 Mar 2005 13:44:27 -0000
@@ -1,3 +1,13 @@
+2005-03-18  Mikael Hallendal  <micke imendio com>
+
+	* libgnomevfs/gnome-vfs-async-ops.c:
+	* libgnomevfs/gnome-vfs-async-ops.h:
+	- Deprecate the gnome_vfs_async_*_as_channel functions. One of them
+	  aren't even implemented and the others doesn't behave as intended.
+	  See bugs #157266, #157265, #157261, #138398 in GNOME Bugzilla. 
+	- If they are needed they can be fixed and undeprecated in a future
+	  version of GnomeVFS.
+
 2005-03-14  Kjartan Maraas  <kmaraas gnome org>
 
 	* modules/http-neon-method.c: (http_get_file_info), (http_options),
Index: libgnomevfs/gnome-vfs-async-ops.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-async-ops.c,v
retrieving revision 1.11
diff -u -B -p -r1.11 gnome-vfs-async-ops.c
--- libgnomevfs/gnome-vfs-async-ops.c	16 Feb 2005 11:00:03 -0000	1.11
+++ libgnomevfs/gnome-vfs-async-ops.c	18 Mar 2005 13:44:27 -0000
@@ -223,6 +223,11 @@ async_open_as_channel (GnomeVFSURI *uri,
  * @callback will be called with @callback_data, the result of the operation,
  * and if the result was %GNOME_VFS_OK, a reference to a #GIOChannel pointing
  * at @uri in @open_mode.
+ *
+ * This function has been deprecated due to behaving weirdly which suggests 
+ * that it hasn't been used. See bugs #157266, #157265, #157261, #138398 in
+ * the GNOME Bugzilla. If the *_as_channel functions are needed they should be
+ * fixed and undeprecated.
  **/
 void
 gnome_vfs_async_open_uri_as_channel (GnomeVFSAsyncHandle **handle_return,
@@ -259,6 +264,11 @@ gnome_vfs_async_open_uri_as_channel (Gno
  * @callback will be called with @callback_data, the result of the operation,
  * and if the result was %GNOME_VFS_OK, a reference to a #GIOChannel pointing
  * at @text_uri in @open_mode.
+ *
+ * This function has been deprecated due to behaving weirdly which suggests 
+ * that it hasn't been used. See bugs #157266, #157265, #157261, #138398 in
+ * the GNOME Bugzilla. If the *_as_channel functions are needed they should be
+ * fixed and undeprecated.
  **/
 void
 gnome_vfs_async_open_as_channel (GnomeVFSAsyncHandle **handle_return,
@@ -417,6 +427,11 @@ gnome_vfs_async_create (GnomeVFSAsyncHan
  * been established @callback will be called with @callback_data, the result of the 
  * operation, and if the result was %GNOME_VFS_OK, a reference to a #GIOChannel pointing
  * at @text_uri in @open_mode.
+ *
+ * This function has been deprecated due to behaving weirdly which suggests 
+ * that it hasn't been used. See bugs #157266, #157265, #157261, #138398 in
+ * the GNOME Bugzilla. If the *_as_channel functions are needed they should be
+ * fixed and undeprecated.
  **/
 void
 gnome_vfs_async_create_as_channel (GnomeVFSAsyncHandle **handle_return,
Index: libgnomevfs/gnome-vfs-async-ops.h
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-async-ops.h,v
retrieving revision 1.36
diff -u -B -p -r1.36 gnome-vfs-async-ops.h
--- libgnomevfs/gnome-vfs-async-ops.h	20 Oct 2003 11:55:54 -0000	1.36
+++ libgnomevfs/gnome-vfs-async-ops.h	18 Mar 2005 13:44:27 -0000
@@ -106,6 +106,7 @@ typedef GnomeVFSAsyncCallback GnomeVFSAs
  **/
 typedef GnomeVFSAsyncCallback GnomeVFSAsyncCloseCallback;
 
+#ifndef GNOME_VFS_DISABLE_DEPRECATED
 /**
  * GnomeVFSAsyncOpenAsChannelCallback:
  * @handle: handle of the operation generating the callback
@@ -121,7 +122,9 @@ typedef void	(* GnomeVFSAsyncOpenAsChann
 						 GIOChannel *channel,
 						 GnomeVFSResult result,
 						 gpointer callback_data);
+#endif
 
+#ifndef GNOME_VFS_DISABLE_DEPRECATED
 /**
  * GnomeVFSAsyncCreateAsChannelCallback:
  * @handle: handle of the operation generating the callback
@@ -133,6 +136,7 @@ typedef void	(* GnomeVFSAsyncOpenAsChann
  * Callback for the gnome_vfs_async_create_as_channel() function.
  **/
 typedef GnomeVFSAsyncOpenAsChannelCallback GnomeVFSAsyncCreateAsChannelCallback;
+#endif
 
 /**
  * GnomeVFSAsyncReadCallback:
@@ -304,6 +308,8 @@ void           gnome_vfs_async_open_uri 
 						       int				      priority,
 						       GnomeVFSAsyncOpenCallback              callback,
 						       gpointer                               callback_data);
+
+#ifndef GNOME_VFS_DISABLE_DEPRECATED
 void           gnome_vfs_async_open_as_channel        (GnomeVFSAsyncHandle                  **handle_return,
 						       const gchar                           *text_uri,
 						       GnomeVFSOpenMode                       open_mode,
@@ -318,6 +324,8 @@ void           gnome_vfs_async_open_uri_
 						       int				      priority,
 						       GnomeVFSAsyncOpenAsChannelCallback     callback,
 						       gpointer                               callback_data);
+#endif /* GNOME_VFS_DISABLE_DEPRECATED */
+
 void           gnome_vfs_async_create                 (GnomeVFSAsyncHandle                  **handle_return,
 						       const gchar                           *text_uri,
 						       GnomeVFSOpenMode                       open_mode,
@@ -340,6 +348,7 @@ void           gnome_vfs_async_create_sy
 						       int				      priority,
 						       GnomeVFSAsyncOpenCallback              callback,
 						       gpointer                               callback_data);
+#ifndef GNOME_VFS_DISABLE_DEPRECATED
 void           gnome_vfs_async_create_as_channel      (GnomeVFSAsyncHandle                  **handle_return,
 						       const gchar                           *text_uri,
 						       GnomeVFSOpenMode                       open_mode,
@@ -356,6 +365,8 @@ void           gnome_vfs_async_create_ur
 						       int				      priority,
 						       GnomeVFSAsyncCreateAsChannelCallback   callback,
 						       gpointer                               callback_data);
+#endif /* GNOME_VFS_DISABLE_DEPRECATED */
+
 void           gnome_vfs_async_close                  (GnomeVFSAsyncHandle                   *handle,
 						       GnomeVFSAsyncCloseCallback             callback,
 						       gpointer                               callback_data);


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