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-socket-buffer.h
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* gnome-vfs-socket-buffer.h
3  *
4  * Copyright (C) 2001 Seth Nickell
5  * Copyright (C) 2001 Maciej Stachowiak
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  */
23 /*
24  * Authors: Seth Nickell <snickell@stanford.edu>
25  *          Maciej Stachowiak <mjs@noisehavoc.org>
26  *          (reverse-engineered from code by Ian McKellar <yakk@yakk.net>)
27  */
28
29 #ifndef GNOME_VFS_SOCKET_BUFFER_H
30 #define GNOME_VFS_SOCKET_BUFFER_H
31
32 #include "gnome-vfs-socket.h"
33
34 G_BEGIN_DECLS
35
36 typedef struct GnomeVFSSocketBuffer GnomeVFSSocketBuffer;
37
38
39 GnomeVFSSocketBuffer* gnome_vfs_socket_buffer_new      (GnomeVFSSocket       *socket);
40 GnomeVFSResult        gnome_vfs_socket_buffer_destroy  (GnomeVFSSocketBuffer *socket_buffer,
41                                                         gboolean              close_socket);
42 GnomeVFSResult        gnome_vfs_socket_buffer_read     (GnomeVFSSocketBuffer *socket_buffer, 
43                                                         gpointer              buffer,
44                                                         GnomeVFSFileSize      bytes, 
45                                                         GnomeVFSFileSize     *bytes_read);
46 GnomeVFSResult        gnome_vfs_socket_buffer_peekc    (GnomeVFSSocketBuffer *socket_buffer, 
47                                                         char                 *character);
48 GnomeVFSResult        gnome_vfs_socket_buffer_write    (GnomeVFSSocketBuffer *socket_buffer,
49                                                         gconstpointer         buffer,
50                                                         GnomeVFSFileSize      bytes,
51                                                         GnomeVFSFileSize     *bytes_written);
52 GnomeVFSResult        gnome_vfs_socket_buffer_flush    (GnomeVFSSocketBuffer *socket_buffer);
53
54 G_END_DECLS
55
56 #endif