rllib  1
rlevent.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           rlevent.h  -  description
00003                              -------------------
00004     begin                : Wed Dec 18 2002
00005     copyright            : (C) 2002 by Rainer Lehrig
00006     email                : lehrig@t-online.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as        *
00013  *   published by the Free Software Foundation                             *
00014  *                                                                         *
00015  ***************************************************************************/
00022 #ifndef _RL_EVENT_H_
00023 #define _RL_EVENT_H_
00024 
00025 #include "rldefine.h"
00026 #define rlMAX_EVENT 256 // maximum size of an event message
00027 
00028 static const char rlevent_name[][4] = { "INF", "WAR", "ERR", "CRI", "FAT", "TST" };
00029 enum EventTypes
00030 {
00031   rlInfo = 0,
00032   rlWarning,
00033   rlError,
00034   rlCritical,
00035   rlFatal,
00036   rlTest,
00037   rlEVENT_SIZE
00038 };
00039 
00040 #ifdef XXXunix
00041 #define rlEvent(typ, format, args...) { rlSetEventLocation(__FILE__,__LINE__); rlEventPrintf( typ, format, args); }
00042 #else
00043 #define rlEvent rlSetEventLocation(__FILE__,__LINE__);rlEventPrintf
00044 #endif
00045 
00052 void rlEventInit(int ac, char **av, const char *module);
00053 
00057 void rlSetEventLocation(const char *file, int line);
00058 
00062 void rlEventPrintf(int event_type, const char *format, ...);
00063 
00064 #endif