enhanced nwad functions
This commit is contained in:
@ -25,15 +25,18 @@
|
||||
#include <qse/macros.h>
|
||||
#include <qse/cmn/ipad.h>
|
||||
|
||||
enum qse_nwad_type_t
|
||||
{
|
||||
QSE_NWAD_IN4,
|
||||
QSE_NWAD_IN6
|
||||
};
|
||||
typedef enum qse_nwad_type_t qse_nwad_type_t;
|
||||
|
||||
typedef struct qse_nwad_t qse_nwad_t;
|
||||
|
||||
struct qse_nwad_t
|
||||
{
|
||||
enum
|
||||
{
|
||||
QSE_NWAD_IN4,
|
||||
QSE_NWAD_IN6
|
||||
} type;
|
||||
qse_nwad_type_t type;
|
||||
|
||||
union
|
||||
{
|
||||
|
@ -214,12 +214,22 @@ qse_ssize_t qse_sio_getmbsn (
|
||||
qse_size_t size
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_sio_getwcs() function reads at most @a size - 1 characters
|
||||
* from the stream @a sio into the buffer @a buf. If a new line or EOF
|
||||
* is encountered, it stops reading from the stream. It null-terminates
|
||||
* the buffer if @a size is greater than 0. */
|
||||
qse_ssize_t qse_sio_getwcs (
|
||||
qse_sio_t* sio,
|
||||
qse_wchar_t* buf,
|
||||
qse_size_t size
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_sio_getwcsn() function reads at most @a size characters
|
||||
* from the stream @a sio into the buffer @a buf. If a new line or EOF
|
||||
* is encountered, it stops reading from the stream.
|
||||
*/
|
||||
qse_ssize_t qse_sio_getwcsn (
|
||||
qse_sio_t* sio,
|
||||
qse_wchar_t* buf,
|
||||
|
@ -115,6 +115,12 @@
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
#undef HAVE_GETHOSTBYNAME
|
||||
|
||||
/* Define to 1 if you have the `if_indextoname' function. */
|
||||
#undef HAVE_IF_INDEXTONAME
|
||||
|
||||
/* Define to 1 if you have the `if_nametoindex' function. */
|
||||
#undef HAVE_IF_NAMETOINDEX
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
@ -169,6 +175,9 @@
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#undef HAVE_NET_IF_H
|
||||
|
||||
/* Define to 1 if you have the `posix_spawn' function. */
|
||||
#undef HAVE_POSIX_SPAWN
|
||||
|
||||
|
@ -126,13 +126,8 @@ struct qse_upxd_cbs_t
|
||||
int (*delhnd) (qse_upxd_t* upxd, void* mux, qse_ubi_t handle);
|
||||
int (*poll) (qse_upxd_t* upxd, void* mux, qse_ntime_t timeout);
|
||||
} mux;
|
||||
|
||||
struct
|
||||
{
|
||||
void (*acquire) (qse_upxd_t* upxd);
|
||||
void (*release) (qse_upxd_t* upxd);
|
||||
} lock;
|
||||
};
|
||||
|
||||
typedef struct qse_upxd_cbs_t qse_upxd_cbs_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -190,6 +185,11 @@ qse_upxd_server_t* qse_upxd_addserver (
|
||||
const qse_char_t* dev
|
||||
);
|
||||
|
||||
void qse_upxd_delserver (
|
||||
qse_upxd_t* upxd,
|
||||
qse_upxd_server_t* server
|
||||
);
|
||||
|
||||
void* qse_upxd_getserverctx (
|
||||
qse_upxd_t* upxd,
|
||||
qse_upxd_server_t* server
|
||||
@ -210,6 +210,21 @@ int qse_upxd_loop (
|
||||
qse_ntime_t timeout
|
||||
);
|
||||
|
||||
int qse_upxd_enableserver (
|
||||
qse_upxd_t* upxd,
|
||||
qse_upxd_server_t* server
|
||||
);
|
||||
|
||||
int qse_upxd_disableserver (
|
||||
qse_upxd_t* upxd,
|
||||
qse_upxd_server_t* server
|
||||
);
|
||||
|
||||
int qse_upxd_poll (
|
||||
qse_upxd_t* upxd,
|
||||
qse_ntime_t timeout
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user