1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
use ;
use ;
/// Type alias for `dlopen`-style function used to load shared libraries.
pub type DlOpen_t = unsafe extern "C" fn ;
/// Type alias for `dlsym`-style function used to resolve symbols.
pub type DlSym_t = unsafe extern "C" fn ;
/// Type alias for `dlerror`-style function used to retrieve dynamic linker errors.
pub type DlError_t = unsafe extern "C" fn ;
/// Creates an anonymous in-memory file descriptor.
pub type MemFdCreate_t = unsafe extern "C" fn ;
/// Creates a new process by duplicating the current one.
pub type Fork_t = unsafe extern "C" fn ;
/// Executes a binary with a given argument and environment list.
pub type Execve_t = unsafe extern "C" fn ;
/// Retrieves a pointer to the current thread's `errno` value.
pub type ErrnoLocation_t = unsafe extern "C" fn ;
/// Writes raw bytes to a file descriptor.
pub type Write_t = unsafe extern "C" fn ;
/// Type alias for the `curl_global_init` function.
///
/// Initializes the global cURL environment.
///
/// # Safety
/// Must be called before any other cURL functions are used.
pub type CurlGlobalInit_t = unsafe extern "C" fn;
/// Type alias for the `curl_easy_init` function.
///
/// Creates and returns a new easy handle for cURL requests.
pub type CurlEasyInit_t = unsafe extern "C" fn ;
/// Type alias for the variadic `curl_easy_setopt` function.
///
/// Sets options for a cURL easy handle. Variadic arguments depend on the option.
pub type CurlEasySetOpt_t = unsafe extern "C" fn ;
/// Type alias for the `curl_easy_perform` function.
///
/// Executes a previously configured cURL request.
pub type CurlEasyPerform_t = unsafe extern "C" fn ;
/// Type alias for the `curl_easy_cleanup` function.
///
/// Frees resources associated with a cURL easy handle.
pub type CurlEasyCleanup_t = unsafe extern "C" fn;
/// Type alias for the `curl_global_cleanup` function.
///
/// Cleans up global cURL state previously initialized with `curl_global_init`.
pub type CurlGlobalCleanup_t = unsafe extern "C" fn;
/// Type alias for `curl_easy_setopt` specialized for string parameters.
///
/// Sets an option that accepts a `*const c_char` as value.
pub type CurlEasySetOptStr_t = unsafe extern "C" fn ;
/// Type alias for `curl_easy_setopt` specialized for pointer parameters.
///
/// Sets an option that accepts a generic pointer value.
pub type CurlEasySetOptPtr_t = unsafe extern "C" fn ;
/// Type alias for `curl_easy_setopt` specialized for callback functions.
///
/// Sets an option that accepts a function pointer, typically for write callbacks.
pub type CurlEasySetOptFn_t = unsafe extern "C" fn ;
/// Type alias for the write callback function used with cURL.
///
/// Called when cURL has received data.
///
/// - `ptr`: Pointer to the received data buffer.
/// - `size`: Size of each element (usually 1).
/// - `nmemb`: Number of elements received.
/// - `userdata`: User-defined pointer passed to the callback.
///
/// Returns the number of bytes successfully handled.
pub type CurlWriteFn_t = unsafe extern "C" fn ;