00001 #ifndef HEADER_CURL_WILDCARD_H 00002 #define HEADER_CURL_WILDCARD_H 00003 /*************************************************************************** 00004 * _ _ ____ _ 00005 * Project ___| | | | _ \| | 00006 * / __| | | | |_) | | 00007 * | (__| |_| | _ <| |___ 00008 * \___|\___/|_| \_\_____| 00009 * 00010 * Copyright (C) 2010 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. 00011 * 00012 * This software is licensed as described in the file COPYING, which 00013 * you should have received as part of this distribution. The terms 00014 * are also available at https://curl.haxx.se/docs/copyright.html. 00015 * 00016 * You may opt to use, copy, modify, merge, publish, distribute and/or sell 00017 * copies of the Software, and permit persons to whom the Software is 00018 * furnished to do so, under the terms of the COPYING file. 00019 * 00020 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 00021 * KIND, either express or implied. 00022 * 00023 ***************************************************************************/ 00024 00025 #include <curl/curl.h> 00026 00027 /* list of wildcard process states */ 00028 typedef enum { 00029 CURLWC_INIT = 0, 00030 CURLWC_MATCHING, /* library is trying to get list of addresses for 00031 downloading */ 00032 CURLWC_DOWNLOADING, 00033 CURLWC_CLEAN, /* deallocate resources and reset settings */ 00034 CURLWC_SKIP, /* skip over concrete file */ 00035 CURLWC_ERROR, /* error cases */ 00036 CURLWC_DONE /* if is wildcard->state == CURLWC_DONE wildcard loop 00037 will end */ 00038 } curl_wildcard_states; 00039 00040 typedef void (*curl_wildcard_tmp_dtor)(void *ptr); 00041 00042 /* struct keeping information about wildcard download process */ 00043 struct WildcardData { 00044 curl_wildcard_states state; 00045 char *path; /* path to the directory, where we trying wildcard-match */ 00046 char *pattern; /* wildcard pattern */ 00047 struct curl_llist *filelist; /* llist with struct Curl_fileinfo */ 00048 void *tmp; /* pointer to protocol specific temporary data */ 00049 curl_wildcard_tmp_dtor tmp_dtor; 00050 void *customptr; /* for CURLOPT_CHUNK_DATA pointer */ 00051 }; 00052 00053 CURLcode Curl_wildcard_init(struct WildcardData *wc); 00054 void Curl_wildcard_dtor(struct WildcardData *wc); 00055 00056 struct Curl_easy; 00057 00058 #endif /* HEADER_CURL_WILDCARD_H */