ext/libuv/include/uv.h in libuv-2.0.6 vs ext/libuv/include/uv.h in libuv-2.0.8
- old
+ new
@@ -46,10 +46,11 @@
#endif
#include "uv-errno.h"
#include "uv-version.h"
#include <stddef.h>
+#include <stdio.h>
#if defined(_MSC_VER) && _MSC_VER < 1600
# include "stdint-msvc2008.h"
#else
# include <stdint.h>
@@ -227,10 +228,11 @@
/* None of the above. */
typedef struct uv_cpu_info_s uv_cpu_info_t;
typedef struct uv_interface_address_s uv_interface_address_t;
typedef struct uv_dirent_s uv_dirent_t;
+typedef struct uv_passwd_s uv_passwd_t;
typedef enum {
UV_LOOP_BLOCK_SIGNAL
} uv_loop_option;
@@ -422,10 +424,14 @@
UV_EXTERN int uv_is_active(const uv_handle_t* handle);
UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg);
+/* Helpers for ad hoc debugging, no API/ABI stability guaranteed. */
+UV_EXTERN void uv_print_all_handles(uv_loop_t* loop, FILE* stream);
+UV_EXTERN void uv_print_active_handles(uv_loop_t* loop, FILE* stream);
+
UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb);
UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value);
UV_EXTERN int uv_recv_buffer_size(uv_handle_t* handle, int* value);
@@ -707,11 +713,12 @@
UV_POLL_PRIVATE_FIELDS
};
enum uv_poll_event {
UV_READABLE = 1,
- UV_WRITABLE = 2
+ UV_WRITABLE = 2,
+ UV_DISCONNECT = 4
};
UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd);
UV_EXTERN int uv_poll_init_socket(uv_loop_t* loop,
uv_poll_t* handle,
@@ -993,10 +1000,18 @@
struct sockaddr_in netmask4;
struct sockaddr_in6 netmask6;
} netmask;
};
+struct uv_passwd_s {
+ char* username;
+ long uid;
+ long gid;
+ char* shell;
+ char* homedir;
+};
+
typedef enum {
UV_DIRENT_UNKNOWN,
UV_DIRENT_FILE,
UV_DIRENT_DIR,
UV_DIRENT_LINK,
@@ -1042,10 +1057,13 @@
} uv_rusage_t;
UV_EXTERN int uv_getrusage(uv_rusage_t* rusage);
UV_EXTERN int uv_os_homedir(char* buffer, size_t* size);
+UV_EXTERN int uv_os_tmpdir(char* buffer, size_t* size);
+UV_EXTERN int uv_os_get_passwd(uv_passwd_t* pwd);
+UV_EXTERN void uv_os_free_passwd(uv_passwd_t* pwd);
UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count);
UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count);
UV_EXTERN int uv_interface_addresses(uv_interface_address_t** addresses,
@@ -1081,11 +1099,12 @@
UV_FS_SCANDIR,
UV_FS_LINK,
UV_FS_SYMLINK,
UV_FS_READLINK,
UV_FS_CHOWN,
- UV_FS_FCHOWN
+ UV_FS_FCHOWN,
+ UV_FS_REALPATH
} uv_fs_type;
/* uv_fs_t is a subclass of uv_req_t. */
struct uv_fs_s {
UV_REQ_FIELDS
@@ -1230,9 +1249,13 @@
const char* path,
const char* new_path,
int flags,
uv_fs_cb cb);
UV_EXTERN int uv_fs_readlink(uv_loop_t* loop,
+ uv_fs_t* req,
+ const char* path,
+ uv_fs_cb cb);
+UV_EXTERN int uv_fs_realpath(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_fs_cb cb);
UV_EXTERN int uv_fs_fchmod(uv_loop_t* loop,
uv_fs_t* req,