Back to index

courier  0.68.2
cmlmsublist.h
Go to the documentation of this file.
00001 #ifndef cmlmsublist_h
00002 #define cmlmsublist_h
00003 
00004 /*
00005 ** Copyright 2000-2007 Double Precision, Inc.
00006 ** See COPYING for distribution information.
00007 */
00008 
00009 
00010 #include      "config.h"
00011 #include      "cmlm.h"
00012 #include      "mydirent.h"
00013 #include      "dbobj.h"
00014 #include      "afx/afx.h"
00015 #include      <stdio.h>
00016 #include      <stdlib.h>
00017 
00018 #include      <string>
00019 #include      <list>
00020 
00021 //
00022 //  This class is used to read the subscriber database.
00023 //
00024 
00025 class SubscriberList : public SubSharedLock {
00026 
00027        DIR    *dirp;
00028        DbObj  domain_file;
00029 
00030        std::list<std::string> misclist;
00031 
00032        bool   (SubscriberList::*next_func)(std::string &);
00033 
00034        bool   domain( std::string &), shared( std::string &);
00035        bool   openalias( std::string &), nextalias( std::string &);
00036 public:
00037        std::string   posting_alias;
00038        std::string   sub_info;
00039 
00040        SubscriberList( bool wantalias=false);
00041        bool Next(std::string &r) { return ( (this->*next_func)(r) ); }
00042 
00043        static void splitmisc(std::string s,
00044                            std::list<std::string> &misclist);
00045 
00046        static std::string joinmisc(const std::list<std::string> &misclist);
00047 
00048        ~SubscriberList();
00049 } ;
00050 
00051 #endif