summaryrefslogtreecommitdiff
path: root/daemon/gvfsftpconnection.h
blob: 7d0c697550a690789abb67af770478e2f397d90c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* GIO - GLib Input, Output and Streaming Library
 *
 * Copyright (C) 2009 Benjamin Otte <otte@gnome.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author: Benjamin Otte <otte@gnome.org>
 */

#ifndef __G_VFS_FTP_CONNECTION_H__
#define __G_VFS_FTP_CONNECTION_H__

#include <gio/gio.h>

G_BEGIN_DECLS


typedef struct _GVfsFtpConnection GVfsFtpConnection;

GVfsFtpConnection *     g_vfs_ftp_connection_new              (GSocketConnectable *     addr,
                                                               GCancellable *           cancellable,
                                                               GError **                error);
void                    g_vfs_ftp_connection_free             (GVfsFtpConnection *      conn);

gboolean                g_vfs_ftp_connection_send             (GVfsFtpConnection *      conn,
                                                               const char *             command,
                                                               int                      len,
                                                               GCancellable *           cancellable,
                                                               GError **                error);
guint                   g_vfs_ftp_connection_receive          (GVfsFtpConnection *      conn,
                                                               char ***                 reply,
                                                               GCancellable *           cancellable,
                                                               GError **                error);

gboolean                g_vfs_ftp_connection_is_usable        (GVfsFtpConnection *      conn);
GSocketAddress *        g_vfs_ftp_connection_get_address      (GVfsFtpConnection *      conn,
                                                               GError **                error);
guint                   g_vfs_ftp_connection_get_debug_id     (GVfsFtpConnection *      conn);

gboolean                g_vfs_ftp_connection_open_data_connection
                                                              (GVfsFtpConnection *      conn,
                                                               GSocketAddress *         addr,
                                                               GCancellable *           cancellable,
                                                               GError **                error);
GSocketAddress *        g_vfs_ftp_connection_listen_data_connection
                                                              (GVfsFtpConnection *      conn,
                                                               GError **                error);
gboolean                g_vfs_ftp_connection_accept_data_connection
                                                              (GVfsFtpConnection *      conn,
                                                               GCancellable *           cancellable,
                                                               GError **                error);
void                    g_vfs_ftp_connection_close_data_connection
                                                              (GVfsFtpConnection *      conn);
GIOStream *             g_vfs_ftp_connection_get_data_stream  (GVfsFtpConnection *      conn);



G_END_DECLS

#endif /* __G_VFS_FTP_CONNECTION_H__ */