diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/replicant/jnetlib/jnetlib_defines.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/replicant/jnetlib/jnetlib_defines.h')
-rw-r--r-- | Src/replicant/jnetlib/jnetlib_defines.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Src/replicant/jnetlib/jnetlib_defines.h b/Src/replicant/jnetlib/jnetlib_defines.h new file mode 100644 index 00000000..76647604 --- /dev/null +++ b/Src/replicant/jnetlib/jnetlib_defines.h @@ -0,0 +1,66 @@ +#pragma once +#include "../foundation/types.h" +#ifdef __cplusplus +extern "C" { +#endif + +/* Connection */ +typedef struct jnl_connection_struct jnl_connection_struct; +typedef jnl_connection_struct *jnl_connection_t; + +enum +{ + JNL_CONNECTION_STATE_ERROR = 0, + JNL_CONNECTION_STATE_NOCONNECTION = 1, + JNL_CONNECTION_STATE_RESOLVING = 2, + JNL_CONNECTION_STATE_CONNECTING = 3, + JNL_CONNECTION_STATE_CONNECTED = 4, + JNL_CONNECTION_STATE_CLOSING = 5, + JNL_CONNECTION_STATE_CLOSED = 6, + JNL_CONNECTION_STATE_RESOLVED = 7, // happens after RESOLVING, but going here for compatability +}; + +/* UDP */ +typedef struct jnl_udp_struct jnl_udp_struct; +typedef jnl_udp_struct *jnl_udp_t; + +/* HTTP */ +typedef struct jnl_http_struct jnl_http_struct; +typedef jnl_http_struct *jnl_http_t; + +enum +{ + HTTPGET_STATUS_ERROR = -1, + JNL_HTTP_STATUS_ERROR = HTTPGET_STATUS_ERROR, + HTTPGET_STATUS_CONNECTING = 0, + JNL_HTTP_STATUS_CONNECTING = HTTPGET_STATUS_CONNECTING, + HTTPGET_STATUS_READING_HEADERS = 1, + JNL_HTTP_STATUS_READING_HEADERS = HTTPGET_STATUS_READING_HEADERS, + HTTPGET_STATUS_READING_CONTENT = 2, + JNL_HTTP_STATUS_READING_CONTENT = HTTPGET_STATUS_READING_CONTENT, +}; + +enum +{ + HTTPGET_RUN_ERROR = -1, + HTTPGET_RUN_OK = 0, + JNL_HTTP_RUN_OK = HTTPGET_RUN_OK, + HTTPGET_RUN_CONNECTION_CLOSED = 1, +}; + +/* DNS */ +typedef struct jnl_dns_struct jnl_dns_struct; +typedef jnl_dns_struct *jnl_dns_t; + +typedef struct jnl_httpu_request_struct jnl_httpu_request_struct; +typedef jnl_httpu_request_struct *jnl_httpu_request_t; + +typedef struct jnl_http_request_struct jnl_http_request_struct; +typedef jnl_http_request_struct *jnl_http_request_t; + +typedef struct jnl_listen_struct jnl_listen_struct; +typedef jnl_listen_struct *jnl_listen_t; + +#ifdef __cplusplus +} +#endif
\ No newline at end of file |