yumapro  20.10-14
YumaPro SDK
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...
 

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

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

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

◆ 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 call graph for this function:
Here is the caller graph for this function:

◆ 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: