Previous section.

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

xems.h

#ifndef _XEMS_H

/*----------------------------------------------------------------------*/
/* XEMS Data Structures                                                 */
/*----------------------------------------------------------------------*/

/************************************************/
/* XEMS generic data types                      */
/************************************************/
typedef unsigned char          ems_boolean ;
#define ems_false              false
#define ems_true               true
typedef unsigned char          ems_byte ;
typedef unsigned char          ems_char ;
typedef signed char            ems_small_int ;
typedef unsigned char          ems_usmall_int ;
typedef short int              ems_short_int ;
typedef unsigned short int     ems_ushort_int ;
typedef long int               ems_long_int ;
typedef unsigned long int      ems_ulong_int ;
struct ems_hyper_int_rep_s {
    ems_long_int           high; 
    ems_ulong_int          low;
} ems_hyper_int;
struct ems_uhyper_int_rep_s_t {
    ems_ulong_int          high; 
    ems_ulong_int          low;
} ems_uhyper_int;
typedef float                  ems_short_float ;
typedef double                 ems_long_float ;

typedef char                   *ems_string_t;
typedef struct uuid_t {
    ems_ulong_int          time_low;
    ems_ushort_int         time_mid;
    ems_ushort_int         time_hi_and_version;
    ems_usmall_int         clock_seq_hi_and_reserved;
    ems_usmall_int         clock_seq_low;
    ems_byte               node[6];
} ems_uuid_t;

typedef struct utc {
    ems_byte               char_array[16];
} ems_utc_t;

typedef ems_ulong_int          ems_error_t;

typedef ems_uuid_t             ems_event_type_t;

/************************************************/
/* XEMS delivery types                            */
/************************************************/
typedef enum {
    ems_delivery_push=0,
    ems_delivery_pull
} ems_delivery_t;

/************************************************/
/* XEMS severity                                */
/************************************************/
typedef enum {
    ems_sev_info,
    ems_sev_fatal,
    ems_sev_error,
    ems_sev_warning,
    ems_sev_notice,
    ems_sev_notice_verbose,
    ems_sev_debug
} ems_severity_t;
/************************************************/
/* XEMS priority                                */
/************************************************/
typedef ems_ulong_int          ems_priority_t;

/************************************************/
/* XEMS Attributes                              */
/************************************************/
typedef ems_ushort_int         ems_attr_type_t;

#define ems_c_attr_small_int    (0)
#define ems_c_attr_short_int    (1)
#define ems_c_attr_long_int     (2)
#define ems_c_attr_hyper_int    (3)
#define ems_c_attr_usmall_int   (4)
#define ems_c_attr_ushort_int   (5)
#define ems_c_attr_ulong_int    (6)
#define ems_c_attr_uhyper_int   (7)
#define ems_c_attr_short_float  (8)
#define ems_c_attr_long_float   (9)
#define ems_c_attr_boolean      (10)
#define ems_c_attr_uuid         (11)
#define ems_c_attr_utc          (12)
#define ems_c_attr_severity     (13)
#define ems_c_attr_byte_string  (15)
#define ems_c_attr_char_string  (16)
#define ems_c_attr_bytes        (17)

typedef struct ems_bytes_s_t {
    ems_ulong_int   size;
    ems_byte        *data;
} ems_bytes_t;

typedef struct  {
    ems_attr_type_t format;
    union  {
        /* case(s): ems_c_attr_small_int */
        ems_small_int small_int;
        /* case(s): ems_c_attr_short_int */
        ems_short_int short_int;
        /* case(s): ems_c_attr_long_int */
        ems_long_int long_int;
        /* case(s): ems_c_attr_hyper_int */
        ems_hyper_int hyper_int;
        /* case(s): ems_c_attr_usmall_int */
        ems_usmall_int usmall_int;
        /* case(s): ems_c_attr_ushort_int */
        ems_ushort_int ushort_int;
        /* case(s): ems_c_attr_ulong_int */
        ems_ulong_int ulong_int;
        /* case(s): ems_c_attr_uhyper_int */
        ems_uhyper_int uhyper_int;
        /* case(s): ems_c_attr_short_float */
        ems_short_float short_float;
        /* case(s): ems_c_attr_long_float */
        ems_long_float long_float;
        /* case(s): ems_c_attr_boolean */
        ems_boolean bool;
        /* case(s): ems_c_attr_uuid */
        ems_uuid_t uuid;
        /* case(s): ems_c_attr_utc */
        ems_utc_t *utc;
        /* case(s): ems_c_attr_severity */
        ems_severity_t severity;
        /* case(s): ems_c_attr_byte_string */
        ems_byte *byte_string;
        /* case(s): ems_c_attr_char_string */
        char *char_string;
        /* case(s): ems_c_attr_bytes */
        ems_bytes_t bytes;
        } tagged_union;
    } ems_attr_value_t;

typedef struct ems_attribute_s_t {
    ems_string_t           name;
    ems_attr_value_t       value;
} ems_attribute_t;

/************************************************/
/* XEMS event id                                */
/************************************************/
typedef struct ems_eventid_s_t {
    ems_event_type_t       type;
    ems_uuid_t             id;
} ems_eventid_t;

/************************************************/
/* XEMS network name structure                  */
/************************************************/
typedef enum {
    ems_ns_other,
    ems_ns_dns,
    ems_ns_dce,
    ems_ns_x500,
    ems_ns_nis,
    ems_ns_sna
} ems_nameservice_t;

typedef char ems_octet_t;
typedef struct ems_netaddr_s_t {
    ems_ulong_int               len;
    ems_octet_t                 name[1];
} ems_netaddr_t;

typedef struct ems_netname_s_t {
    ems_nameservice_t      service;
    ems_netaddr_t          *netaddr;
} ems_netname_t;

/************************************************/
/* XEMS event origin                            */
/************************************************/
typedef struct ems_origin_s_t {
    ems_netname_t          netname;
    ems_string_t           descname;
    ems_ulong_int          pid;
    ems_ulong_int          uid;
    ems_ulong_int          gid;
} ems_origin_t;

/************************************************/
/* XEMS event header                            */
/************************************************/
typedef struct ems_hdr_s_t {
    ems_eventid_t          eventid;
    ems_origin_t           origin;
    ems_severity_t         severity;
    ems_utc_t              received;
    ems_utc_t              delivered;
    ems_priority_t         priority;
s_hdr_t;

/************************************************/
/* XEMS event structure                         */
/************************************************/
typedef struct ems_event_s_t {
    ems_hdr_t              header;
    ems_ulong_int          count;
    ems_attribute_t        item[1];
} ems_event_t;

/************************************************/
/* XEMS event schema                            */
/************************************************/
typedef struct ems_event_schema_s_t {
    ems_event_type_t       type;
    ems_string_t           name;
    ems_long_int           size;
    ems_attribute_t        attribute[1];
} ems_event_schema_t;

typedef ems_event_schema_t     *ems_schema_ptr_t;
typedef struct ems_event_type_list_s_t {
    ems_long_int           size;
    ems_schema_ptr_t       schema[1];
} ems_event_type_list_t;

/************************************************/
/* XEMS filter expression operators             */
/************************************************/
typedef ems_ushort_int         ems_attr_op_t;

#define ems_c_attr_op_eq       (0)
#define ems_c_attr_op_gt       (1)
#define ems_c_attr_op_lt       (2)
#define ems_c_attr_op_ge       (3)
#define ems_c_attr_op_le       (4)
#define ems_c_attr_op_ne       (5)
#define ems_c_attr_op_bitand   (6)
#define ems_c_attr_op_substr   (7)

/************************************************/
/* XEMS filter expression grammars             */
/************************************************/
typedef unsigned16 ems_filter_grammar_t;
const ems_filter_grammar_t ems_c_fg_default = 0;
const ems_filter_grammar_t ems_c_fg_OQL     = 1;
const ems_filter_grammar_t ems_c_fg_other   = 2;

typedef struct ems_default_fg_s_t {
    ems_string_t           attr_name;
    ems_attr_op_t          attr_operator;
    ems_attr_value_t       attr_value;
} ems_default_fg_t;

/************************************************/
/* XEMS filter expression                       */
/************************************************/
typedef struct ems_filter_exp_s_t {
    ems_filter_grammar_t    grammar;
    union  {
        /* case: ems_c_fg_default */
        ems_default_fg_t    def_filter;
        /* case: ems_c_fg_OQL */
        ems_string_t        oql_filter;
        /* case: ems_c_fg_other */
        ems_string_t        other_filter;
    } tagged_union;
} ems_filter_exp_t;


/************************************************/
/* XEMS filter expression list                  */
/************************************************/
typedef struct ems_filter_exp_list_s_t {
    ems_long_int            size;
    ems_filter_exp_t        filter_exps[1];
} ems_filter_exp_list_t;

/************************************************/
/* XEMS event filter structures                 */ 
/************************************************/
typedef struct ems_filter_s_t {
    ems_string_t            filter_name;
    ems_event_type_t       type;
    ems_filter_exp_list_t  filter_exp_list;
} ems_filter_t;

typedef struct ems_filtername_list_s_t {
    ems_long_int           size;
    ems_string_t           filter_names[1];
} ems_filtername_list_t;

typedef ems_filter_t *ems_filter_ptr_t;
typedef struct ems_filter_list_s_t {
    ems_long_int           size;
    ems_filter_ptr_t       filter[1];
} ems_filter_list_t;

/************************************************/
/* XEMS consumer structures                     */
/************************************************/
typedef struct ems_consumer_s_t {
    ems_string_t           name;
    ems_netname_t          *hostname;
    ems_uuid_t             uuid;
    ems_delivery_t              type;
} ems_consumer_t;

typedef struct ems_consumer_list_s_t {
    ems_long_int           size;
    ems_consumer_t         consumer[1];
} ems_consumer_list_t;

/************************************************/
/* Event Handler                                */
/************************************************/
typedef void (*ems_handler_t)(
    ems_event_t * event, 
    ems_error_t * error);

/************************************************/
/* XEMS supplier structures                     */
/************************************************/
typedef void (*ems_supplier_count_handler_t)(
    ems_event_type_t type,                                                      
    ems_long_int count,
    ems_error_t * error);
typedef struct ems_supplier_s_t {
    ems_string_t           name;
    ems_netname_t          *hostname;
    ems_uuid_t             uuid;
} ems_supplier_t;

typedef struct ems_supplier_list_s_t {
    ems_long_int           size;
    ems_supplier_t         supplier[1];
} ems_supplier_list_t;

/************************************************/
/* XEMS attribute list                          */
/************************************************/
typedef struct ems_attrlist_s_t {
    ems_long_int           size;
    ems_attribute_t        attr[1];
} ems_attrlist_t;

/************************************************/
/* XEMS event list                              */
/************************************************/
typedef ems_event_t            *ems_event_ptr_t;
typedef struct ems_event_list_s_t {
    ems_long_int           size;
    ems_event_ptr_t        event[1];
} ems_event_list_t;

/************************************************/
/* Event Service Handle                         */
/************************************************/
typedef struct ems_handle_priv_s_t *ems_handle_t;

/*----------------------------------------------------------------------*/
/* XEMS Registration API                                                */
/*----------------------------------------------------------------------*/
/************************************************/
/* Register with XEMS                           */
/************************************************/
extern 
void ems_register(
     ems_netname_t *    hostname,   /* Event Service hostname */
     ems_handle_t *     handle,     /* XEMS handle            */
     ems_error_t *      status);    /* operation status       */

/************************************************/
/* UnRegister with XEMS                      */
/************************************************/
extern 
void ems_unregister(
     ems_handle_t *     handle,     /* XEMS handle            */
     ems_error_t *      status);    /* operation status       */

#define EMS_C_GENERIC_TYPE_UUID \
    (ems_string_t)"632c65ee-911a-11ce-84ad-000001758810"

/*----------------------------------------------------------------------*/
/* XEMS Event Type API                                                  */
/*----------------------------------------------------------------------*/
/************************************************/
/* Add an Event Type                            */
/************************************************/
extern 
void ems_event_type_add(
    ems_handle_t          handle,      /* XEMS handle              */
    ems_event_schema_t *  schema,      /* event type schema to add */
    ems_error_t *         status);     /* request status           */

/************************************************/
/* Delete an Event Type                         */
/************************************************/
extern 
void ems_event_type_delete(
    ems_handle_t          handle,     /* XEMS handle               */
    ems_string_t          type_name,  /* event type name to delete */
    ems_event_type_t *    type,       /* event type id to delete   */
    ems_error_t *         status);    /* request status            */

/************************************************/
/* Get an Event Type                            */
/************************************************/
extern 
void ems_event_type_get(
    ems_handle_t            handle,      /* XEMS handle            */
    ems_string_t            type_name,   /* event type name to get */
    ems_event_type_t *      type,        /* event type id to get   */
    ems_event_schema_t **   schema,      /* event type schema      */
    ems_error_t *           status);     /* request status         */

/************************************************/
/* Get List of Available Event Types            */
/************************************************/
extern 
void ems_event_type_get_list(
    ems_handle_t              handle,      /* XEMS handle          */
    ems_event_type_list_t **  type_list,   /* list of event types  */
    ems_error_t *             status);     /* request status       */

/************************************************/
/* Free Event Types List                      */
/************************************************/
extern 
void ems_event_type_free_list(
    ems_event_type_list_t **   type_list,  /* list of event types  */
    ems_error_t *              status);    /* request status       */

/*----------------------------------------------------------------------*/
/* XEMS Supplier Interface                                              */
/*----------------------------------------------------------------------*/
/************************************************/
/* Pull Supplier Register                     */
/************************************************/
extern 
void ems_pull_supplier_register(
    ems_netname_t *     hostname,      /* Event Service hostname   */
    ems_ushort_int      interval;      /* Recommended poll interval*/
    ems_handle_t *      handle,        /* XEMS handle              */
    ems_error_t *       status);       /* Register status          */

/************************************************/
/* Push Supplier Register                     */
/************************************************/
extern 
void ems_push_supplier_register(
    ems_netname_t *     hostname,        /* Event Service hostname */
    ems_handle_t *      handle,          /* XEMS handle            */
    ems_error_t *       status);         /* Register status        */

/************************************************/
/* Push Supplier Register Handler                */
/************************************************/
extern 
void ems_supplier_register_handler(
    ems_event_type_t             type,   /* event type for handler */
    ems_supplier_count_handler_t handler,   /* handler function    */
    ems_handle_t *               handle,    /* XEMS handle         */
    ems_error_t *                status);   /* Register status     */

/************************************************/
/* Supplier Unregister                          */
/************************************************/
extern 
void ems_supplier_unregister(
    ems_handle_t *         handle,          /* XEMS handle         */
    ems_error_t *          status);         /* unregister status   */

/************************************************/
/* Supplier Send                                */
/************************************************/
extern 
void ems_supplier_send(
    ems_handle_t           handle,          /* XEMS handle         */
    ems_event_t *          event,           /* Event data          */
    ems_error_t *          status);         /* send status         */

/*----------------------------------------------------------------------*/
/* XEMS Filter Interface                                                */
/*----------------------------------------------------------------------*/
/************************************************/
/* Add an Event Filter                          */
/************************************************/
extern 
void ems_filter_add(
    ems_handle_t             handle,      /* XEMS handle           */
    ems_string_t             filter_name, /* event filter name     */
    ems_event_type_t         type,        /* event type            */
    ems_filter_exp_list_t *  exp_list,    /* filter exprs to add   */
    ems_error_t *            status);     /* filter routine status */

/************************************************/
/* Update an Event Filter                       */
/************************************************/
extern 
void ems_filter_append(
    ems_handle_t             handle,      /* XEMS handle           */
    ems_string_t             filter_name, /* Event Filter Name     */
    ems_filter_exp_list_t *  exp_list,    /* exp list to append    */
    ems_error_t *            status);     /* Filter routine status */

/************************************************/
/* Get an Event Filter                          */
/************************************************/
extern 
void ems_filter_get(
    ems_handle_t             handle,      /* XEMS handle           */
    ems_string_t             filter_name, /* event filter name     */
    ems_event_type_t *       type,        /* event type            */
    ems_filter_exp_list_t ** filter_exprs,/* returned filter exprs */
    ems_error_t *            status);     /* filter routine status */

/************************************************/
/* Free an Event Filter -                       */
/*        free the filter expression list       */
/************************************************/
extern 
void ems_filter_free( 
    ems_filter_exp_list_t **   list,        /* filter exps to free */
    ems_error_t *              status);     /* return status       */

/************************************************/
/* Delete an Event Filter                       */
/************************************************/
extern 
void ems_filter_delete(
    ems_handle_t            handle,       /* XEMS handle           */
    ems_string_t            filter_name,  /* filter name to delete */
    ems_error_t *           status);      /* filter routine status */

/************************************************/
/* List Event Filter Names                      */
/************************************************/
extern 
void ems_filter_get_namelist(
    ems_handle_t              handle,    /* XEMS handle            */
    ems_filtername_list_t **  name_list, /* event filter name list */
    ems_error_t *             status);   /* filter routine status  */

/************************************************/
/* Free a filter namelist                       */
/************************************************/
extern 
void ems_filter_free_namelist(
    ems_filtername_list_t **  name_list,     /* namelist to free   */
    ems_error_t *             status);       /* status             */

/************************************************/
/* Get an Event Filter Database                 */
/************************************************/
extern 
void ems_filter_get_list(
    ems_handle_t           handle,        /* XEMS handle           */
    ems_filter_list_t **   filter_list,   /* returned filter list  */
    ems_error_t *          status);       /* filter routine status */

/************************************************/
/* Free Event Filter List                       */
/************************************************/
extern 
void ems_filter_free_list(
    ems_filter_list_t **      filter_list,     /* list to free     */
    ems_error_t *             status);         /* routine status   */

/*----------------------------------------------------------------------*/
/* XEMS Consumer Interface                                              */
/*----------------------------------------------------------------------*/
/************************************************/
/* Consumer Start                               */
/************************************************/
extern 
void ems_consumer_start(
    ems_string_t          consumer ,  /* consumer name             */
    ems_ulong_int         flags,      /* consumer start flags      */
    ems_handler_t         hfunc[],    /* handler functions         */
    ems_uuid_t **         uuid,       /* unique consumer id        */
    ems_handle_t *        handle[],   /* array of consumer handles */
    ems_error_t *         status);    /* start status              */

/************************************************/
/* Consumer Stop                                */
/************************************************/
extern 
void ems_consumer_stop(
    ems_error_t *         status);           /* stop status        */

/************************************************/
/* Push Consumer Register                       */
/************************************************/
extern 
void ems_push_consumer_register(
    ems_netname_t *      hostname,    /* Event Service hostname    */
    ems_filtername_list_t * filter_group,    /* event filter group */
    int                  hfunc_index, /* index of handler function */
    ems_handle_t *       handle,      /* XEMS handle               */
    ems_error_t *        status);     /* Register status           */

/************************************************/
/* Pull Consumer Register                       */
/************************************************/
extern 
void ems_pull_consumer_register(
    ems_netname_t *         hostname,    /* Event Service hostname */
    ems_filtername_list_t * filter_group,  /* event filter group   */
    ems_handle_t *          handle,      /* XEMS handle            */
    ems_error_t *           status);     /* Register status        */

/************************************************/
/* Consumer Unregister                          */
/************************************************/
extern 
void ems_consumer_unregister(
    ems_handle_t *       handle,           /* XEMS handle          */
    ems_error_t *        status);          /* unregister status    */

/************************************************/
/* Add Event Filter To Group                    */
/************************************************/
extern 
void ems_add_filter_to_group(
    ems_handle_t            handle,        /* XEMS handle             */
    ems_filtername_list_t * event_filters, /* filter name list to add */
    ems_error_t *           status);       /* filter request status   */

/************************************************/
/* Delete an Event Filter From a Group          */
/************************************************/
extern 
void ems_delete_filter_from_group(
    ems_handle_t             handle,       /* XEMS handle           */
    ems_filtername_list_t *  filter_name,  /* event filter name(s)  */
    ems_error_t *            status);      /* filter request status */

/************************************************/
/* Get a Consumers Event Filter Group           */
/************************************************/
extern 
void ems_get_filter_group(
    ems_handle_t              handle,        /* XEMS handle           */
    ems_filtername_list_t **  filter_group,  /* Event Filter Group    */
    ems_error_t *             status);       /* filter request status */

/************************************************/
/* Get Consumer Registration                      */
/************************************************/
extern 
void ems_consumer_get_registration(
    ems_handle_t             handle,         /* XEMS handle           */
    ems_netname_t **         hostname,   /* hostname of the assoc EMS */
    ems_filtername_list_t ** filter_group,   /* Event Filter Group    */
    int *                    hfunc_index, /* associated handler index */
    ems_error_t *            status);        /* filter request status */

/************************************************/
/* Get Consumer Pull                              */
/************************************************/
extern 
void ems_consumer_pull(
    ems_handle_t             handle,         /* XEMS handle           */
    ems_event_t *            event,          /* received event        */
    ems_error_t *            status);        /* filter request status */
/************************************************/
/* Get Consumer tRY Pull                          */
/************************************************/
extern 
void ems_consumer_try_pull(
    ems_handle_t             handle,         /* XEMS handle           */
    ems_event_t *            event,          /* received event        */
    ems_error_t *            status);        /* filter request status */
/*----------------------------------------------------------------------*/
/* XEMS Management Interface                                            */
/*----------------------------------------------------------------------*/
/************************************************/
/* List XEMS Hosts                              */
/************************************************/
extern 
void ems_mgmt_list_ems(
    ems_string_t **        host_list,   /* Event Service hosts list */
    ems_error_t *          status);     /* mgmt request status      */

/************************************************/
/* Free XEMS Hosts list                         */
/************************************************/
extern 
void ems_mgmt_free_ems(
    ems_strint_t **    host_list,       /* Event Service hosts list */
    ems_error_t *      status);         /* mgmt request status      */

/************************************************/
/* Management List Server Attributes            */
/************************************************/
extern 
void ems_mgmt_list_attributes(
    ems_handle_t          h,                /* XEMS handle          */
    ems_attrlist_t **     list,             /* returned attributes  */
    ems_error_t *         status);          /* mgmt request status  */

/************************************************/
/* Management Free Server Attributes list       */
/************************************************/
extern 
void ems_mgmt_free_attributes(
    ems_attrlist_t **      list,            /* attribute list       */
    ems_error_t *          status);         /* mgmt request status  */

/************************************************/
/* List Registered consumers                    */
/************************************************/
extern 
void ems_mgmt_list_consumers(
    ems_handle_t            handle,      /* XEMS handle             */
    ems_consumer_list_t **  list,        /* returned consumer list  */
    ems_error_t *           status);     /* mgmt request status     */

/************************************************/
/* Free Consumer list                           */
/************************************************/
extern 
void ems_mgmt_free_consumers( 
    ems_consumer_list_t **   list,       /* consumer list to free   */
    ems_error_t *            status);    /* mgmt request status     */

/************************************************/
/* Managaement Security Edit                   */
/************************************************/
extern 
void ems_mgmt_secedit(
    ems_handle_t          handle,
    ems_secobj_t          secobj,
    ems_secsubj_t         subject,
    ems_secperm_t         newperm,
    ems_secperm_t *       oldperm,
    ems_error_t *         status);

/************************************************/
/* Managaement Security Read                    */
/************************************************/
extern 
void ems_mgmt_secread(
    ems_handle_t          handle,
    ems_secobj_t          secobj,
    ems_secsubj_t         subject,
    ems_secperm_t *       oldperm,
    ems_error_t *         status);

/************************************************/
/* Managaement Security Add Subject             */
/************************************************/
extern 
void ems_mgmt_secsubjadd(
    ems_handle_t          handle,
    ems_secsubj_t         subject,
    ems_secprin_t         principal,
    ems_error_t *         status);

/************************************************/
/* Managaement Security Delete Subject          */
/************************************************/
extern 
void ems_mgmt_secsubjdelete(
    ems_handle_t          handle,
    ems_secsubj_t         subject,
    ems_error_t *         status);

/************************************************/
/* Managaement Security Get Subject             */
/************************************************/
extern 
void ems_mgmt_secsubjget(
    ems_handle_t          handle,
    ems_secprin_t         principal,
    ems_secsubj_t *       subject,
    ems_error_t *         status);

/************************************************/
/* Add consumer to XEMS                         */
/************************************************/
extern 
void ems_mgmt_add_consumer(
    ems_handle_t            handle,         /* XEMS handle          */
    ems_string_t            consumer,       /* Consumer's name      */
    ems_uuid_t *            uuid,           /* Consumer UUID        */
    ems_error_t *           status);        /* mgmt request status  */

/************************************************/
/* Add consumer of event to XEMS                */
/************************************************/
extern 
void ems_mgmt_add_consumer_of_event(
    ems_handle_t          handle,          /* XEMS handle           */
    ems_string_t          consumer,        /* Consumer's name       */
    ems_uuid_t *          uuid,            /* Consumer UUID         */
    ems_event_type_t      type,            /* associated event type */
    ems_error_t *         status);         /* mgmt request status   */

/************************************************/
/* Delete consumer of event for XEMS            */
/************************************************/
extern 
void ems_mgmt_delete_consumer_of_event(
    ems_handle_t          handle,          /* XEMS handle           */
    ems_string_t          consumer,        /* Consumer's name       */
    ems_uuid_t *          uuid,            /* Consumer UUID         */
    ems_event_type_t      type,            /* associated event type */
    ems_error_t *         status);         /* mgmt request status   */

/************************************************/
/* Delete Registered consumer from XEMS         */
/************************************************/
extern 
void ems_mgmt_delete_consumer(
    ems_handle_t          handle,           /* XEMS handle          */
    ems_string_t          consumer,         /* Consumer's name      */
    ems_uuid_t *          uuid,             /* Consumer UUID        */
    ems_error_t *         status);          /* mgmt request status  */

/*********************************************************/
/* Delete an Event Filter from a Consumer's Filter Group */
/*********************************************************/
extern 
void ems_mgmt_delete_filter_from_group(
    ems_handle_t             handle,         /* XEMS handle         */
    char *                   consumer,       /* Consumer's name     */
    ems_uuid_t *             uuid,           /* Consumer UUID       */
    ems_filtername_list_t *  filter_name,    /* names to delete     */
    ems_error_t *            status);        /* mgmt req status     */

/**********************************************************/
/* Add an Event Filter to a Consumer's Event Filter Group */
/**********************************************************/
extern 
void ems_mgmt_add_filter_to_group(
    ems_handle_t             handle,       /* XEMS handle           */
    char *                   consumer,     /* Consumer's name       */
    ems_uuid_t *             uuid,         /* Consumer UUID         */
    ems_filtername_list_t *  filter_name,  /* name of filter to add */
    ems_error_t *            status);      /* mgmt request status   */

/************************************************/
/* XEMS Management - Get a filter group         */
/************************************************/
extern 
void ems_mgmt_get_filter_group(
    ems_handle_t               handle,       /* XEMS handle         */
    char *                     consumer,     /* name of consumer    */
    ems_uuid_t *               uuid,         /* Consumer UUID       */
    ems_filtername_list_t **   filter_group, /* event filter group  */
    ems_error_t *              status);      /* mgmt request status */

/************************************************/
/* Add supplier                                 */
/************************************************/
extern 
void ems_mgmt_add_supplier(
    ems_handle_t               handle,       /* XEMS handle         */
    ems_string_t               supplier,     /* supplier name       */
    ems_uuid_t *               uuid,         /* supplier UUID       */
    ems_error_t *              status);      /* mgmt request status */

/************************************************/
/* Add supplier of event                        */
/************************************************/
extern 
void ems_mgmt_add_supplier_of_event(
    ems_handle_t               handle,     /* XEMS handle           */
    ems_string_t               supplier,   /* supplier name         */
    ems_uuid_t *               uuid,       /* supplier UUID         */
    ems_event_type_t           type,       /* associated event type */
    ems_error_t *              status);    /* mgmt request status   */

/************************************************/
/* List Registered suppliers                    */
/************************************************/
extern 
void ems_mgmt_list_suppliers(
    ems_handle_t               handle,    /* XEMS handle            */
    ems_supplier_list_t **     list,      /* returned supplier list */
    ems_error_t *              status);   /* mgmt request status    */

/************************************************/
/* Free Consumer list                           */
/************************************************/
extern 
void ems_mgmt_free_suppliers( 
    ems_supplier_list_t **     list,      /* supplier list to free  */
    ems_error_t *              status);   /* mgmt request status    */

/************************************************/
/* Delete Registered supplier from XEMS         */
/************************************************/
extern 
void ems_mgmt_delete_supplier(
    ems_handle_t            handle,         /* XEMS handle          */
    ems_string_t            supplier,       /* Supplier's name      */
    ems_uuid_t *            uuid,           /* Supplier's UUID      */
    ems_error_t *           status);        /* mgmt request status  */

/************************************************/
/* Delete supplier of event                     */
/************************************************/
extern 
void ems_mgmt_delete_supplier_of_event(
    ems_handle_t            handle,        /* XEMS handle           */
    ems_string_t            supplier,      /* supplier name         */
    ems_uuid_t *            uuid,          /* supplier UUID         */
    ems_event_type_t        type,          /* associated event type */
    ems_error_t *           status);       /* mgmt request status   */

/************************************************/
/* Get Undelivered Events                       */
/************************************************/
extern 
void ems_mgmt_get_undelivered_events(
    ems_handle_t            handle,        /* XEMS handle           */
    ems_event_list_t **     event,         /* undelivered events    */
    ems_error_t *           status);       /* event get status      */

/************************************************/
/* Free Undelivered Events                      */
/************************************************/
extern 
void ems_mgmt_free_undelivered_events(
    ems_event_list_t **     event,         /* undelivered events    */
    ems_error_t *           status);       /* event get status      */

/************************************************/
/* Delete Undelivered Events                    */
/************************************************/
extern 
void ems_mgmt_delete_undelivered_event(
    ems_handle_t            handle,        /* XEMS handle           */
    ems_eventid_t *         event_id,      /* event id to delete    */
    ems_error_t *           status);       /* event delete status   */

/************************************************/
/* Management Forward Events                    */
/************************************************/
extern 
void ems_mgmt_forward(
    ems_handle_t            handle,       /* XEMS handle            */
    ems_filtername_list_t * filter_group, /*list of event filter names */
    ems_netname_t *         hostname,     /* receiver of events     */
    ems_string_t *          name,         /* assoc consumer name    */
    ems_uuid_t *            uuid,         /* consumer uuid          */
    ems_error_t *           status);      /* event delete status    */

/************************************************/
/* Status Codes                                    */
/************************************************/

#define ems_status_modid    (0x10*16777216)
#define ems_status_compid   (0x10*65536)
#define ems_status_subid    (0x10*256)
#define ems_status_base (sms_status_modid+ems_status_compid
                                                   +ems_status_subid)

#define ems_s_already_registered                   ems_status_base+1
#define ems_s_consumer_already_started             ems_status_base+2
#define ems_s_consumer_not_started                 ems_status_base+3
#define ems_s_empty_filter_db                      ems_status_base+4
#define ems_s_event_type_exists                    ems_status_base+5
#define ems_s_event_type_not_found                 ems_status_base+6
#define ems_s_filter_exits                         ems_status_base+7
#define ems_s_filter_in_use                        ems_status_base+8
#define ems_s_filter_not_found                     ems_status_base+9
#define ems_s_forwarding_event_service_not_there   ems_status_base+10
#define ems_s_forwarding_event_loop                ems_status_base+11
#define ems_s_insufficient_permission              ems_status_base+12
#define ems_s_invalid_event_type                   ems_status_base+13
#define ems_s_invalid_filter                       ems_status_base+14
#define ems_s_invalid_handle                       ems_status_base+15
#define ems_s_invalid_name                         ems_status_base+16
#define ems_s_no_consumers                         ems_status_base+17
#define ems_s_no_event                             ems_status_base+18
#define ems_s_no_events                            ems_status_base+19
#define ems_s_no_memory                            ems_status_base+20
#define ems_s_no_suppliers                         ems_status_base+21
#define ems_s_no_type_list                         ems_status_base+22
#define ems_s_status_ok                            0
#define ems_s_unknown_consumer                     ems_status_base+23
#define ems_s_unknown_supplier                     ems_status_base+24
#define ems_s_unsupported_nameservice              ems_status_base+25

#endif /* _XEMS_H */


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

Contents Next section Index