- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

gstoredmessage.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2001-2013 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 // ===
20
21 #ifndef G_SMTP_STORED_MESSAGE_H
22 #define G_SMTP_STORED_MESSAGE_H
23
24 #include "gdef.h"
25 #include "gsmtp.h"
26 #include "gstrings.h"
27 #include "gpath.h"
28
30 namespace GSmtp
31 {
32 class StoredMessage ;
33 }
34
40 class GSmtp::StoredMessage
41 {
42 public:
43 virtual std::string name() const = 0 ;
45
46 virtual std::string location() const = 0 ;
48
49 virtual const std::string & from() const = 0 ;
51
52 virtual const G::Strings & to() const = 0 ;
54
55 virtual std::auto_ptr<std::istream> extractContentStream() = 0 ;
58
59 virtual void destroy() = 0 ;
61
62 virtual void fail( const std::string & reason , int reason_code ) = 0 ;
64
65 virtual void unfail() = 0 ;
67
68 virtual bool eightBit() const = 0 ;
72
73 virtual std::string authentication() const = 0 ;
75
76 virtual size_t remoteRecipientCount() const = 0 ;
78
79 virtual size_t errorCount() const = 0 ;
81
82 virtual void sync() = 0 ;
85
86 virtual ~StoredMessage() ;
88
89 private:
90 void operator=( const StoredMessage & ) ; // not implemented
91 } ;
92
93 #endif
94
GSmtp::StoredMessage::authentication
virtual std::string authentication() const =0
Returns the message authentication string.
gstrings.h
GSmtp
SMTP and message-store classes.
GSmtp::StoredMessage::from
virtual const std::string & from() const =0
Returns the envelope 'from' field.
GSmtp::StoredMessage::unfail
virtual void unfail()=0
Marks the message as unfailed within the store.
GSmtp::StoredMessage::name
virtual std::string name() const =0
Returns some sort of unique identifier for the message.
G::Strings
std::list< std::string > Strings
A std::list of std::strings.
Definition: gstrings.h:39
GSmtp::StoredMessage::to
virtual const G::Strings & to() const =0
Returns the envelope 'to' fields.
GSmtp::StoredMessage
An abstract class for messages which have come from the store.
Definition: gstoredmessage.h:40
GSmtp::StoredMessage::~StoredMessage
virtual ~StoredMessage()
Destructor.
Definition: gstoredmessage.cpp:25
GSmtp::StoredMessage::destroy
virtual void destroy()=0
Deletes the message within the store.
GSmtp::StoredMessage::extractContentStream
virtual std::auto_ptr< std::istream > extractContentStream()=0
Extracts the content stream.
GSmtp::StoredMessage::sync
virtual void sync()=0
Synchronises the message object with the underlying storage.
GSmtp::StoredMessage::fail
virtual void fail(const std::string &reason, int reason_code)=0
Marks the message as failed within the store.
GSmtp::StoredMessage::errorCount
virtual size_t errorCount() const =0
Returns the number of accumulated submission errors.
gpath.h
gsmtp.h
GSmtp::StoredMessage::remoteRecipientCount
virtual size_t remoteRecipientCount() const =0
Returns the number of non-local recipients.
GSmtp::StoredMessage::eightBit
virtual bool eightBit() const =0
Returns true if the message content (header+body) contains a character with the most significant bit ...
GSmtp::StoredMessage::location
virtual std::string location() const =0
Returns another sort of unique identifier for the message.