version 1.1, 2012/06/25 19:54:42
|
version 1.3, 2015/04/20 18:20:37
|
|
|
#include <common.h> | #include <common.h> |
#include <base/messages.h> | #include <base/messages.h> |
#include <sock/selector.h> | #include <sock/selector.h> |
#include <http/http.h> |
#include <http/httpcommon.h> |
| |
BEGIN_EXTERNC | BEGIN_EXTERNC |
| |
typedef struct _WSMAN WSMAN; | typedef struct _WSMAN WSMAN; |
| |
/* |
|
Callback for processing new message. |
|
Parameters: |
|
protocol - pointer to a protocol object that received a message |
|
message - message; consumer ahs to call 'AddRef' to keep message around |
|
longer than callback's lifetime |
|
data - user-provided callback data |
|
Return: |
|
return value is ignored by wsman object; |
|
added for consistency with bin Protocol |
|
however, all callbacks should retunr MI_TRUE for now |
|
*/ |
|
typedef MI_Boolean (*WSMANCallback)( |
|
WSMAN* protocol, |
|
Message* message, |
|
void* data); |
|
|
|
/* WSMAN options. | /* WSMAN options. |
mostly used for unit-testing; default values | mostly used for unit-testing; default values |
are hard-coded but can be overwritten by | are hard-coded but can be overwritten by |
|
|
WSMAN_Options; | WSMAN_Options; |
| |
/* default WSMAN options */ | /* default WSMAN options */ |
#define DEFAULT_WSMAN_OPTIONS { (20 * 1000000), MI_FALSE, MI_FALSE } |
#define DEFAULT_WSMAN_OPTIONS { (10 * 60 * 1000000), MI_FALSE, MI_FALSE } |
| |
MI_Result WSMAN_New_Listener( | MI_Result WSMAN_New_Listener( |
WSMAN** self, |
_Out_ WSMAN** self, |
Selector* selector, /*optional, maybe NULL*/ |
_In_opt_ Selector* selector, /* optional, maybe NULL */ |
unsigned short http_port, /* 0 to disable */ |
_In_opt_ unsigned short http_port, /* 0 to disable */ |
unsigned short https_port, /* 0 to disable */ |
_In_opt_ unsigned short https_port, /* 0 to disable */ |
WSMANCallback callback, |
_In_opt_z_ const char* sslCipherSuite, /* NULL to disable */ |
void* callbackData); |
_In_ Server_SSL_Options sslOptions, /* 0 for default options */ |
|
_In_ OpenCallback callback, |
|
_In_ void* callbackData, |
|
_In_opt_ const WSMAN_Options* options); |
| |
MI_Result WSMAN_Delete( | MI_Result WSMAN_Delete( |
WSMAN* self); | WSMAN* self); |
|
|
WSMAN* self, | WSMAN* self, |
MI_Uint64 timeoutUsec); | MI_Uint64 timeoutUsec); |
| |
MI_Result WSMAN_Send( |
// Defined on server.c |
WSMAN* self, |
void PrintProviderMsg( _In_ Message* msg); |
Message* message); |
|
|
|
/* Sets wsman options (mostly unit-test support) */ |
|
MI_Result WSMAN_SetOptions( |
|
WSMAN* self, |
|
const WSMAN_Options* options); |
|
| |
END_EXTERNC | END_EXTERNC |
| |