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
|
// Copyright (c) 2000-2001 Peter Karlsson
//
// $Id: newsspoolread.h,v 1.4 2001/02/10 12:57:16 peter Exp $
//
// 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, version 2
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef __NEWSSPOOLREAD_H
#define __NEWSSPOOLREAD_H
#include "arearead.h"
class StatEngine;
/**
* Class that reads Usenet news spools.
* This class reads message bases stored in the standard text-based Usenet
* news spool format.
*/
class NewsSpoolRead : public AreaRead
{
public:
/** Standard constructor.
* Creates the Usenet spool reader object.
* @param path Directory for the news spool.
*/
NewsSpoolRead(const char *path);
/** Standard destructor. */
virtual ~NewsSpoolRead();
/**
* Transfer function.
* This function transfers all messages in the message bases, received
* after the specified starting date, to the specified statistics engine.
*
* @param starttime Date to start retrieve statistics from.
* @param endtime Date to stop retrieve statistics at.
* @param destination Engine object to transfer data to.
* @return True if the message base was read correctly (even if no
* messages fits the condition).
*/
virtual bool Transfer(time_t starttime, time_t endtime,
StatEngine &destination);
protected:
/** Path to spool directory. */
char *areapath;
};
#endif
|