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-20-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-20-gnome-vfs-module-callback-module-api.html" title="gnome-vfs-module-callback-module-api"><link rel="next" href="gnome-vfs-20-gnome-vfs-context.html" title="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-20-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-20-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-20-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">
32
33
34
35 <a
36 href="../glib/glib-Basic-Types.html#gboolean"
37 >gboolean</a>    <a href="gnome-vfs-20-gnome-vfs-ssl.html#gnome-vfs-ssl-enabled">gnome_vfs_ssl_enabled</a>           (void);
38 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-ssl.html#gnome-vfs-ssl-create">gnome_vfs_ssl_create</a>         (GnomeVFSSSL **handle_return,
39                                              const char *host,
40                                              unsigned int port);
41 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-ssl.html#gnome-vfs-ssl-create-from-fd">gnome_vfs_ssl_create_from_fd</a> (GnomeVFSSSL **handle_return,
42                                              <a
43 href="../glib/glib-Basic-Types.html#gint"
44 >gint</a> fd);
45 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-ssl.html#gnome-vfs-ssl-read">gnome_vfs_ssl_read</a>           (GnomeVFSSSL *ssl,
46                                              <a
47 href="../glib/glib-Basic-Types.html#gpointer"
48 >gpointer</a> buffer,
49                                              <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
50                                              <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read);
51 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-ssl.html#gnome-vfs-ssl-write">gnome_vfs_ssl_write</a>          (GnomeVFSSSL *ssl,
52                                              <a
53 href="../glib/glib-Basic-Types.html#gconstpointer"
54 >gconstpointer</a> buffer,
55                                              <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
56                                              <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written);
57 void        <a href="gnome-vfs-20-gnome-vfs-ssl.html#gnome-vfs-ssl-destroy">gnome_vfs_ssl_destroy</a>           (GnomeVFSSSL *ssl);
58 GnomeVFSSocket* <a href="gnome-vfs-20-gnome-vfs-ssl.html#gnome-vfs-ssl-to-socket">gnome_vfs_ssl_to_socket</a>     (GnomeVFSSSL *ssl);
59 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
60
61 </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><a class="indexterm" name="id2981548"></a><pre class="programlisting"><a
62 href="../glib/glib-Basic-Types.html#gboolean"
63 >gboolean</a>    gnome_vfs_ssl_enabled           (void);</pre><p>
64 Checks whether GnomeVFS was compiled with SSL support.</p><p>
65
66 </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,
67 otherwise <tt class="literal">FALSE</tt>.
68 </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><a class="indexterm" name="id2981625"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_ssl_create         (GnomeVFSSSL **handle_return,
69                                              const char *host,
70                                              unsigned int port);</pre><p>
71 Creates an SSL socket connection at <i class="parameter"><tt>handle_return</tt></i> to <i class="parameter"><tt>host</tt></i> using
72 port <i class="parameter"><tt>port</tt></i>.</p><p>
73
74 </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
75 contain an allocated GnomeVFSSSL object on return.
76 </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
77 </td></tr><tr><td><span class="term"><i class="parameter"><tt>port</tt></i> :</span></td><td> the port number to connect to
78 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation
79 </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><a class="indexterm" name="id2981789"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_ssl_create_from_fd (GnomeVFSSSL **handle_return,
80                                              <a
81 href="../glib/glib-Basic-Types.html#gint"
82 >gint</a> fd);</pre><p>
83 Try to establish an SSL connection over the file descriptor <i class="parameter"><tt>fd</tt></i>.</p><p>
84
85 </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
86 contain an allocated GnomeVFSSSL object on return.
87 </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
88 </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
89 </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><a class="indexterm" name="id2981912"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_ssl_read           (GnomeVFSSSL *ssl,
90                                              <a
91 href="../glib/glib-Basic-Types.html#gpointer"
92 >gpointer</a> buffer,
93                                              <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
94                                              <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read);</pre><p>
95 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>
96
97 </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
98 </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
99 </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>
100 </td></tr><tr><td><span class="term"><i class="parameter"><tt>bytes_read</tt></i> :</span></td><td> pointer to a GnomeVFSFileSize, will contain
101 the number of bytes actually read from the socket on return.
102 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation
103 </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><a class="indexterm" name="id2982120"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_ssl_write          (GnomeVFSSSL *ssl,
104                                              <a
105 href="../glib/glib-Basic-Types.html#gconstpointer"
106 >gconstpointer</a> buffer,
107                                              <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
108                                              <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written);</pre><p>
109 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>
110
111 </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
112 </td></tr><tr><td><span class="term"><i class="parameter"><tt>buffer</tt></i> :</span></td><td> data to write to the socket
113 </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>
114 </td></tr><tr><td><span class="term"><i class="parameter"><tt>bytes_written</tt></i> :</span></td><td> pointer to a GnomeVFSFileSize, will contain
115 the number of bytes actually written to the socket on return.
116 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation
117 </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><a class="indexterm" name="id2982322"></a><pre class="programlisting">void        gnome_vfs_ssl_destroy           (GnomeVFSSSL *ssl);</pre><p>
118 Free resources used by <i class="parameter"><tt>ssl</tt></i> and close the connection.</p><p>
119
120 </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
121 </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><a class="indexterm" name="id2982404"></a><pre class="programlisting">GnomeVFSSocket* gnome_vfs_ssl_to_socket     (GnomeVFSSSL *ssl);</pre><p>
122 Wrapper an SSL socket inside a standard GnomeVFSSocket.</p><p>
123
124 </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
125 </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>.
126 </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-20-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-20-gnome-vfs-context.html"><b>GnomeVFSContext &gt;&gt;</b></a></td></tr></table></body></html>