ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / doc / html / gnome-vfs-gnome-vfs-ssl.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gnome-vfs-ssl</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.0"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css">
2         .synopsis, .classsynopsis {
3             background: #eeeeee;
4             border: solid 1px #aaaaaa;
5             padding: 0.5em;
6         }
7         .programlisting {
8             background: #eeeeff;
9             border: solid 1px #aaaaff;
10             padding: 0.5em;
11         }
12         .variablelist {
13             padding: 4px;
14             margin-left: 3em;
15         }
16         .navigation {
17             background: #ffeeee;
18             border: solid 1px #ffaaaa;
19             margin-top: 0.5em;
20             margin-bottom: 0.5em;
21         }
22         .navigation a {
23             color: #770000;
24         }
25         .navigation a:visited {
26             color: #550000;
27         }
28         .navigation .title {
29             font-size: 200%;
30         }
31       </style><link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library"><link rel="up" href="modules.html" title="Filesystem Modules"><link rel="previous" href="gnome-vfs-gnome-vfs-module-callback-module-api.html" title="gnome-vfs-module-callback-module-api"><link rel="next" href="gnome-vfs-gnome-vfs-context.html" title="
32 GnomeVFSContext"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="gnome-vfs-gnome-vfs-module-callback-module-api.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="modules.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th><td><a accesskey="n" href="gnome-vfs-gnome-vfs-context.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="gnome-vfs-gnome-vfs-ssl"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">gnome-vfs-ssl</span></h2><p>gnome-vfs-ssl &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
33
34
35
36 <a
37 href="../glib/glib-Basic-Types.html#gboolean"
38 >gboolean</a>    <a href="gnome-vfs-gnome-vfs-ssl.html#gnome-vfs-ssl-enabled">gnome_vfs_ssl_enabled</a>           (void);
39 <a href="gnome-vfs-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-gnome-vfs-ssl.html#gnome-vfs-ssl-create">gnome_vfs_ssl_create</a>         (GnomeVFSSSL **handle_return,
40                                              const char *host,
41                                              unsigned int port);
42 <a href="gnome-vfs-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-gnome-vfs-ssl.html#gnome-vfs-ssl-create-from-fd">gnome_vfs_ssl_create_from_fd</a> (GnomeVFSSSL **handle_return,
43                                              <a
44 href="../glib/glib-Basic-Types.html#gint"
45 >gint</a> fd);
46 <a href="gnome-vfs-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-gnome-vfs-ssl.html#gnome-vfs-ssl-read">gnome_vfs_ssl_read</a>           (GnomeVFSSSL *ssl,
47                                              <a
48 href="../glib/glib-Basic-Types.html#gpointer"
49 >gpointer</a> buffer,
50                                              <a href="gnome-vfs-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
51                                              <a href="gnome-vfs-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read);
52 <a href="gnome-vfs-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-gnome-vfs-ssl.html#gnome-vfs-ssl-write">gnome_vfs_ssl_write</a>          (GnomeVFSSSL *ssl,
53                                              <a
54 href="../glib/glib-Basic-Types.html#gconstpointer"
55 >gconstpointer</a> buffer,
56                                              <a href="gnome-vfs-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
57                                              <a href="gnome-vfs-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written);
58 void        <a href="gnome-vfs-gnome-vfs-ssl.html#gnome-vfs-ssl-destroy">gnome_vfs_ssl_destroy</a>           (GnomeVFSSSL *ssl);
59 GnomeVFSSocket* <a href="gnome-vfs-gnome-vfs-ssl.html#gnome-vfs-ssl-to-socket">gnome_vfs_ssl_to_socket</a>     (GnomeVFSSSL *ssl);
60 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
61
62 </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="gnome-vfs-ssl-enabled"></a>gnome_vfs_ssl_enabled ()</h3><pre class="programlisting"><a
63 href="../glib/glib-Basic-Types.html#gboolean"
64 >gboolean</a>    gnome_vfs_ssl_enabled           (void);</pre><p>
65 Checks whether GnomeVFS was compiled with SSL support.</p><p>
66
67 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt class="literal">TRUE</tt> if GnomeVFS was compiled with SSL support,
68 otherwise <tt class="literal">FALSE</tt>.
69 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-ssl-create"></a>gnome_vfs_ssl_create ()</h3><pre class="programlisting"><a href="gnome-vfs-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_ssl_create         (GnomeVFSSSL **handle_return,
70                                              const char *host,
71                                              unsigned int port);</pre><p>
72 Creates an SSL socket connection at <i class="parameter"><tt>handle_return</tt></i> to <i class="parameter"><tt>host</tt></i> using
73 port <i class="parameter"><tt>port</tt></i>.</p><p>
74
75 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>handle_return</tt></i> :</span></td><td> pointer to a GnmoeVFSSSL struct, which will
76 contain an allocated GnomeVFSSSL object on return.
77 </td></tr><tr><td><span class="term"><i class="parameter"><tt>host</tt></i> :</span></td><td> string indicating the host to establish an SSL connection with
78 </td></tr><tr><td><span class="term"><i class="parameter"><tt>port</tt></i> :</span></td><td> the port number to connect to
79 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation
80 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-ssl-create-from-fd"></a>gnome_vfs_ssl_create_from_fd ()</h3><pre class="programlisting"><a href="gnome-vfs-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_ssl_create_from_fd (GnomeVFSSSL **handle_return,
81                                              <a
82 href="../glib/glib-Basic-Types.html#gint"
83 >gint</a> fd);</pre><p>
84 Try to establish an SSL connection over the file descriptor <i class="parameter"><tt>fd</tt></i>.</p><p>
85
86 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>handle_return</tt></i> :</span></td><td> pointer to a GnmoeVFSSSL struct, which will
87 contain an allocated GnomeVFSSSL object on return.
88 </td></tr><tr><td><span class="term"><i class="parameter"><tt>fd</tt></i> :</span></td><td> file descriptior to try and establish an SSL connection over
89 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a GnomeVFSResult indicating the success of the operation
90 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-ssl-read"></a>gnome_vfs_ssl_read ()</h3><pre class="programlisting"><a href="gnome-vfs-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_ssl_read           (GnomeVFSSSL *ssl,
91                                              <a
92 href="../glib/glib-Basic-Types.html#gpointer"
93 >gpointer</a> buffer,
94                                              <a href="gnome-vfs-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
95                                              <a href="gnome-vfs-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read);</pre><p>
96 Read <i class="parameter"><tt>bytes</tt></i> bytes of data from the SSL socket <i class="parameter"><tt>ssl</tt></i> into <i class="parameter"><tt>buffer</tt></i>.</p><p>
97
98 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ssl</tt></i> :</span></td><td> SSL socket to read data from
99 </td></tr><tr><td><span class="term"><i class="parameter"><tt>buffer</tt></i> :</span></td><td> allocated buffer of at least <i class="parameter"><tt>bytes</tt></i> bytes to be read into
100 </td></tr><tr><td><span class="term"><i class="parameter"><tt>bytes</tt></i> :</span></td><td> number of bytes to read from <i class="parameter"><tt>ssl</tt></i> into <i class="parameter"><tt>buffer</tt></i>
101 </td></tr><tr><td><span class="term"><i class="parameter"><tt>bytes_read</tt></i> :</span></td><td> pointer to a GnomeVFSFileSize, will contain
102 the number of bytes actually read from the socket on return.
103 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation
104 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-ssl-write"></a>gnome_vfs_ssl_write ()</h3><pre class="programlisting"><a href="gnome-vfs-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_ssl_write          (GnomeVFSSSL *ssl,
105                                              <a
106 href="../glib/glib-Basic-Types.html#gconstpointer"
107 >gconstpointer</a> buffer,
108                                              <a href="gnome-vfs-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
109                                              <a href="gnome-vfs-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written);</pre><p>
110 Write <i class="parameter"><tt>bytes</tt></i> bytes of data from <i class="parameter"><tt>buffer</tt></i> to <i class="parameter"><tt>ssl</tt></i>.</p><p>
111
112 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ssl</tt></i> :</span></td><td> SSL socket to write data to
113 </td></tr><tr><td><span class="term"><i class="parameter"><tt>buffer</tt></i> :</span></td><td> data to write to the socket
114 </td></tr><tr><td><span class="term"><i class="parameter"><tt>bytes</tt></i> :</span></td><td> number of bytes from <i class="parameter"><tt>buffer</tt></i> to write to <i class="parameter"><tt>ssl</tt></i>
115 </td></tr><tr><td><span class="term"><i class="parameter"><tt>bytes_written</tt></i> :</span></td><td> pointer to a GnomeVFSFileSize, will contain
116 the number of bytes actually written to the socket on return.
117 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation
118 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-ssl-destroy"></a>gnome_vfs_ssl_destroy ()</h3><pre class="programlisting">void        gnome_vfs_ssl_destroy           (GnomeVFSSSL *ssl);</pre><p>
119 Free resources used by <i class="parameter"><tt>ssl</tt></i> and close the connection.</p><p>
120
121 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ssl</tt></i> :</span></td><td> SSL socket to be closed and destroyed
122 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-ssl-to-socket"></a>gnome_vfs_ssl_to_socket ()</h3><pre class="programlisting">GnomeVFSSocket* gnome_vfs_ssl_to_socket     (GnomeVFSSSL *ssl);</pre><p>
123 Wrapper an SSL socket inside a standard GnomeVFSSocket.</p><p>
124
125 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ssl</tt></i> :</span></td><td> SSL socket to convert into a standard socket
126 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a newly allocated GnomeVFSSocket corresponding to <i class="parameter"><tt>ssl</tt></i>.
127 </td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="gnome-vfs-gnome-vfs-module-callback-module-api.html"><b>&lt;&lt; gnome-vfs-module-callback-module-api</b></a></td><td align="right"><a accesskey="n" href="gnome-vfs-gnome-vfs-context.html"><b>
128 GnomeVFSContext &gt;&gt;</b></a></td></tr></table></body></html>