Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

ArtSpooler.h

Go to the documentation of this file.
00001 #ifndef __ArtSpooler_h__
00002 #define __ArtSpooler_h__
00003 
00004 /* Copyright (C) 2003 Herbert Straub
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 #include <string>
00022 
00023 #include "Article.h"
00024 #include "ObjLock.h"
00025 
00039 class ArtSpooler {
00040       public:
00048         ArtSpooler(const string & spoolDir);
00049 
00050         ~ArtSpooler();
00051 
00059         void spoolArt(Article & a);
00060 
00067         Article *getSpooledArt(void);
00068 
00069 
00076         void storeBadArt(Article & a);
00077 
00078       private:
00079 
00084          string createID(void);
00085 
00090         string extractID(Article & a);
00091 
00096         int storeArticle(const string & path, Article & a);
00097 
00098       private:
00099          string spoolDir;
00100         string artSpool;
00101         string badArticles;
00102         ObjLock *pLock;
00103 };
00104 
00105 
00106 #endif

Generated on Sun Oct 24 21:08:17 2004 for NewsCache by doxygen 1.3.6-20040222