1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <title>CURLOPT_CHUNK_BGN_FUNCTION man page</title>
5 <meta name="generator" content="roffit">
6 <STYLE type="text/css">
12 P.level0, pre.level0 {
16 P.level1, pre.level1 {
20 P.level2, pre.level2 {
37 background-color: #e0e0e0;
43 font-family: monospace;
53 <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
54 <p class="level0">CURLOPT_CHUNK_BGN_FUNCTION - callback before a transfer with FTP wildcardmatch <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
55 <p class="level0"><pre class="level0">
56 #include <curl/curl.h>
58 long chunk_bgn_callback(const void *transfer_info, void *ptr,
61 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_BGN_FUNCTION,
62 chunk_bgn_callback);
64 <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
65 <p class="level0">Pass a pointer to your callback function, which should match the prototype shown above.
66 <p class="level0">This callback function gets called by libcurl before a part of the stream is going to be transferred (if the transfer supports chunks).
67 <p class="level0">The <span Class="emphasis">transfer_info</span> pointer will point to a struct curl_fileinfo with details about the file that is about to get transferred.
68 <p class="level0">This callback makes sense only when using the <a Class="emphasis" href="./CURLOPT_WILDCARDMATCH.html">CURLOPT_WILDCARDMATCH</a> option for now.
69 <p class="level0">The target of transfer_info parameter is a "feature depended" structure. For the FTP wildcard download, the target is curl_fileinfo structure (see <span Class="emphasis">curl/curl.h</span>). The parameter <span Class="emphasis">ptr</span> is a pointer given by <a Class="emphasis" href="./CURLOPT_CHUNK_DATA.html">CURLOPT_CHUNK_DATA</a>. The parameter remains contains number of chunks remaining per the transfer. If the feature is not available, the parameter has zero value.
70 <p class="level0">Return <span Class="emphasis">CURL_CHUNK_BGN_FUNC_OK</span> if everything is fine, <span Class="emphasis">CURL_CHUNK_BGN_FUNC_SKIP</span> if you want to skip the concrete chunk or <span Class="emphasis">CURL_CHUNK_BGN_FUNC_FAIL</span> to tell libcurl to stop if some error occurred. <a name="DEFAULT"></a><h2 class="nroffsh">DEFAULT</h2>
71 <p class="level0">NULL <a name="PROTOCOLS"></a><h2 class="nroffsh">PROTOCOLS</h2>
72 <p class="level0">FTP <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
73 <p class="level0">TODO <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
74 <p class="level0">This was added in 7.21.0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
75 <p class="level0">Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
76 <p class="level0"><a Class="manpage" href="./CURLOPT_CHUNK_END_FUNCTION.html">CURLOPT_CHUNK_END_FUNCTION</a>, <a Class="manpage" href="./CURLOPT_WILDCARDMATCH.html">CURLOPT_WILDCARDMATCH</a>, <span Class="manpage"> </span> <p class="roffit">
77 This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.