rllib
1
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
lib
rleventlogserver.h
Go to the documentation of this file.
1
/***************************************************************************
2
rleventlogserver.h - description
3
-------------------
4
begin : Wed Dec 18 2002
5
copyright : (C) 2002 by R. Lehrig
6
email : lehrig@t-online.de
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This library is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
13
* published by the Free Software Foundation *
14
* *
15
***************************************************************************/
16
#ifndef _RL_EVENT_LOG_SERVER_H_
17
#define _RL_EVENT_LOG_SERVER_H_
18
19
#include "
rldefine.h
"
20
#include "
rlevent.h
"
21
#include "
rlthread.h
"
22
23
#define rlMAX_MESSAGES 128
24
29
class
rlEventLogServer
30
{
31
public
:
38
rlEventLogServer
(
const
char
*
filename
=NULL,
int
max_events
=10000);
39
virtual
~rlEventLogServer
();
40
45
const
char
*
getEvent
(
char
*buf,
int
*num);
46
void
putEvent
(
const
char
*event);
47
48
private
:
49
char
memory
[
rlMAX_MESSAGES
*
rlMAX_EVENT
];
50
rlMutex
mutex
;
51
int
front
;
52
int
cnt
;
53
char
*
filename
;
54
void
*
fp
;
55
int
max_events
,
num_events
;
56
};
57
62
class
rlEventLogServerThreads
63
{
64
public
:
68
rlEventLogServerThreads
(
int
port
,
rlEventLogServer
*
event_log_server
);
69
virtual
~rlEventLogServerThreads
();
70
void
start
();
71
int
getPort
();
72
rlEventLogServer
*
event_log_server
;
73
74
private
:
75
rlThread
acceptThread
;
76
int
port
;
77
};
78
79
#endif
Generated by
1.8.2