Back to index

courier  0.68.2
cmlmarchive.h
Go to the documentation of this file.
00001 #ifndef       cmlmarchive_h
00002 #define       cmlmarchive_h
00003 /*
00004 ** Copyright 2000 Double Precision, Inc.
00005 ** See COPYING for distribution information.
00006 */
00007 
00008 
00009 #include      "config.h"
00010 #include      "cmlm.h"
00011 #include      "mydirent.h"
00012 
00013 #include      <string>
00014 
00016 //
00017 // Message archive.  The Archive class is used to put or get messages from
00018 // the archive.  The ArchiveList class lists messages in the archive.
00019 //
00021 
00022 class Archive: private ExclusiveLock {
00023 
00024        unsigned long seq_no;
00025 
00026 public:
00027        Archive();
00028        ~Archive();
00029 
00030        int get_seq_no(unsigned long &);   // Return next seq no of msg
00031        int save_seq_no();          // Save the sequence number
00032 
00033        static std::string filename(unsigned long);
00034 } ;
00035 
00036 
00037 class ArchiveList : private SharedLock {
00038 
00039        DIR    *dirp;
00040 public:
00041        ArchiveList();
00042        ~ArchiveList();
00043        int    Next(unsigned long &);
00044        std::string   Next();
00045 } ;
00046 
00047 #endif