Top Message Dispatch via XML Text Reader.
More...
|
void | top_init (void) |
| Initialize the Top Elelment Handler. More...
|
|
void | top_cleanup (void) |
| cleanup Top Element Handler More...
|
|
status_t | top_register_node (const xmlChar *owner, const xmlChar *elname, top_handler_t handler, top_mode_t topmode) |
| Register a top entry handler function. More...
|
|
void | top_unregister_node (const xmlChar *owner, const xmlChar *elname, top_mode_t topmode) |
| Remove a top entry handler function. More...
|
|
top_handler_t | top_find_handler (const xmlChar *owner, const xmlChar *elname, top_mode_t topmode) |
| Find the top_handler in the topQ. More...
|
|
status_t | top_register_val_node (const xmlChar *owner, const xmlChar *elname, top_val_handler_t handler, top_mode_t topmode) |
| Register a top entry VAL handler function. More...
|
|
void | top_unregister_val_node (const xmlChar *owner, const xmlChar *elname, top_mode_t topmode) |
| Remove a top entry VAL handler function. More...
|
|
top_val_handler_t | top_find_val_handler (const xmlChar *owner, const xmlChar *elname, top_mode_t topmode) |
| Find the top_val_handler in the topQ. More...
|
|
Top Message Dispatch via XML Text Reader.
The inbound messages are processed 1 XML node at a time. Message handlers register for top-level elements such as <rpc> or <hello> and the top dispatcher will invoke the proper callback when the start-tag for this message is seen.
◆ top_handler_t
callback function template for a top handler
- Parameters
-
scb | session control block; source of input The session manager will only stream one message to this function and wait for it to return. |
top | very first node of the incoming message This allows a single handler to support multiple top nodes, and also contains the attributes present in the node |
- Returns
- TRUE if scb is still valid
FALSE if scb has been deleted during this call
◆ top_val_handler_t
callback function template for a top VAL handler
The callback function MUST CONSUME THE msgval!!! It is expected that the val_value_t will be added to another structure (e.g., app-layer msg) and freed after use
- Parameters
-
scb | session control block; source of input The function is expected to handle the msg |
msgval | entire message parsed as a val_value_t MUST FREE WITH val_free_value!!!! |
- Returns
- TRUE if scb is still valid
FALSE if scb has been deleted during this call
◆ top_mode_t
top used by client and server differently yp-controller uses both at the same time
Enumerator |
---|
TOP_MODE_NONE | not set
|
TOP_MODE_SERVER | top server mode
|
TOP_MODE_CLIENT | top client mode
|
◆ top_cleanup()
void top_cleanup |
( |
void |
| ) |
|
cleanup Top Element Handler
◆ top_find_handler()
Find the top_handler in the topQ.
- Parameters
-
owner | owner name |
elname | element name |
topmode | client or server mode |
- Returns
- pointer to top_handler or NULL if not found
◆ top_find_val_handler()
Find the top_val_handler in the topQ.
- Parameters
-
owner | owner name |
elname | element name |
topmode | client or server mode |
- Returns
- pointer to top_handler or NULL if not found
◆ top_init()
Initialize the Top Elelment Handler.
◆ top_register_node()
Register a top entry handler function.
- Parameters
-
owner | owner name (really module name) |
elname | element name |
handler | callback function for this element |
topmode | registration mode (client or server) |
- Returns
- status
◆ top_register_val_node()
Register a top entry VAL handler function.
- Parameters
-
owner | owner name (really module name) |
elname | element name |
handler | callback function for this element |
topmode | registration mode (client or server) |
- Returns
- status
◆ top_unregister_node()
void top_unregister_node |
( |
const xmlChar * |
owner, |
|
|
const xmlChar * |
elname, |
|
|
top_mode_t |
topmode |
|
) |
| |
Remove a top entry handler function.
This will not affect calls to the handler currently in progress, but new calls to top_dispatch_msg will no longer find this node.
- Parameters
-
owner | owner name |
elname | element name |
topmode | client or server mode |
◆ top_unregister_val_node()
void top_unregister_val_node |
( |
const xmlChar * |
owner, |
|
|
const xmlChar * |
elname, |
|
|
top_mode_t |
topmode |
|
) |
| |
Remove a top entry VAL handler function.
This will not affect calls to the handler currently in progress, but new calls to top_dispatch_msg will no longer find this node.
- Parameters
-
owner | owner name |
elname | element name |
topmode | client or server mode |