yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
Top XML Message Dispatch

Top Message Dispatch via XML Text Reader. More...

Collaboration diagram for Top XML Message Dispatch:

Typedefs

typedef boolean(* top_handler_t) (ses_cb_t *scb, xml_node_t *top)
 callback function template for a top handler More...
 
typedef boolean(* top_val_handler_t) (ses_cb_t *scb, val_value_t *msgval)
 callback function template for a top VAL handler More...
 

Enumerations

enum  top_mode_t {
  TOP_MODE_NONE ,
  TOP_MODE_SERVER ,
  TOP_MODE_CLIENT
}
 top used by client and server differently yp-controller uses both at the same time More...
 

Functions

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...
 

Detailed Description

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.

Typedef Documentation

◆ top_handler_t

typedef boolean(* top_handler_t) (ses_cb_t *scb, xml_node_t *top)

callback function template for a top handler

Parameters
scbsession control block; source of input The session manager will only stream one message to this function and wait for it to return.
topvery 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

typedef boolean(* top_val_handler_t) (ses_cb_t *scb, val_value_t *msgval)

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
scbsession control block; source of input The function is expected to handle the msg
msgvalentire 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

Enumeration Type Documentation

◆ top_mode_t

enum 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

Function Documentation

◆ top_cleanup()

void top_cleanup ( void  )

cleanup Top Element Handler

Here is the call graph for this function:
Here is the caller graph for this function:

◆ top_find_handler()

top_handler_t top_find_handler ( const xmlChar *  owner,
const xmlChar *  elname,
top_mode_t  topmode 
)

Find the top_handler in the topQ.

Parameters
ownerowner name
elnameelement name
topmodeclient or server mode
Returns
pointer to top_handler or NULL if not found
Here is the caller graph for this function:

◆ top_find_val_handler()

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.

Parameters
ownerowner name
elnameelement name
topmodeclient or server mode
Returns
pointer to top_handler or NULL if not found

◆ top_init()

void top_init ( void  )

Initialize the Top Elelment Handler.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ top_register_node()

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.

Parameters
ownerowner name (really module name)
elnameelement name
handlercallback function for this element
topmoderegistration mode (client or server)
Returns
status
Here is the caller graph for this function:

◆ top_register_val_node()

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.

Parameters
ownerowner name (really module name)
elnameelement name
handlercallback function for this element
topmoderegistration 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
ownerowner name
elnameelement name
topmodeclient or server mode
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
ownerowner name
elnameelement name
topmodeclient or server mode
Here is the call graph for this function: