#include "dc/dc_GenericInvocation.h"
#include "dc/dc_WsmanTypes.h"
Data Structures | |
struct | wsman_resource_handler |
A structure used to hold a set of handling functions for each of the four WS-Management operations, and the resource URI corresponding to the type of resource to be managed. More... | |
Defines | |
#define | DPWS_ERR_XPATH_FRAGMENT_PARSING -300 |
The WS-Management XPath Fragment is not syntactically correct. | |
Resource related fault error codes | |
#define | WSMAN_ERR_INVALID_RESOURCE 1 |
Selector related fault error codes | |
#define | WSMAN_ERR_INSUFFICIENT_SELECTORS 2 |
#define | WSMAN_ERR_SELECTOR_TYPE_MISMATCH 3 |
#define | WSMAN_ERR_INVALID_SELECTOR_VALUE 4 |
#define | WSMAN_ERR_UNEXPECTED_SELECTORS 5 |
#define | WSMAN_ERR_DUPLICATE_SELECTORS 6 |
Other error codes | |
#define | WSMAN_ERR_INTERNAL_ERROR 7 |
#define | WSMAN_ERR_SCHEMA_VALIDATION_ERROR 8 |
#define | WSMAN_ERR_CONCURRENCY 9 |
Create & put related fault error codes | |
#define | WSMAN_ERR_INVALID_VALUES 10 |
#define | WSMAN_ERR_MISSING_VALUES 11 |
#define | WSMAN_ERR_INVALID_NAMESPACES 12 |
Create related fault error codes | |
#define | WSMAN_ERR_ALREADY_EXISTS 13 |
Fragment-level related fault error codes | |
#define | WSMAN_ERR_UNSUPPORTED_FRAGMENT_ACCESS 14 |
#define | WSMAN_ERR_INVALID_FRAGMENT 15 |
Functions | |
Runtime API | |
DC_RT_FMAC1 int | wsman_serve_request (struct dpws *dpws) |
WS-MAN dispatch function. | |
DC_RT_FMAC1 char * | wsman_get_resource_uri (struct dpws *dpws) |
Retrieves the resource URI for the current request. | |
DC_RT_FMAC1 int | wsman_get_selectors (struct dpws *dpws, struct wsman_selector **selectors, int *selectors_count) |
Retrieves the selectors for the current request. | |
DC_RT_FMAC1 int | wsman_use_fragment_transfer (struct dpws *dpws) |
Returns true is a fragment transer header is used for the current request. | |
DC_RT_FMAC1 int | wsman_get_xpath_level_1 (struct dpws *dpws, struct qname **xpath, int *segment_count) |
Retrieves the XPath fragment as an array of QNames for the current request. | |
DC_RT_FMAC1 void * | wsman_get_configuration_data (struct dpws *dpws, char *resource_uri) |
Retrieves the configuration information associated with the current service and specified resource URI. | |
DC_RT_FMAC1 int | wsman_set_fault (struct dpws *dpws, int err, int underlying) |
Sets the approapriate SOAP fault parameters in the dpws context. | |
DC_RT_FMAC1 int | wsman_serialize_created_epr_callback (void *sctx, void *user_data) |
Callback function to be used when returning from a WS-Man creation handler to serialize the created endpoint reference. | |
Configuration API | |
typedef struct wsman_resource_handler | wsman_resource_handler_t |
A structure used to hold a set of handling functions for each of the four WS-Management operations, and the resource URI corresponding to the type of resource to be managed. | |
DC_RT_FMAC1 short | wsman_create_management_class (struct wsman_resource_handler **handlers, int handlers_count, struct wsman_resource_handler *default_handler, char *class_id) |
Create a service class object used to handle WS-Management messages. | |
DC_RT_FMAC1 void | wsman_set_resource_handlers (short href_class, struct wsman_resource_handler **handlers, int handlers_count, struct wsman_resource_handler *default_handler) |
Initialize a management service class with a set of handling functions structures, corresponding to the different types of resources to be managed. | |
DC_RT_FMAC1 short | wsman_create_management_service (short href_device, short href_class, char *context_path) |
Create a service object for the associated device and management service class. | |
DC_RT_FMAC1 int | wsman_configure_management_service (short href_service, char *resource_uri, void *configuration_data) |
Configure the management service for a given resource type. |
This dispatcher is used by the dynamic deployment feature but allow it to coexist with other WS-Management implementations.
#define DPWS_ERR_XPATH_FRAGMENT_PARSING -300 |
The WS-Management XPath Fragment is not syntactically correct.
typedef struct wsman_resource_handler wsman_resource_handler_t |
A structure used to hold a set of handling functions for each of the four WS-Management operations, and the resource URI corresponding to the type of resource to be managed.
DC_RT_FMAC1 short wsman_create_management_class | ( | struct wsman_resource_handler ** | handlers, | |
int | handlers_count, | |||
struct wsman_resource_handler * | default_handler, | |||
char * | class_id | |||
) |
Create a service class object used to handle WS-Management messages.
The service class is initialized with a set of handling functions structures, corresponding to the different types of resources to be managed.
handlers | An array of pointers to the set of handling functions. The array will be copied, but not the structures pointed to (they must be long-lived). | |
handlers_count | The number of handlers passed in the array. | |
default_handler | the set of handling functions to be used when other handlers do not match. Can be NULL. | |
class_id | the name of the newly created class. Can be NULL. |
DC_RT_FMAC1 void wsman_set_resource_handlers | ( | short | href_class, | |
struct wsman_resource_handler ** | handlers, | |||
int | handlers_count, | |||
struct wsman_resource_handler * | default_handler | |||
) |
Initialize a management service class with a set of handling functions structures, corresponding to the different types of resources to be managed.
href_class | A handle to the management service class to be initialized. | |
handlers | An array of pointers to the set of handling functions. The array will be copied, but not the structures pointed to (they must be long-lived). | |
handlers_count | The number of handlers passed in the array. | |
default_handler | the set of handling functions to be used when other handlers do not match. Can be NULL. |
DC_RT_FMAC1 short wsman_create_management_service | ( | short | href_device, | |
short | href_class, | |||
char * | context_path | |||
) |
Create a service object for the associated device and management service class.
href_device | The device that hosts the service. | |
href_class | The management class of the service. | |
context_path | The context_path of the service URL. |
DC_RT_FMAC1 int wsman_configure_management_service | ( | short | href_service, | |
char * | resource_uri, | |||
void * | configuration_data | |||
) |
Configure the management service for a given resource type.
Neither the resource URI string nor the configuration data will be copied (they must be long-lived).
href_service | The management service handle. | |
resource_uri | The resource type to which the configuration data is attached. | |
configuration_data | The data to be attached to the resource type. |
DC_RT_FMAC1 int wsman_serve_request | ( | struct dpws * | dpws | ) |
DC_RT_FMAC1 char* wsman_get_resource_uri | ( | struct dpws * | dpws | ) |
Retrieves the resource URI for the current request.
dpws | the DPWS runtime context. |
DC_RT_FMAC1 int wsman_get_selectors | ( | struct dpws * | dpws, | |
struct wsman_selector ** | selectors, | |||
int * | selectors_count | |||
) |
Retrieves the selectors for the current request.
The returned values are only valid during the processing of the request.
dpws | the DPWS runtime context. | |
selectors | a pointer to the array of selectors, filled on output | |
selectors_count | a pointer to an int containing the number of returned selectors, filled on output. |
DC_RT_FMAC1 int wsman_use_fragment_transfer | ( | struct dpws * | dpws | ) |
Returns true is a fragment transer header is used for the current request.
dpws | the DPWS runtime context. |
DC_RT_FMAC1 int wsman_get_xpath_level_1 | ( | struct dpws * | dpws, | |
struct qname ** | xpath, | |||
int * | segment_count | |||
) |
Retrieves the XPath fragment as an array of QNames for the current request.
The returned values are only valid during the processing of the request.
dpws | the DPWS runtime context. | |
xpath | a pointer to the array of QNames, filled on output | |
segment_count | a pointer to an int containing the size of the QName array, filled on output. |
DC_RT_FMAC1 void* wsman_get_configuration_data | ( | struct dpws * | dpws, | |
char * | resource_uri | |||
) |
Retrieves the configuration information associated with the current service and specified resource URI.
dpws | the DPWS runtime context. | |
resource_uri | the resource URI used in the request |
DC_RT_FMAC1 int wsman_set_fault | ( | struct dpws * | dpws, | |
int | err, | |||
int | underlying | |||
) |
DC_RT_FMAC1 int wsman_serialize_created_epr_callback | ( | void * | sctx, | |
void * | user_data | |||
) |
Callback function to be used when returning from a WS-Man creation handler to serialize the created endpoint reference.
sctx | the serialization context of the response. | |
user_data | the endpoint reference to be serialized |