|
libee 0.3.0
|
#include <event.h>

Public Member Functions |
|
| struct ee_event * | ee_newEvent (ee_ctx ctx) |
| void | ee_deleteEvent (struct ee_event *event) |
| int | ee_assignTagbucketToEvent (struct ee_event *event, struct ee_tagbucket *tagbucket) |
| int | ee_addTagToEvent (struct ee_event *event, es_str_t *tag) |
| int | ee_addStrFieldToEvent (struct ee_event *event, char *fieldname, es_str_t *value) |
| int | ee_addFieldToEvent (struct ee_event *event, struct ee_field *field) |
| static struct ee_field * | ee_getEventField (struct ee_event *event, es_str_t *name) |
| int | ee_EventHasTag (struct ee_event *event, es_str_t *tagname) |
| int | ee_fmtEventToRFC5424 (struct ee_event *event, es_str_t **str) |
| int | ee_fmtEventToJSON (struct ee_event *event, es_str_t **str) |
| int | ee_fmtEventToXML (struct ee_event *event, es_str_t **str) |
| int | ee_fmtEventToCSV (struct ee_event *event, es_str_t **str, es_str_t *extraData) |
Data Fields |
|
| unsigned | objID |
| ee_ctx | ctx |
| struct ee_tagbucket * | tags |
| struct ee_fieldbucket * | fields |
The event class. This models an actual event as it happens.
Add an already constructed field to the event.
| event | event where field shall be added | |
| [in] | field | field to be added |
| int ee_addStrFieldToEvent | ( | struct ee_event * | event, |
| char * | fieldname, | ||
| es_str_t * | value | ||
| ) |
Add a string field name-value pair to the event.
This adds a name-value pair (NVField) to the event. The value must be a string value. If no fieldbucket yet exists, one is created.
This is part of the ezAPI for libee
| event | event where field shall be added | |
| [in] | fieldname | Name of the field to be added. The field name must not already exist inside the fieldbucket. Libee will copy the field name, so the caller must free it itself if required. |
| [in] | value | value of the field to be added. |
| int ee_addTagToEvent | ( | struct ee_event * | event, |
| es_str_t * | tag | ||
| ) |
Add a tag to the event.
The tag is provided as a string. If no tag bucket exists when this method is called, one is created.
This is part of the ezAPI for libee
| event | event where tag shall be added |
| tag | string representing a tag name. The tag must not already exist inside the tagbucket. Libee will copy the string, so the caller must free it itself if required. |
| int ee_assignTagbucketToEvent | ( | struct ee_event * | event, |
| struct ee_tagbucket * | tagbucket | ||
| ) |
Assign a tag bucket to an event.
A complete tag bucket is assigned to the event. Any previously assigned tags are DISCARDED.
| event | event where tag shall be added |
| tagbucket | already-created tag bucket to be assigned to event. The caller ceases control of this bucket. In particular, we may destruct it at any time. If the caller intends to continue access the tagbucket, it must properly create a duplicate. |
| void ee_deleteEvent | ( | struct ee_event * | event | ) |
Destructor for the ee_event object.
| event | The event to be discarded. |
| int ee_EventHasTag | ( | struct ee_event * | event, |
| es_str_t * | tagname | ||
| ) |
Check if an event is classified via a specific tag.
| event | event to look at | |
| [in] | str | name of tag |
| int ee_fmtEventToCSV | ( | struct ee_event * | event, |
| es_str_t ** | str, | ||
| es_str_t * | extraData | ||
| ) |
Format an event to CSV format.
This method takes an event and creates a new string representation in CSV format. The string is passed to the caller, which then is responsible for freeing it. Note that this methods needs a string specifying field names and order (as they shall be written to the output).
This is part of the ezAPI for libee
| event | event to format | |
| [out] | str | pointer to string with XML representation, caller must destruct |
| [in] | extraData | string with field names (comma-delimited list) |
| int ee_fmtEventToJSON | ( | struct ee_event * | event, |
| es_str_t ** | str | ||
| ) |
Format an event in JSON format.
This method takes an event and creates a new string representation in JSON format. The string is passed to the caller, which then is responsible for freeing it.
This is part of the ezAPI for libee
| event | event to format | |
| [out] | str | pointer to string with JSON representation, caller must destruct |
| int ee_fmtEventToRFC5424 | ( | struct ee_event * | event, |
| es_str_t ** | str | ||
| ) |
Format an event in syslog RFC 5424 format.
This method takes an event and creates a new string representation in RFC5424 format. The string is passed to the caller, which then is responsible for freeing it.
This is part of the ezAPI for libee
| event | event to format | |
| [out] | str | pointer to string with RFC5424 representation, caller must destruct |
| int ee_fmtEventToXML | ( | struct ee_event * | event, |
| es_str_t ** | str | ||
| ) |
Format an event in XML format.
This method takes an event and creates a new string representation in XML format. The string is passed to the caller, which then is responsible for freeing it.
This is part of the ezAPI for libee
| event | event to format | |
| [out] | str | pointer to string with XML representation, caller must destruct |
Obtain a field with specified name from given event.
| event | event to search | |
| [in] | str | name of field |
Constructor for the ee_event object.
| [in] | ctx | associated library context |
| struct ee_fieldbucket* fields |
fields contained in this event
| unsigned objID |
a magic number to prevent some memory adressing errors
| struct ee_tagbucket* tags |
tags associated with this event
1.7.3