E-MailRelay

gdeliveryfilter.h
Go to the documentation of this file.
1//
2// Copyright (C) 2001-2024 Graeme Walker <graeme_walker@users.sourceforge.net>
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
16// ===
17///
18/// \file gdeliveryfilter.h
19///
20
21#ifndef G_DELIVERY_FILTER_H
22#define G_DELIVERY_FILTER_H
23
24#include "gdef.h"
25#include "gfilter.h"
26#include "gsimplefilterbase.h"
27#include "gfilestore.h"
28#include "geventstate.h"
29
30 namespace GFilters
31{
32 class DeliveryFilter ;
33}
34
35//| \class GFilters::DeliveryFilter
36/// A concrete GSmtp::Filter class that copies the message to multiple
37/// spool sub-directories according to the envelope recipient list.
38/// The implementation delegates to GStore::FileDelivery.
39///
40 class GFilters::DeliveryFilter : public SimpleFilterBase
41{
42 public:
43 DeliveryFilter( GNet::EventState es , GStore::FileStore & ,
44 Filter::Type , const Filter::Config & , const std::string & spec ) ;
45 ///< Constructor.
46
47 private: // overrides
48 Result run( const GStore::MessageId & , bool & , GStore::FileStore::State ) override ;
49
50 private:
51 GStore::FileStore & m_store ;
52 Filter::Type m_filter_type ;
53 Filter::Config m_filter_config ;
54 std::string m_spec ;
55} ;
56
57#endif
GFilters::DeliveryFilter
A concrete GSmtp::Filter class that copies the message to multiple spool sub-directories according to...
Definition: gdeliveryfilter.h:41
GFilters::DeliveryFilter::DeliveryFilter
DeliveryFilter(GNet::EventState es, GStore::FileStore &, Filter::Type, const Filter::Config &, const std::string &spec)
Constructor.
Definition: gdeliveryfilter.cpp:27
GFilters::SimpleFilterBase
A GSmtp::Filter base class for filters that run synchronously.
Definition: gsimplefilterbase.h:43
GNet::EventState
A lightweight object containing an ExceptionHandler pointer, optional ExceptionSource pointer and opt...
Definition: geventstate.h:131
GStore::FileStore
A concrete implementation of the MessageStore interface dealing in paired flat files.
Definition: gfilestore.h:56
GStore::MessageId
A somewhat opaque identifer for a GStore::MessageStore message id.
Definition: gmessagestore.h:43
geventstate.h
gfilestore.h
gfilter.h
gsimplefilterbase.h
GFilters
Message filter classes.
Definition: gcopyfilter.h:31