ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / libgnomevfs / gnome-vfs-inet-connection.h
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* gnome-vfs-inet-connection.h - Functions for creating and destroying Internet
3    connections.
4
5    Copyright (C) 1999 Free Software Foundation
6
7    The Gnome Library is free software; you can redistribute it and/or
8    modify it under the terms of the GNU Library General Public License as
9    published by the Free Software Foundation; either version 2 of the
10    License, or (at your option) any later version.
11
12    The Gnome Library is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15    Library General Public License for more details.
16
17    You should have received a copy of the GNU Library General Public
18    License along with the Gnome Library; see the file COPYING.LIB.  If not,
19    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20    Boston, MA 02111-1307, USA.
21
22    Author: Ettore Perazzoli <ettore@gnu.org> */
23
24 #ifndef GNOME_VFS_INET_CONNECTION_H
25 #define GNOME_VFS_INET_CONNECTION_H
26
27 #include <libgnomevfs/gnome-vfs-cancellation.h>
28 #include <libgnomevfs/gnome-vfs-socket.h>
29 #include <libgnomevfs/gnome-vfs-socket-buffer.h>
30
31 G_BEGIN_DECLS
32
33 typedef struct GnomeVFSInetConnection GnomeVFSInetConnection;
34
35 GnomeVFSResult   gnome_vfs_inet_connection_create
36                                         (GnomeVFSInetConnection **connection_return,
37                                          const gchar *host_name,
38                                          guint host_port,
39                                          GnomeVFSCancellation *cancellation);
40
41 /* free the connection structure and close the socket */
42 void             gnome_vfs_inet_connection_destroy
43                                         (GnomeVFSInetConnection *connection,
44                                          GnomeVFSCancellation *cancellation);
45
46 /* free the connection structure without closing the socket */
47 void             gnome_vfs_inet_connection_free
48                                         (GnomeVFSInetConnection *connection,
49                                          GnomeVFSCancellation *cancellation);
50
51 GnomeVFSSocket * gnome_vfs_inet_connection_to_socket 
52                                         (GnomeVFSInetConnection *connection);
53
54 GnomeVFSSocketBuffer *gnome_vfs_inet_connection_to_socket_buffer 
55                                         (GnomeVFSInetConnection *connection);
56
57 int gnome_vfs_inet_connection_get_fd    (GnomeVFSInetConnection *connection);
58
59 G_END_DECLS
60
61 #endif /* GNOME_VFS_INET_CONNECTION_H */