lwes_event_type_db.h

Go to the documentation of this file.
00001 /*======================================================================*
00002  * Copyright (C) 2008 Light Weight Event System                         *
00003  * All rights reserved.                                                 *
00004  *                                                                      *
00005  * This program is free software; you can redistribute it and/or modify *
00006  * it under the terms of the GNU General Public License as published by *
00007  * the Free Software Foundation; either version 2 of the License, or    *
00008  * (at your option) any later version.                                  *
00009  *                                                                      *
00010  * This program is distributed in the hope that it will be useful,      *
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
00013  * GNU General Public License for more details.                         *
00014  *                                                                      *
00015  * You should have received a copy of the GNU General Public License    *
00016  * along with this program; if not, write to the Free Software          *
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor,                   *
00018  * Boston, MA 02110-1301 USA.                                           *
00019  *======================================================================*/
00020 #ifndef __LWES_EVENT_TYPE_DB
00021 #define __LWES_EVENT_TYPE_DB
00022 
00023 #include "lwes_types.h"
00024 
00025 #include <stdio.h>   /* for FILENAME_MAX */
00026 #include <stdlib.h>  /* for malloc */
00027 #include <string.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif 
00032 
00043 struct lwes_event_type_db_attribute
00044 {
00046   struct lwes_event *event;
00047 };
00048 
00052 struct lwes_event_type_db
00053 {
00055   char esf_filename[FILENAME_MAX];
00058   struct lwes_hash *events;
00059 };
00060 
00071 struct lwes_event_type_db *
00072 lwes_event_type_db_create
00073   (const char *filename);
00074 
00083 int
00084 lwes_event_type_db_destroy
00085   (struct lwes_event_type_db *db);
00086 
00094 int
00095 lwes_event_type_db_add_event
00096   (struct lwes_event_type_db *db,
00097    LWES_SHORT_STRING event_name);
00098 
00108 int
00109 lwes_event_type_db_add_attribute
00110   (struct lwes_event_type_db *db,
00111    LWES_SHORT_STRING event_name,
00112    LWES_SHORT_STRING attr_name,
00113    LWES_SHORT_STRING type);
00114 
00122 int
00123 lwes_event_type_db_check_for_event
00124   (struct lwes_event_type_db *db, 
00125    LWES_SHORT_STRING event_name);
00126 
00135 int
00136 lwes_event_type_db_check_for_attribute
00137   (struct lwes_event_type_db *db, 
00138    LWES_CONST_SHORT_STRING attr_name,
00139    LWES_CONST_SHORT_STRING event_name);
00140 
00151 int
00152 lwes_event_type_db_check_for_type
00153   (struct lwes_event_type_db *db, 
00154    LWES_BYTE type_value,
00155    LWES_CONST_SHORT_STRING attr_name,
00156    LWES_CONST_SHORT_STRING event_name);
00157 
00158 #ifdef __cplusplus
00159 }
00160 #endif 
00161 
00162 #endif /* __LWES_EVENT_TYPE_DB */

Generated on Thu Aug 21 07:18:55 2008 for lwes by  doxygen 1.4.6