summaryrefslogtreecommitdiff
path: root/daemon/gvfsftpconnection.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2009-06-11 17:32:28 +0200
committerBenjamin Otte <otte@gnome.org>2009-06-11 17:38:03 +0200
commitb07c3a9b238f03b203c09adbb764e88b585cfdc6 (patch)
tree915daf66d5c1a992d31786c292412567f8ce8d49 /daemon/gvfsftpconnection.c
parent1f97543c162244e85b08de190a38f92b4338312b (diff)
downloadgvfs-b07c3a9b238f03b203c09adbb764e88b585cfdc6.tar.gz
[FTP] simplify debug id API
Add a separate function for requesting the debug id
Diffstat (limited to 'daemon/gvfsftpconnection.c')
-rw-r--r--daemon/gvfsftpconnection.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/daemon/gvfsftpconnection.c b/daemon/gvfsftpconnection.c
index 81822584..4c398748 100644
--- a/daemon/gvfsftpconnection.c
+++ b/daemon/gvfsftpconnection.c
@@ -239,9 +239,25 @@ g_vfs_ftp_connection_close_data_connection (GVfsFtpConnection *conn)
}
/**
+ * g_vfs_ftp_connection_get_debug_id:
+ * @conn: the connection
+ *
+ * Gets an ID that uniquely identifies this connection. Intended for use in
+ * debug print statements.
+ *
+ * Returns: the ID to use for referring to this connection in debug messages
+ **/
+guint
+g_vfs_ftp_connection_get_debug_id (GVfsFtpConnection *conn)
+{
+ g_return_val_if_fail (conn != NULL, 0);
+
+ return conn->debug_id;
+}
+
+/**
* g_vfs_ftp_connection_get_data_stream:
* @conn: a connection
- * @debug_id: %NULL or pointer taking id to use for debugging purposes
*
* Gets the data stream in use by @conn. It is an error to call this function
* when no data stream exists. Be sure to check the return value of
@@ -250,13 +266,11 @@ g_vfs_ftp_connection_close_data_connection (GVfsFtpConnection *conn)
* Returns: the data stream of @conn
**/
GIOStream *
-g_vfs_ftp_connection_get_data_stream (GVfsFtpConnection *conn, int *debug_id)
+g_vfs_ftp_connection_get_data_stream (GVfsFtpConnection *conn)
{
g_return_val_if_fail (conn != NULL, NULL);
g_return_val_if_fail (conn->data != NULL, NULL);
- if (debug_id)
- *debug_id = conn->debug_id;
return conn->data;
}