Main Page | Modules | Data Structures | File List | Data Fields

Support
[Service Check Library]


Data Structures

struct  chksvc_frame_t
struct  chksvc_status_t

Typedefs

typedef chksvc_status_t chksvc_status_t
typedef chksvc_frame_t chksvc_frame_t

Functions

chksvc_status_tchksvc_status_create (chksvc_service_t *service, const char *str, long code, const char *msg, apr_pool_t *pool)
apr_status_t chksvc_frame_create (chksvc_frame_t **self, chksvc_service_t *service, apr_pool_t *pool)
const char * chksvc_frame_get_register (chksvc_frame_t *self, size_t i)
void chksvc_frame_set_register (chksvc_frame_t *self, size_t i, char *str)
size_t chksvc_frame_add_register (chksvc_frame_t *self, char *str)
sul_string_t * chksvc_frame_interpolate_string (chksvc_frame_t *self, const char *str, apr_pool_t *pool)

Typedef Documentation

typedef struct chksvc_frame_t chksvc_frame_t
 

Check frame with all of the regular expression registers and runtime details used during and after the check.

typedef struct chksvc_status_t chksvc_status_t
 

Status information that is returned from a service check. Contains details on how things proceded and information the caller can display to give helpful information on diagnosing any problems.


Function Documentation

size_t chksvc_frame_add_register chksvc_frame_t self,
char *  str
 

Assigns a new register value to the last available register index.

Parameters:
self A check frame.
str Value of the register.
Returns:
Index that was assigned the value.

apr_status_t chksvc_frame_create chksvc_frame_t **  self,
chksvc_service_t service,
apr_pool_t *  pool
 

Creates a new chksvc_frame_t, initializing and setting everything up for the service check.

Parameters:
self Receives the new chksvc_frame_t object.
service A service for which this frame will be used for.
pool Pool for dynamic memory and resource allocation.
Returns:
Apache portable runtime status code.

const char* chksvc_frame_get_register chksvc_frame_t self,
size_t  i
 

Gets the value of a specific register in a check frame. If there's no value assigned to that register yet, then NULL will be returned.

Note:
If one regular expression fills in 0 through 3 and then another fills in 0 through 2, then 3 will still have the value from the first regular expression.
Parameters:
self A check frame to pull the information from.
i Index of the register being requested.
Returns:
A string with its value, or NULL if nothing has been assigned to that register yet.

sul_string_t* chksvc_frame_interpolate_string chksvc_frame_t self,
const char *  str,
apr_pool_t *  pool
 

Interpolates a string, pulling values from the registers in the check frame as the interpolator comes upon the properly formatted tokens. To place a register in the resulting string, just do a $0 or $1 and the register with that index will be inlined.

Parameters:
self A check frame to pull register and variable values from.
str Formatted string that should be interpolated.
pool Pool for dynamic memory and resource allocation.
Returns:
Success or failure.

void chksvc_frame_set_register chksvc_frame_t self,
size_t  i,
char *  str
 

Sets the value of a register from a regular expression match, will overwrite any previous values.

Parameters:
self A check frame to fill the information in for.
i Index of the register being populated.
str Value of the register.

chksvc_status_t* chksvc_status_create chksvc_service_t service,
const char *  str,
long  code,
const char *  msg,
apr_pool_t *  pool
 

Creates a new chksvc_status_t object, populated with the given inforamtion. Most of the time the macros will be used to create this objects and so this function is rarely called directly.

Parameters:
service A service for which we're creating a status for.
str String describing the state of the service, used by State to update the Vital for the Service.
code Numeric code representing the service's condition.
msg Message or note describing, breifly, how things are.
pool Pool for dynamic memory and resource allocation.
Returns:
A new chksvc_status_t object.


Generated on Wed Apr 28 09:38:37 2004 for State by doxygen 1.3.5