You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
786 B
41 lines
786 B
/* This file is part of the KDE project
|
|
Copyright (C) 2001 Simon Hausmann <hausmann@kde.org>
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the Artistic License.
|
|
*/
|
|
#ifndef __logfile_h__
|
|
#define __logfile_h__
|
|
|
|
#include <tqobject.h>
|
|
|
|
class TQFile;
|
|
|
|
class LogFile : public TQObject
|
|
{
|
|
public:
|
|
LogFile( const TQString &channel, const TQString &server );
|
|
virtual ~LogFile();
|
|
|
|
void open();
|
|
|
|
void closeLog();
|
|
|
|
void log( const TQString &message );
|
|
|
|
protected:
|
|
virtual void timerEvent( TQTimerEvent * );
|
|
|
|
private:
|
|
TQString m_channel;
|
|
TQString m_server;
|
|
|
|
TQFile *m_file;
|
|
|
|
int m_flushTimerId;
|
|
|
|
TQString makeLogFileName( const TQString &channel, const TQString &server, int suffix = -1 );
|
|
};
|
|
|
|
#endif
|