/usr/share/gtk-doc/html/grits/grits-grits-http.html is in libgrits-doc 0.8.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>grits-http</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="Grits Reference Manual">
<link rel="up" href="ch02.html" title="Data Access">
<link rel="prev" href="grits-grits-data.html" title="grits-data">
<link rel="next" href="grits-grits-wms.html" title="grits-wms">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="grits-grits-data.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.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">Grits Reference Manual</th>
<td><a accesskey="n" href="grits-grits-wms.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#grits-grits-http.synopsis" class="shortcut">Top</a>
|
<a href="#grits-grits-http.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="grits-grits-http"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="grits-grits-http.top_of_page"></a>grits-http</span></h2>
<p>grits-http — Hyper Text Transfer Protocol</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="grits-grits-http.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"> <a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp">GritsHttp</a>;
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="grits-grits-http.html#grits-http-available" title="grits_http_available ()">grits_http_available</a> (<em class="parameter"><code><a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> *http</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filter</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *cache</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *extract</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *index</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="grits-grits-http.html#grits-http-fetch" title="grits_http_fetch ()">grits_http_fetch</a> (<em class="parameter"><code><a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> *http</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *local</code></em>,
<em class="parameter"><code><a class="link" href="grits-grits-data.html#GritsCacheType" title="enum GritsCacheType"><span class="type">GritsCacheType</span></a> mode</code></em>,
<em class="parameter"><code><a class="link" href="grits-grits-data.html#GritsChunkCallback" title="GritsChunkCallback ()"><span class="type">GritsChunkCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="grits-grits-http.html#grits-http-free" title="grits_http_free ()">grits_http_free</a> (<em class="parameter"><code><a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> *http</code></em>);
<a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="returnvalue">GritsHttp</span></a> * <a class="link" href="grits-grits-http.html#grits-http-new" title="grits_http_new ()">grits_http_new</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="grits-grits-http.description"></a><h2>Description</h2>
<p>
<a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> is a small wrapper around libsoup to provide data access using
the Hyper Text Transfer Protocol. Each <a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> should be associated with
a particular server or dataset, all the files downloaded for this dataset
will be cached together in $HOME/.cache/grits/
</p>
</div>
<div class="refsect1">
<a name="grits-grits-http.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GritsHttp"></a><h3>GritsHttp</h3>
<pre class="programlisting">typedef struct {
SoupSession *soup;
gchar *prefix;
gboolean aborted;
} GritsHttp;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="grits-http-available"></a><h3>grits_http_available ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * grits_http_available (<em class="parameter"><code><a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> *http</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filter</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *cache</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *extract</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *index</code></em>);</pre>
<p>
Look through the cache and an HTTP index page for a list of available files.
The name of each file that matches the filter is added to the returned list.
</p>
<p>
The list as well as the strings contained in it should be freed afterwards.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>http</code></em> :</span></p></td>
<td>the <a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> connection to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filter</code></em> :</span></p></td>
<td>filter used to extract files from the index, or NULL
For example: "href=\"([^"]*)\""</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cache</code></em> :</span></p></td>
<td>path to the local cache, or NULL to not search the cache</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extract</code></em> :</span></p></td>
<td>regex used to extract filenames from the page, should match the
filename as $1, or NULL to use /http="([^"])"/</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
<td>path to the index page, or NULL to not search online</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the list of matching filenames</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="grits-http-fetch"></a><h3>grits_http_fetch ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * grits_http_fetch (<em class="parameter"><code><a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> *http</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *local</code></em>,
<em class="parameter"><code><a class="link" href="grits-grits-data.html#GritsCacheType" title="enum GritsCacheType"><span class="type">GritsCacheType</span></a> mode</code></em>,
<em class="parameter"><code><a class="link" href="grits-grits-data.html#GritsChunkCallback" title="GritsChunkCallback ()"><span class="type">GritsChunkCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Fetch a file from the cache. Whether the file is actually loaded from the
remote server depends on the value of <em class="parameter"><code>mode</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>http</code></em> :</span></p></td>
<td>the <a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> connection to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>the URI to fetch</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>local</code></em> :</span></p></td>
<td>the local name to give to the file</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>the update type to use when fetching data</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>callback to call when a chunk of data is received</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data to pass to the callback</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The local path to the complete file</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="grits-http-free"></a><h3>grits_http_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> grits_http_free (<em class="parameter"><code><a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> *http</code></em>);</pre>
<p>
Frees resources used by <em class="parameter"><code>http</code></em> and cancels any pending requests.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>http</code></em> :</span></p></td>
<td>the <a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> to free</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="grits-http-new"></a><h3>grits_http_new ()</h3>
<pre class="programlisting"><a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="returnvalue">GritsHttp</span></a> * grits_http_new (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>);</pre>
<p>
Create a new <a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a> for the given prefix
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>The prefix in the cache to store the downloaded files.
For example: * "/nexrad/level2/".</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new <a class="link" href="grits-grits-http.html#GritsHttp" title="GritsHttp"><span class="type">GritsHttp</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|