mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
fix callback typedefs and declarations
Remove declarations of callback and extension_callback as these are functions declared in header but not defined anywhere. Also rename typedefs callback_function and extension_callback_function to lws_callback_function and lws_extension_callback_function so all symbolx exported by header have lws prefix; Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
This commit is contained in:
parent
0c7e5a9418
commit
034e514a0d
4 changed files with 19 additions and 28 deletions
|
@ -655,7 +655,7 @@ lws_canonical_hostname(struct lws_context *context)
|
|||
return (const char *)context->canonical_hostname;
|
||||
}
|
||||
|
||||
int user_callback_handle_rxflow(callback_function callback_function,
|
||||
int user_callback_handle_rxflow(lws_callback_function callback_function,
|
||||
struct lws *wsi,
|
||||
enum lws_callback_reasons reason, void *user,
|
||||
void *in, size_t len)
|
||||
|
|
|
@ -758,7 +758,7 @@ struct lws_context;
|
|||
struct lws_extension;
|
||||
|
||||
/**
|
||||
* callback_function() - User server actions
|
||||
* typedef lws_callback_function() - User server actions
|
||||
* @wsi: Opaque websocket instance pointer
|
||||
* @reason: The reason for the call
|
||||
* @user: Pointer to per-session user data allocated by library
|
||||
|
@ -1052,17 +1052,13 @@ struct lws_extension;
|
|||
* connection. If you return nonzero lws will just close the
|
||||
* connection.
|
||||
*/
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
callback(const struct lws *wsi, enum lws_callback_reasons reason, void *user,
|
||||
void *in, size_t len);
|
||||
|
||||
typedef int
|
||||
(callback_function)(struct lws *wsi, enum lws_callback_reasons reason,
|
||||
lws_callback_function(struct lws *wsi, enum lws_callback_reasons reason,
|
||||
void *user, void *in, size_t len);
|
||||
|
||||
#ifndef LWS_NO_EXTENSIONS
|
||||
/**
|
||||
* extension_callback_function() - Hooks to allow extensions to operate
|
||||
* typedef lws_extension_callback_function() - Hooks to allow extensions to operate
|
||||
* @context: Websockets context
|
||||
* @ext: This extension
|
||||
* @wsi: Opaque websocket instance pointer
|
||||
|
@ -1119,13 +1115,8 @@ typedef int
|
|||
* buffer safely, it should copy the data into its own buffer and
|
||||
* set the lws_tokens token pointer to it.
|
||||
*/
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
extension_callback(struct lws_context *context, const struct lws_extension *ext,
|
||||
struct lws *wsi, enum lws_extension_callback_reasons reason,
|
||||
void *user, void *in, size_t len);
|
||||
|
||||
typedef int
|
||||
(extension_callback_function)(struct lws_context *context,
|
||||
lws_extension_callback_function(struct lws_context *context,
|
||||
const struct lws_extension *ext, struct lws *wsi,
|
||||
enum lws_extension_callback_reasons reason,
|
||||
void *user, void *in, size_t len);
|
||||
|
@ -1173,7 +1164,7 @@ typedef int
|
|||
|
||||
struct lws_protocols {
|
||||
const char *name;
|
||||
callback_function *callback;
|
||||
lws_callback_function *callback;
|
||||
size_t per_session_data_size;
|
||||
size_t rx_buffer_size;
|
||||
unsigned int id;
|
||||
|
@ -1199,7 +1190,7 @@ struct lws_protocols {
|
|||
|
||||
struct lws_extension {
|
||||
const char *name;
|
||||
extension_callback_function *callback;
|
||||
lws_extension_callback_function *callback;
|
||||
size_t per_session_data_size;
|
||||
void *per_context_private_data;
|
||||
|
||||
|
@ -1209,7 +1200,7 @@ struct lws_extension {
|
|||
#endif
|
||||
|
||||
/**
|
||||
* struct lws_context_creation_info: parameters to create context with
|
||||
* struct lws_context_creation_info - parameters to create context with
|
||||
*
|
||||
* @port: Port to listen on... you can use CONTEXT_PORT_NO_LISTEN to
|
||||
* suppress listening on any port, that's what you want if you are
|
||||
|
|
|
@ -1069,7 +1069,7 @@ LWS_EXTERN void
|
|||
lws_union_transition(struct lws *wsi, enum connection_mode mode);
|
||||
|
||||
LWS_EXTERN int
|
||||
user_callback_handle_rxflow(callback_function, struct lws *wsi,
|
||||
user_callback_handle_rxflow(lws_callback_function, struct lws *wsi,
|
||||
enum lws_callback_reasons reason, void *user,
|
||||
void *in, size_t len);
|
||||
#ifdef LWS_USE_HTTP2
|
||||
|
|
|
@ -823,10 +823,10 @@ These provide platform-agnostic ways to deal with filesystem access in the
|
|||
library and in the user code.
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h2>callback - User server actions</h2>
|
||||
<i>LWS_EXTERN int</i>
|
||||
<b>callback</b>
|
||||
(<i>const struct lws *</i> <b>wsi</b>,
|
||||
<h2>lws_callback_function - User server actions</h2>
|
||||
<i>typedef int</i>
|
||||
<b>lws_callback_function</b>
|
||||
(<i>struct lws *</i> <b>wsi</b>,
|
||||
<i>enum lws_callback_reasons</i> <b>reason</b>,
|
||||
<i>void *</i> <b>user</b>,
|
||||
<i>void *</i> <b>in</b>,
|
||||
|
@ -1207,9 +1207,9 @@ connection. If you return nonzero lws will just close the
|
|||
connection.
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h2>extension_callback - Hooks to allow extensions to operate</h2>
|
||||
<i>LWS_EXTERN int</i>
|
||||
<b>extension_callback</b>
|
||||
<h2>lws_extension_callback_function - Hooks to allow extensions to operate</h2>
|
||||
<i>typedef int</i>
|
||||
<b>lws_extension_callback_function</b>
|
||||
(<i>struct lws_context *</i> <b>context</b>,
|
||||
<i>const struct lws_extension *</i> <b>ext</b>,
|
||||
<i>struct lws *</i> <b>wsi</b>,
|
||||
|
@ -1298,7 +1298,7 @@ set the lws_tokens token pointer to it.
|
|||
<h2>struct lws_protocols - List of protocols and handlers server supports.</h2>
|
||||
<b>struct lws_protocols</b> {<br>
|
||||
<i>const char *</i> <b>name</b>;<br>
|
||||
<i>callback_function *</i> <b>callback</b>;<br>
|
||||
<i>lws_callback_function *</i> <b>callback</b>;<br>
|
||||
<i>size_t</i> <b>per_session_data_size</b>;<br>
|
||||
<i>size_t</i> <b>rx_buffer_size</b>;<br>
|
||||
<i>unsigned int</i> <b>id</b>;<br>
|
||||
|
@ -1357,7 +1357,7 @@ header.
|
|||
<h2>struct lws_extension - An extension we know how to cope with</h2>
|
||||
<b>struct lws_extension</b> {<br>
|
||||
<i>const char *</i> <b>name</b>;<br>
|
||||
<i>extension_callback_function *</i> <b>callback</b>;<br>
|
||||
<i>lws_extension_callback_function *</i> <b>callback</b>;<br>
|
||||
<i>size_t</i> <b>per_session_data_size</b>;<br>
|
||||
<i>void *</i> <b>per_context_private_data</b>;<br>
|
||||
};<br>
|
||||
|
@ -1377,7 +1377,7 @@ is per-context, so it can track stuff across
|
|||
all sessions, etc, if it wants
|
||||
</dl>
|
||||
<hr>
|
||||
<h2>struct lws_context_creation_info - </h2>
|
||||
<h2>struct lws_context_creation_info - parameters to create context with</h2>
|
||||
<b>struct lws_context_creation_info</b> {<br>
|
||||
<i>int</i> <b>port</b>;<br>
|
||||
<i>const char *</i> <b>iface</b>;<br>
|
||||
|
|
Loading…
Add table
Reference in a new issue