Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 1 | #ifndef HEADER_CURL_SHARE_H |
| 2 | #define HEADER_CURL_SHARE_H |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 3 | /*************************************************************************** |
| 4 | * _ _ ____ _ |
| 5 | * Project ___| | | | _ \| | |
| 6 | * / __| | | | |_) | | |
| 7 | * | (__| |_| | _ <| |___ |
| 8 | * \___|\___/|_| \_\_____| |
| 9 | * |
Alex Deymo | 486467e | 2017-12-19 19:04:07 +0100 | [diff] [blame] | 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 11 | * |
| 12 | * This software is licensed as described in the file COPYING, which |
| 13 | * you should have received as part of this distribution. The terms |
Alex Deymo | d15eaac | 2016-06-28 14:49:26 -0700 | [diff] [blame] | 14 | * are also available at https://curl.haxx.se/docs/copyright.html. |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 15 | * |
| 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell |
| 17 | * copies of the Software, and permit persons to whom the Software is |
| 18 | * furnished to do so, under the terms of the COPYING file. |
| 19 | * |
| 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 21 | * KIND, either express or implied. |
| 22 | * |
| 23 | ***************************************************************************/ |
| 24 | |
Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 25 | #include "curl_setup.h" |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 26 | #include <curl/curl.h> |
| 27 | #include "cookie.h" |
Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 28 | #include "urldata.h" |
Alex Deymo | 486467e | 2017-12-19 19:04:07 +0100 | [diff] [blame] | 29 | #include "conncache.h" |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 30 | |
| 31 | /* SalfordC says "A structure member may not be volatile". Hence: |
| 32 | */ |
| 33 | #ifdef __SALFORDC__ |
| 34 | #define CURL_VOLATILE |
| 35 | #else |
| 36 | #define CURL_VOLATILE volatile |
| 37 | #endif |
| 38 | |
| 39 | /* this struct is libcurl-private, don't export details */ |
| 40 | struct Curl_share { |
| 41 | unsigned int specifier; |
| 42 | CURL_VOLATILE unsigned int dirty; |
| 43 | |
| 44 | curl_lock_function lockfunc; |
| 45 | curl_unlock_function unlockfunc; |
| 46 | void *clientdata; |
Alex Deymo | 486467e | 2017-12-19 19:04:07 +0100 | [diff] [blame] | 47 | struct conncache conn_cache; |
Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 48 | struct curl_hash hostcache; |
| 49 | #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 50 | struct CookieInfo *cookies; |
Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 51 | #endif |
| 52 | |
| 53 | struct curl_ssl_session *sslsession; |
| 54 | size_t max_ssl_sessions; |
| 55 | long sessionage; |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 56 | }; |
| 57 | |
Elliott Hughes | 82be86d | 2017-09-20 17:00:17 -0700 | [diff] [blame] | 58 | CURLSHcode Curl_share_lock(struct Curl_easy *, curl_lock_data, |
| 59 | curl_lock_access); |
| 60 | CURLSHcode Curl_share_unlock(struct Curl_easy *, curl_lock_data); |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 61 | |
Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 62 | #endif /* HEADER_CURL_SHARE_H */ |