Previous section.

Systems Management; Event Management Service (XEMS)
Copyright © 1997 The Open Group

Event Filter Interface

Event filters can be created using the Event Filter Interface.

XEMS provides several routines to construct event filters. These are routines to add, delete and update an event filter. Systems Management: Event Management Service - ems_filter_add

Previous section.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

NAME

ems_filter_add - Add an Event Filter

SYNOPSIS

#include <xems.h>

void ems_filter_add(
    ems_handle_t              handle,
    ems_string_t              filter_name,
    ems_event_type_t          type,
    ems_filter_exp_list_t *   exp_list,
    ems_error_t *             status);

DESCRIPTION:

This routine is used to add a new event filter to the XEMS Event Filter Database. There is currently no mechanism for indicating all events.

PARAMETERS:

Input

handle

a handle returned from a call to ems_consumer_register call.

filter_name

specifies the event filter name for this event filter. This name can be used to add the event filter to a consumers event filter group.

type

specifies the event type that this filter will be applies against.

exp_list

a list of filter expressions which are part of the event filter filter_name.

Output

status

returns the status code from this routine which indicates whether the routine completed successfully or, if not, why not.

RETURN VALUE

The possible status codes are:


ems_s_status_ok
ems_s_invalid_handle
ems_s_insufficient_permission
ems_s_filter_exits
ems_s_invalid_filter
ems_s_invalid_name

Systems Management: Event Management Service - ems_filter_append
Previous section.

NAME

ems_filter_append - Append to an Event Filter

SYNOPSIS

#include <xems.h>

void ems_filter_append(
    ems_handle_t               handle,
    ems_string_t               filter_name,
    ems_filter_exp_list_t *    exp_list,
    ems_error_t *              status);

DESCRIPTION:

This routine is used to add filter expressions to an event filter. The filter expressions are added to the end of the current list of filter expressions in the event filter.

PARAMETERS:

Input

handle

should be the handle returned from a call to ems_consumer_register call.

filter_name

specifies the name of the event filter to add the filter expressions to.

exp_list

a list of filter expressions which will be added to the end of event filter filter_name.

Output

status

returns the status code from this routine which indicates whether the routine completed successfully or, if not, why not.

RETURN VALUE

The possible status codes are:


ems_s_status_ok
ems_s_invalid_name
ems_s_invalid_handle
ems_s_invalid_name
ems_s_filter_not_found
ems_s_insufficient_permission

Systems Management: Event Management Service - ems_filter_get
Previous section.

NAME

ems_filter_get - Get an Event Filter

SYNOPSIS

#include <xems.h>

void ems_filter_get(
    ems_handle_t               handle,
    ems_string_t               filter_name,
    ems_event_type_t *         type,
    ems_filter_exp_list_t **   filter_exprs,
    ems_error_t *              status);

DESCRIPTION:

This routine is used to get the filter expressions in an event filter.

PARAMETERS:

Input

handle

should be the handle returned from a call to ems_consumer_register call.

filter_name

specifies the name of the event filter to get.

Output

type

the event type of the filter.

exp_list

the list of filter expressions which are part of event filter filter_name.

status

returns the status code from this routine which indicates whether the routine completed successfully or, if not, why not.

RETURN VALUE

The possible status codes are:


ems_s_status_ok
ems_s_invalid_name
ems_s_invalid_handle
ems_s_filter_not_found
ems_s_insufficient_permission

Systems Management: Event Management Service - ems_filter_delete
Previous section.

NAME

ems_filter_delete - Delete an Event Filter

SYNOPSIS

#include <xems.h>

void ems_filter_delete(
    ems_handle_t         handle,
    ems_string_t         filter_name,
    ems_error_t *        status);

DESCRIPTION:

This routine is used to delete an event filter from the Event Filter Database. The name filter_name cannot appear in any consumers event filter group when this routine is called.

PARAMETERS:

Input

handle

should be the handle returned from a call to ems_consumer_register call.

filter_name

specifies the name of the event filter to delete.

Output

status

returns the status code from this routine which indicates whether the routine completed successfully or, if not, why not.

RETURN VALUE

The possible status codes are:


ems_s_status_ok
ems_s_filter_not_found
ems_s_filter_in_use
ems_s_insufficient_permission
ems_s_invalid_name
ems_s_invalid_handle

Systems Management: Event Management Service - ems_filter_free
Previous section.

NAME

ems_filter_free - Free an Event Filter

SYNOPSIS

#include <xems.h>

void ems_filter_free(
    ems_filter_exp_list_t **   filter_exprs,
    ems_error_t *              status);

DESCRIPTION:

This routine is used to get the filter expressions in an event filter.

PARAMETERS:

Input

exp_list

the list of filter expressions which are part of event filter filter_name.

Output

status

returns the status code from this routine which indicates whether the routine completed successfully or, if not, why not.

RETURN VALUE

The possible status codes are:


ems_s_status_ok

Systems Management: Event Management Service - ems_filter_get_namelist
Previous section.

NAME

ems_filter_get_namelist - List Event Filter Names

SYNOPSIS

#include <xems.h>

void ems_filter_get_namelist(
    ems_handle_t                 handle,
    ems_filtername_list_t **     name_list,
    ems_error_t *                status);

DESCRIPTION:

This routine is used to get a list of the names of the event filters in the Event Filter Database.

PARAMETERS:

Input

handle

should be the handle returned from a call to ems_consumer_register call.

Output

name_list

will contain a list of all the event filter names in the Event Filter Database. The routine ems_event_filter_get can be used to find out the contents of each event filter.

status

returns the status code from this routine which indicates whether the routine completed successfully or, if not, why not.

RETURN VALUE

The possible status codes are:


ems_s_status_ok
ems_s_insufficient_permission
ems_s_invalid_handle
ems_s_empty_filter_db

Systems Management: Event Management Service - ems_filter_free_namelist
Previous section.

NAME

ems_filter_free_namelist - Free Event Filter Names

SYNOPSIS

#include <xems.h>

void ems_filter_free_namelist(
    ems_filtername_list_t **     name_list,
    ems_error_t *                status);

DESCRIPTION:

This routine is used to free a list of the names of returned by the ems_filter_get_namelist routine

PARAMETERS:

Input

name_list

list of filter names to free.

Output

name_list

sets to NULL.

status

returns the status code from this routine which indicates whether the routine completed successfully or, if not, why not.

RETURN VALUE

The possible status codes are:


ems_s_status_ok

Systems Management: Event Management Service - ems_filter_get_list
Previous section.

NAME

ems_filter_get_list - Get Event Filter List

SYNOPSIS

#include <xems.h>

void ems_filter_get_list(
    ems_handle_t               handle,
    ems_filter_list_t **       filter_list,
    ems_error_t *              status);

DESCRIPTION:

This routine is used to get a list of the event filters in the Event Filter Database.

PARAMETERS:

Input

handle

a handle returned from a call to ems_consumer_register call.

Output

filter_list

will contain a list of all the event filters in the Event Filter Database. This list should be freed using ems_filter_free_list.

status

returns the status code from this routine which indicates whether the routine completed successfully or, if not, why not.

RETURN VALUE

The possible status codes are:


ems_s_status_ok
ems_s_insufficient_permission
ems_s_invalid_handle
ems_s_empty_filter_db

Systems Management: Event Management Service - ems_filter_free_list
Previous section.

NAME

ems_filter_free_list - Free Event Filter List

SYNOPSIS

#include <xems.h>

void ems_filter_free_list(
    ems_filter_list_t **      filter_list,
    ems_error_t *             status);

DESCRIPTION

This routine is used by callers of ems_get_event_filter_database to free the storage used by an Event Filter Database (ems_filter_list_t) structure.

PARAMETERS

Input

filter_list

a list of event filters that make up the Event Filter Database as returned by the routine ems_filter_get_list().

Output

filter_list

will be set to NULL.

status

returns the status code from this routine which indicates whether the routine completed successfully or, if not, why not.

RETURN VALUE

The possible status codes are:


ems_s_status_ok

Contents Next section Index