forked from dpryan79/libBigWig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbigWigIO_8h_source.html
143 lines (141 loc) · 16.4 KB
/
bigWigIO_8h_source.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libBigWig: bigWigIO.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libBigWig
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">bigWigIO.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="bigWigIO_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef LIBBIGWIG_IO_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define LIBBIGWIG_IO_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  </div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#ifndef NOCURL</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include <curl/curl.h></span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#else</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <stdio.h></span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#ifndef CURLTYPE_DEFINED</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#define CURLTYPE_DEFINED</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="keyword">typedef</span> <span class="keywordtype">int</span> CURLcode;</div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">typedef</span> <span class="keywordtype">void</span> CURL;</div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#define CURLE_OK 0</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#define CURLE_FAILED_INIT 1</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  </div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">extern</span> <span class="keywordtype">size_t</span> <a class="code" href="bigWigIO_8h.html#a2f4038b5ef0a0e7dc45a20fc0bb83925">GLOBAL_DEFAULTBUFFERSIZE</a>;</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="bigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66"> 28</a></span> <span class="keyword">enum</span> <a class="code" href="bigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66">bigWigFile_type_enum</a> {</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  BWG_FILE = 0,</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  BWG_HTTP = 1,</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  BWG_HTTPS = 2,</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  BWG_FTP = 3</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> };</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  </div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="structURL__t.html"> 38</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keyword">union </span>{</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#ifndef NOCURL</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="structURL__t.html#a01844303c9bf15b823504dbdf8eecdc5"> 41</a></span>  CURL *<a class="code" href="structURL__t.html#a01844303c9bf15b823504dbdf8eecdc5">curl</a>; </div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structURL__t.html#ad580083f95d86b68829b520d0b453b08"> 43</a></span>  FILE *<a class="code" href="structURL__t.html#ad580083f95d86b68829b520d0b453b08">fp</a>; </div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  } x; </div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="structURL__t.html#ad1d920711f91f388ce7115341b3907cf"> 45</a></span>  <span class="keywordtype">void</span> *<a class="code" href="structURL__t.html#ad1d920711f91f388ce7115341b3907cf">memBuf</a>; </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="structURL__t.html#a98edd5e13308f6fa6f4880c87430bca2"> 46</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structURL__t.html#a98edd5e13308f6fa6f4880c87430bca2">filePos</a>; </div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="structURL__t.html#ad560759e3af5e982fd369a27ba5b1dbc"> 47</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structURL__t.html#ad560759e3af5e982fd369a27ba5b1dbc">bufPos</a>; </div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structURL__t.html#a4f68a10b5d2284fd756562ea7bd02abc"> 48</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structURL__t.html#a4f68a10b5d2284fd756562ea7bd02abc">bufSize</a>; </div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="structURL__t.html#a2d3601123cd3d99cc184461007572b9f"> 49</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structURL__t.html#a2d3601123cd3d99cc184461007572b9f">bufLen</a>; </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structURL__t.html#a431adb9c33b3d8d43575799f6fdcd497"> 50</a></span>  <span class="keyword">enum</span> <a class="code" href="bigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66">bigWigFile_type_enum</a> type; </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structURL__t.html#ab1fe842d66e490e6851ec2fe4e5276e6"> 51</a></span>  <span class="keywordtype">int</span> <a class="code" href="structURL__t.html#ab1fe842d66e490e6851ec2fe4e5276e6">isCompressed</a>; </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structURL__t.html#a45fcd4a597a7dba67938d5aab253aebb"> 52</a></span>  <span class="keywordtype">char</span> *<a class="code" href="structURL__t.html#a45fcd4a597a7dba67938d5aab253aebb">fname</a>; </div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> } <a class="code" href="structURL__t.html">URL_t</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  </div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="keywordtype">size_t</span> <a class="code" href="bigWigIO_8h.html#a8f6a5aa097c9af9925171dd43d688f26">urlRead</a>(<a class="code" href="structURL__t.html">URL_t</a> *URL, <span class="keywordtype">void</span> *buf, <span class="keywordtype">size_t</span> bufSize);</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  </div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> CURLcode <a class="code" href="bigWigIO_8h.html#a55a1fcb43f68a2b3c3a2b66a6459a0a8">urlSeek</a>(<a class="code" href="structURL__t.html">URL_t</a> *URL, <span class="keywordtype">size_t</span> pos);</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  </div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <a class="code" href="structURL__t.html">URL_t</a> *<a class="code" href="bigWigIO_8h.html#a8583139627ed0a732e6d9b4f80231c87">urlOpen</a>(<span class="keywordtype">char</span> *fname, CURLcode (*callBack)(CURL*), <span class="keyword">const</span> <span class="keywordtype">char</span>* mode);</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  </div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="keywordtype">void</span> <a class="code" href="bigWigIO_8h.html#add8705cdab8e6f2193a50bf095f08470">urlClose</a>(<a class="code" href="structURL__t.html">URL_t</a> *URL);</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  </div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="preprocessor">#endif // LIBBIGWIG_IO_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="abigWigIO_8h_html_add8705cdab8e6f2193a50bf095f08470"><div class="ttname"><a href="bigWigIO_8h.html#add8705cdab8e6f2193a50bf095f08470">urlClose</a></div><div class="ttdeci">void urlClose(URL_t *URL)</div><div class="ttdoc">Close a local/remote file.</div><div class="ttdef"><b>Definition:</b> io.c:286</div></div>
<div class="ttc" id="astructURL__t_html_a45fcd4a597a7dba67938d5aab253aebb"><div class="ttname"><a href="structURL__t.html#a45fcd4a597a7dba67938d5aab253aebb">URL_t::fname</a></div><div class="ttdeci">char * fname</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:52</div></div>
<div class="ttc" id="abigWigIO_8h_html_a2f4038b5ef0a0e7dc45a20fc0bb83925"><div class="ttname"><a href="bigWigIO_8h.html#a2f4038b5ef0a0e7dc45a20fc0bb83925">GLOBAL_DEFAULTBUFFERSIZE</a></div><div class="ttdeci">size_t GLOBAL_DEFAULTBUFFERSIZE</div><div class="ttdef"><b>Definition:</b> io.c:12</div></div>
<div class="ttc" id="astructURL__t_html_a2d3601123cd3d99cc184461007572b9f"><div class="ttname"><a href="structURL__t.html#a2d3601123cd3d99cc184461007572b9f">URL_t::bufLen</a></div><div class="ttdeci">size_t bufLen</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:49</div></div>
<div class="ttc" id="abigWigIO_8h_html_a53551ff2ef7a2c1b938e94ef9592ab66"><div class="ttname"><a href="bigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66">bigWigFile_type_enum</a></div><div class="ttdeci">bigWigFile_type_enum</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:28</div></div>
<div class="ttc" id="astructURL__t_html_ad1d920711f91f388ce7115341b3907cf"><div class="ttname"><a href="structURL__t.html#ad1d920711f91f388ce7115341b3907cf">URL_t::memBuf</a></div><div class="ttdeci">void * memBuf</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:45</div></div>
<div class="ttc" id="astructURL__t_html_a01844303c9bf15b823504dbdf8eecdc5"><div class="ttname"><a href="structURL__t.html#a01844303c9bf15b823504dbdf8eecdc5">URL_t::curl</a></div><div class="ttdeci">CURL * curl</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:41</div></div>
<div class="ttc" id="astructURL__t_html_ab1fe842d66e490e6851ec2fe4e5276e6"><div class="ttname"><a href="structURL__t.html#ab1fe842d66e490e6851ec2fe4e5276e6">URL_t::isCompressed</a></div><div class="ttdeci">int isCompressed</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:51</div></div>
<div class="ttc" id="astructURL__t_html_ad560759e3af5e982fd369a27ba5b1dbc"><div class="ttname"><a href="structURL__t.html#ad560759e3af5e982fd369a27ba5b1dbc">URL_t::bufPos</a></div><div class="ttdeci">size_t bufPos</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:47</div></div>
<div class="ttc" id="abigWigIO_8h_html_a8f6a5aa097c9af9925171dd43d688f26"><div class="ttname"><a href="bigWigIO_8h.html#a8f6a5aa097c9af9925171dd43d688f26">urlRead</a></div><div class="ttdeci">size_t urlRead(URL_t *URL, void *buf, size_t bufSize)</div><div class="ttdoc">Reads data into the given buffer.</div><div class="ttdef"><b>Definition:</b> io.c:89</div></div>
<div class="ttc" id="astructURL__t_html"><div class="ttname"><a href="structURL__t.html">URL_t</a></div><div class="ttdoc">This structure holds the file pointers and buffers needed for raw access to local and remote files.</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:38</div></div>
<div class="ttc" id="abigWigIO_8h_html_a8583139627ed0a732e6d9b4f80231c87"><div class="ttname"><a href="bigWigIO_8h.html#a8583139627ed0a732e6d9b4f80231c87">urlOpen</a></div><div class="ttdeci">URL_t * urlOpen(char *fname, CURLcode(*callBack)(CURL *), const char *mode)</div><div class="ttdoc">Open a local or remote file.</div><div class="ttdef"><b>Definition:</b> io.c:161</div></div>
<div class="ttc" id="astructURL__t_html_ad580083f95d86b68829b520d0b453b08"><div class="ttname"><a href="structURL__t.html#ad580083f95d86b68829b520d0b453b08">URL_t::fp</a></div><div class="ttdeci">FILE * fp</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:43</div></div>
<div class="ttc" id="abigWigIO_8h_html_a55a1fcb43f68a2b3c3a2b66a6459a0a8"><div class="ttname"><a href="bigWigIO_8h.html#a55a1fcb43f68a2b3c3a2b66a6459a0a8">urlSeek</a></div><div class="ttdeci">CURLcode urlSeek(URL_t *URL, size_t pos)</div><div class="ttdoc">Seeks to a given position in a local or remote file.</div><div class="ttdef"><b>Definition:</b> io.c:120</div></div>
<div class="ttc" id="astructURL__t_html_a4f68a10b5d2284fd756562ea7bd02abc"><div class="ttname"><a href="structURL__t.html#a4f68a10b5d2284fd756562ea7bd02abc">URL_t::bufSize</a></div><div class="ttdeci">size_t bufSize</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:48</div></div>
<div class="ttc" id="astructURL__t_html_a98edd5e13308f6fa6f4880c87430bca2"><div class="ttname"><a href="structURL__t.html#a98edd5e13308f6fa6f4880c87430bca2">URL_t::filePos</a></div><div class="ttdeci">size_t filePos</div><div class="ttdef"><b>Definition:</b> bigWigIO.h:46</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Nov 8 2020 13:48:36 for libBigWig by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>