<commit_before>/**
 * @file libservicelog.h
 * Header file for servicelog compatibility layer.  This header is
 * intended for use by programs that use the servicelog 0.2.9
 * (legacy) API, and also by the code that implements the compatibility
 * layer.
 *
 * Where there is a conflict between a 0.2.9 object (or function) and a
 * 1.0 object of the same name, the 0.2.9 object is renamed by adding a
 * "0.29_" prefix.  In order to have visibility of both versions of a
 * particular object, the code that implements the compatibility layer
 * defines the macro EXCLUDE_SERVICELOG_COMPAT_DECLS.
 *
 * Copyright (C) 2005, 2009 IBM Corporation
 *
 * Original authors:
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 *
 * Adapted for compatibility layer:
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 */

#ifndef _LIBSERVICELOG_H
#define _LIBSERVICELOG_H

#include <time.h>
#include <stdint.h>
#include <sys/types.h>
/*
 * Dropped from compatibility layer due to complete rework of database
 * layout in v1.0: SERVICELOG_PATH, SERVICELOG_DB_NAME, NOTIFY_DB_NAME
 */

/**
 * @struct sl_header
 *
 * Structure to define the type of event data being stored in the database.
 * This structure must appear as the first thing in all event structures
 * defined for use with the servicelog database.
 */
struct sl_header {
	struct sl_header *next;
	uint32_t	db_key;		/**< db entry key */
	uint32_t	event_type;	/**< event type */
	uint32_t	version;	/**< version of the event_type */
	uint32_t	event_length;	/**< total event length */
	time_t		time_event;	/**< timestamp of event occurence */
	time_t		time_log;	/**< timestamp of event logging */
	uint32_t	severity;	/**< int field of event severity */

	uint32_t	repair_action:1;
	uint32_t	serviceable_event:1;
	uint32_t	event_repaired:1;
	uint32_t	/* reserved */ :29;
};

/* defines for sl_header.event_type */
#ifndef SL_TYPE_OS
#define SL_TYPE_OS		1
#endif
#define SL_TYPE_APP		2<commit_msg>Fix the a typo in sl_header description<commit_after>/**
 * @file libservicelog.h
 * Header file for servicelog compatibility layer.  This header is
 * intended for use by programs that use the servicelog 0.2.9
 * (legacy) API, and also by the code that implements the compatibility
 * layer.
 *
 * Where there is a conflict between a 0.2.9 object (or function) and a
 * 1.0 object of the same name, the 0.2.9 object is renamed by adding a
 * "0.29_" prefix.  In order to have visibility of both versions of a
 * particular object, the code that implements the compatibility layer
 * defines the macro EXCLUDE_SERVICELOG_COMPAT_DECLS.
 *
 * Copyright (C) 2005, 2009 IBM Corporation
 *
 * Original authors:
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 *
 * Adapted for compatibility layer:
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 */

#ifndef _LIBSERVICELOG_H
#define _LIBSERVICELOG_H

#include <time.h>
#include <stdint.h>
#include <sys/types.h>
/*
 * Dropped from compatibility layer due to complete rework of database
 * layout in v1.0: SERVICELOG_PATH, SERVICELOG_DB_NAME, NOTIFY_DB_NAME
 */

/**
 * @struct sl_header
 *
 * Structure to define the type of event data being stored in the database.
 * This structure must appear as the first thing in all event structures
 * defined for use with the servicelog database.
 */
struct sl_header {
	struct sl_header *next;
	uint32_t	db_key;		/**< db entry key */
	uint32_t	event_type;	/**< event type */
	uint32_t	version;	/**< version of the event_type */
	uint32_t	event_length;	/**< total event length */
	time_t		time_event;	/**< timestamp of event occurrence */
	time_t		time_log;	/**< timestamp of event logging */
	uint32_t	severity;	/**< int field of event severity */

	uint32_t	repair_action:1;
	uint32_t	serviceable_event:1;
	uint32_t	event_repaired:1;
	uint32_t	/* reserved */ :29;
};

/* defines for sl_header.event_type */
#ifndef SL_TYPE_OS
#define SL_TYPE_OS		1
#endif
#define SL_TYPE_APP		2
{'fraction_non_alphanumeric': 0.10058420116840233, 'fraction_numerical': 0.02489204978409957, 'mean_word_length': 4.042253521126761, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2947434', 'n_tokens_mistral': 1377, 'n_tokens_neox': 1317, 'n_words': 475}