00001 #ifndef HEADER_CURL_SHARE_H 00002 #define HEADER_CURL_SHARE_H 00003 /*************************************************************************** 00004 * _ _ ____ _ 00005 * Project ___| | | | _ \| | 00006 * / __| | | | |_) | | 00007 * | (__| |_| | _ <| |___ 00008 * \___|\___/|_| \_\_____| 00009 * 00010 * Copyright (C) 1998 - 2016, 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_setup.h" 00026 #include <curl/curl.h> 00027 #include "cookie.h" 00028 #include "urldata.h" 00029 00030 /* SalfordC says "A structure member may not be volatile". Hence: 00031 */ 00032 #ifdef __SALFORDC__ 00033 #define CURL_VOLATILE 00034 #else 00035 #define CURL_VOLATILE volatile 00036 #endif 00037 00038 /* this struct is libcurl-private, don't export details */ 00039 struct Curl_share { 00040 unsigned int specifier; 00041 CURL_VOLATILE unsigned int dirty; 00042 00043 curl_lock_function lockfunc; 00044 curl_unlock_function unlockfunc; 00045 void *clientdata; 00046 00047 struct curl_hash hostcache; 00048 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) 00049 struct CookieInfo *cookies; 00050 #endif 00051 00052 struct curl_ssl_session *sslsession; 00053 size_t max_ssl_sessions; 00054 long sessionage; 00055 }; 00056 00057 CURLSHcode Curl_share_lock(struct Curl_easy *, curl_lock_data, 00058 curl_lock_access); 00059 CURLSHcode Curl_share_unlock(struct Curl_easy *, curl_lock_data); 00060 00061 #endif /* HEADER_CURL_SHARE_H */