uv-data-getter-setters.c
Go to the documentation of this file.
1 #include "uv.h"
2 
4  switch (type) {
5 #define XX(uc,lc) case UV_##uc: return #lc;
7 #undef XX
8  case UV_FILE: return "file";
10  case UV_UNKNOWN_HANDLE: return NULL;
11  }
12  return NULL;
13 }
14 
16  return handle->type;
17 }
18 
20  return handle->data;
21 }
22 
24  return handle->loop;
25 }
26 
28  handle->data = data;
29 }
30 
32  switch (type) {
33 #define XX(uc,lc) case UV_##uc: return #lc;
35 #undef XX
36  case UV_REQ_TYPE_MAX:
37  case UV_UNKNOWN_REQ:
38  default: /* UV_REQ_TYPE_PRIVATE */
39  break;
40  }
41  return NULL;
42 }
43 
45  return req->type;
46 }
47 
48 void* uv_req_get_data(const uv_req_t* req) {
49  return req->data;
50 }
51 
53  req->data = data;
54 }
55 
57  return stream->write_queue_size;
58 }
59 
61  return handle->send_queue_size;
62 }
63 
65  return handle->send_queue_count;
66 }
67 
69  return proc->pid;
70 }
71 
73  return req->fs_type;
74 }
75 
77  return req->result;
78 }
79 
80 void* uv_fs_get_ptr(const uv_fs_t* req) {
81  return req->ptr;
82 }
83 
84 const char* uv_fs_get_path(const uv_fs_t* req) {
85  return req->path;
86 }
87 
89  return &req->statbuf;
90 }
91 
93  return loop->data;
94 }
95 
97  loop->data = data;
98 }
uv_fs_get_type
uv_fs_type uv_fs_get_type(const uv_fs_t *req)
Definition: uv-data-getter-setters.c:72
async_greeter_server_with_graceful_shutdown.loop
loop
Definition: async_greeter_server_with_graceful_shutdown.py:59
uv_loop_get_data
void * uv_loop_get_data(const uv_loop_t *loop)
Definition: uv-data-getter-setters.c:92
uv_req_type
uv_req_type
Definition: uv.h:198
uv_process_s
Definition: uv.h:1037
uv_req_set_data
void uv_req_set_data(uv_req_t *req, void *data)
Definition: uv-data-getter-setters.c:52
uv_fs_get_result
ssize_t uv_fs_get_result(const uv_fs_t *req)
Definition: uv-data-getter-setters.c:76
uv_handle_type
uv_handle_type
Definition: uv.h:189
uv_pid_t
pid_t uv_pid_t
Definition: unix.h:129
uv_udp_get_send_queue_count
size_t uv_udp_get_send_queue_count(const uv_udp_t *handle)
Definition: uv-data-getter-setters.c:64
uv_fs_s
Definition: uv.h:1294
UV_HANDLE_TYPE_MAP
#define UV_HANDLE_TYPE_MAP(XX)
Definition: uv.h:152
uv_stream_s
Definition: uv.h:491
uv_fs_get_ptr
void * uv_fs_get_ptr(const uv_fs_t *req)
Definition: uv-data-getter-setters.c:80
uv_fs_get_path
const char * uv_fs_get_path(const uv_fs_t *req)
Definition: uv-data-getter-setters.c:84
uv_handle_get_type
uv_handle_type uv_handle_get_type(const uv_handle_t *handle)
Definition: uv-data-getter-setters.c:15
ssize_t
intptr_t ssize_t
Definition: win.h:27
uv_req_get_data
void * uv_req_get_data(const uv_req_t *req)
Definition: uv-data-getter-setters.c:48
uv_udp_get_send_queue_size
size_t uv_udp_get_send_queue_size(const uv_udp_t *handle)
Definition: uv-data-getter-setters.c:60
UV_FILE
@ UV_FILE
Definition: uv.h:194
req
static uv_connect_t req
Definition: test-connection-fail.c:30
uv_udp_s
Definition: uv.h:629
uv_req_type_name
const char * uv_req_type_name(uv_req_type type)
Definition: uv-data-getter-setters.c:31
uv_process_s::pid
int pid
Definition: uv.h:1040
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
XX
#define XX(uc, lc)
uv_handle_set_data
void uv_handle_set_data(uv_handle_t *handle, void *data)
Definition: uv-data-getter-setters.c:27
uv_handle_type_name
const char * uv_handle_type_name(uv_handle_type type)
Definition: uv-data-getter-setters.c:3
uv_req_get_type
uv_req_type uv_req_get_type(const uv_req_t *req)
Definition: uv-data-getter-setters.c:44
uv.h
uv_fs_type
uv_fs_type
Definition: uv.h:1245
uv_stat_t
Definition: uv.h:346
uv_handle_get_loop
uv_loop_t * uv_handle_get_loop(const uv_handle_t *handle)
Definition: uv-data-getter-setters.c:23
UV_REQ_TYPE_MAX
@ UV_REQ_TYPE_MAX
Definition: uv.h:204
UV_UNKNOWN_REQ
@ UV_UNKNOWN_REQ
Definition: uv.h:199
handle
static csh handle
Definition: test_arm_regression.c:16
uv_handle_s
Definition: uv.h:441
uv_loop_s
Definition: uv.h:1767
uv_stream_get_write_queue_size
size_t uv_stream_get_write_queue_size(const uv_stream_t *stream)
Definition: uv-data-getter-setters.c:56
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
uv_process_get_pid
uv_pid_t uv_process_get_pid(const uv_process_t *proc)
Definition: uv-data-getter-setters.c:68
uv_fs_get_statbuf
uv_stat_t * uv_fs_get_statbuf(uv_fs_t *req)
Definition: uv-data-getter-setters.c:88
uv_handle_get_data
void * uv_handle_get_data(const uv_handle_t *handle)
Definition: uv-data-getter-setters.c:19
uv_req_s
Definition: uv.h:404
UV_REQ_TYPE_MAP
#define UV_REQ_TYPE_MAP(XX)
Definition: uv.h:170
uv_loop_set_data
void uv_loop_set_data(uv_loop_t *loop, void *data)
Definition: uv-data-getter-setters.c:96
UV_HANDLE_TYPE_MAX
@ UV_HANDLE_TYPE_MAX
Definition: uv.h:195
UV_UNKNOWN_HANDLE
@ UV_UNKNOWN_HANDLE
Definition: uv.h:190
stream
voidpf stream
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:49