1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
// -*- c++ -*-
// Generated by assa-genesis
//------------------------------------------------------------------------------
// $Id: LogMon.h,v 1.3 2006/07/20 02:30:55 vlg Exp $
//------------------------------------------------------------------------------
// LogMon.h
//------------------------------------------------------------------------------
// Copyright (c) YEAR by YOUR-NAME
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version
// 2 of the License, or (at your option) any later version.
//------------------------------------------------------------------------------
//
// Date : Thu Apr 17 22:49:49 2003
//
//------------------------------------------------------------------------------
#ifndef LogMon_H
#define LogMon_H
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <string>
using std::string;
#include <assa/GenServer.h>
#include <assa/Singleton.h>
#include <assa/TimeVal.h>
#include <assa/Connector.h>
#include <assa/IPv4Socket.h>
#include "LogConn.h"
class LogMon :
public ASSA::GenServer,
public ASSA::Singleton<LogMon>
{
public:
LogMon ();
~LogMon () { if (m_peer) { delete m_peer; m_peer = NULL; } }
virtual void init_service ();
virtual void process_events ();
private:
typedef ASSA::Connector<LogConn, ASSA::IPv4Socket> log_connector_t;
log_connector_t m_connector;
LogConn* m_peer;
};
/* Useful definitions */
#define LOGMON LogMon::get_instance()
#define REACTOR LOGMON->get_reactor()
#endif // LogMon_H
|