/* return codes for CURL_CHUNK_BGNFUNCTION */
#define CURL_CHUNK_BGN_FUNC_OK      0
#define CURL_CHUNK_BGN_FUNC_FAIL    1 /* tell the lib to end the task */
#define CURL_CHUNK_BGN FUNC_SKIP    2 /* skip this chunk over */

/* if splitting of data transfer is enabled, this callback is called before
   download of an individual chunk started. Note that parameter "remains" works
   only for FTP wildcard downloading (for now), otherwise is not used */
typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
                                        void *ptr,
                                        int remains);

/* return codes for CURL_CHUNK_ENDFUNCTION */
#define CURL_CHUNK_END_FUNC_OK      0
#define CURL_CHUNK_END_FUNC_FAIL    1 /* tell the lib to end the task */

/* if splitting of data transfer is enabled this callback is called after
   download of an individual chunk finished. Note! If is this callback set that
   this callback HAVE TO BE CALLED FOR ALL chunks. Even if some of them 
   have been skipped. This is the reason why we don't need "transfer_info" 
   parameter that is in chunk_bgn_callback and we are not interested in 
   "remains" parameter too. However, you could use the CURLOPT_CHUNK_DATA 
   option to info this callback if it is necessary */
typedef long (*curl_chunk_bgn_callback)(void *ptr);

/* return codes for FNMATCHFUNCTION */
#define CURL_FNMATCHFUNC_MATCH    0 /* string corresponds to the pattern */
#define CURL_FNMATCHFUNC_NOMATCH  1 /* pattern does'nt match the string */
#define CURL_FNMATCHFUNC_FAIL     2 /* an error occurred */

/* callback type for wildcard downloading pattern matching and etc. If the
   string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */
typedef int (*curl_fnmatch_callback)(const char *pattern,
                                     const char *string);