style fix

This commit is contained in:
Günter Obiltschnig
2017-12-11 17:55:09 +01:00
parent 025a4b0667
commit 2cac517034
2 changed files with 34 additions and 34 deletions

View File

@@ -50,13 +50,13 @@ class Net_API MailMessage: public MessageHeader
{
public:
typedef std::vector<MailRecipient> Recipients;
enum ContentDisposition
{
CONTENT_INLINE,
CONTENT_ATTACHMENT
};
enum ContentTransferEncoding
{
ENCODING_7BIT,
@@ -72,16 +72,16 @@ public:
ContentDisposition disposition;
ContentTransferEncoding encoding;
};
typedef std::vector<Part> PartVec;
MailMessage(PartStoreFactory* pStoreFactory = 0);
/// Creates an empty MailMessage.
///
/// If pStoreFactory is not null, message attachments will be
///
/// If pStoreFactory is not null, message attachments will be
/// handled by the object created by the factory. Most
/// common reason is to temporarily save attachments to
/// the file system in order to avoid potential memory
/// common reason is to temporarily save attachments to
/// the file system in order to avoid potential memory
/// exhaustion when attachment files are very large.
virtual ~MailMessage();
@@ -92,7 +92,7 @@ public:
void setRecipients(const Recipients& recipient);
/// Clears existing and sets new recipient list for the message.
const Recipients& recipients() const;
/// Returns the recipients of the message.
@@ -103,10 +103,10 @@ public:
/// characters. To include non-ASCII characters
/// in the subject, use RFC 2047 word encoding
/// (see encodeWord()).
const std::string& getSubject() const;
/// Returns the subject of the message.
void setSender(const std::string& sender);
/// Sets the sender of the message (which
/// ends up in the From header field).
@@ -135,28 +135,28 @@ public:
/// message.
///
/// Note that single CR or LF characters as line delimiters must
/// not be used. Content lines always should be terminated with a
/// not be used. Content lines always should be terminated with a
/// proper CRLF sequence.
const std::string& getContent() const;
/// Returns the content of the mail message.
///
/// A content will only be returned for single-part
/// messages. The content of multi-part mail messages
/// will be reported through the registered PartHandler.
void setContentType(const std::string& mediaType);
/// Sets the content type for the message.
void setContentType(const MediaType& mediaType);
/// Sets the content type for the message.
const std::string& getContentType() const;
/// Returns the content type for the message.
void setDate(const Poco::Timestamp& dateTime);
/// Sets the Date header to the given date/time value.
Poco::Timestamp getDate() const;
/// Returns the value of the Date header.
@@ -166,7 +166,7 @@ public:
void addPart(const std::string& name,
PartSource* pSource,
ContentDisposition disposition,
ContentTransferEncoding encoding);
ContentTransferEncoding encoding);
/// Adds a part/attachment to the mail message.
///
/// The MailMessage takes ownership of the PartSource and deletes it
@@ -177,7 +177,7 @@ public:
///
/// The part name, and the filename specified in the part source
/// must not contain any non-ASCII characters.
/// To include non-ASCII characters in the part name or filename,
/// To include non-ASCII characters in the part name or filename,
/// use RFC 2047 word encoding (see encodeWord()).
void addContent(PartSource* pSource,
@@ -187,7 +187,7 @@ public:
///
/// The part name, and the filename specified in the part source
/// must not contain any non-ASCII characters.
/// To include non-ASCII characters in the part name or filename,
/// To include non-ASCII characters in the part name or filename,
/// use RFC 2047 word encoding (see encodeWord()).
void addAttachment(const std::string& name,
@@ -198,17 +198,17 @@ public:
///
/// The part name, and the filename specified in the part source
/// must not contain any non-ASCII characters.
/// To include non-ASCII characters in the part name or filename,
/// To include non-ASCII characters in the part name or filename,
/// use RFC 2047 word encoding (see encodeWord()).
PartSource* createPartStore(const std::string& content,
const std::string& mediaType,
const std::string& filename = "");
/// Returns either default StringPartSource part store or,
/// Returns either default StringPartSource part store or,
/// if the part store factory was provided during construction,
/// the one created by PartStoreFactory.
/// Returned part store is allocated on the heap; it is caller's
/// responsibility to delete it after use. Typical use is handler
/// Returned part store is allocated on the heap; it is caller's
/// responsibility to delete it after use. Typical use is handler
/// passing it back to MailMessage, which takes care of the cleanup.
const PartVec& parts() const;
@@ -232,13 +232,13 @@ public:
/// Writes the mail message to the given output stream.
static std::string encodeWord(const std::string& text, const std::string& charset = "UTF-8");
/// If the given string contains non-ASCII characters,
/// If the given string contains non-ASCII characters,
/// encodes the given string using RFC 2047 "Q" word encoding.
///
///
/// The given text must already be encoded in the character set
/// given in charset (default is UTF-8).
///
/// Returns the encoded string, or the original string if it
/// Returns the encoded string, or the original string if it
/// consists only of ASCII characters.
static const std::string HEADER_SUBJECT;
@@ -260,7 +260,6 @@ public:
static const std::string CTE_BASE64;
protected:
void makeMultipart();
void writeHeader(const MessageHeader& header, std::ostream& ostr) const;
void writeMultipart(MessageHeader& header, std::ostream& ostr) const;

View File

@@ -33,20 +33,20 @@ class Net_API PartSource
{
public:
virtual std::istream& stream() = 0;
/// Returns an input stream for reading the
/// Returns an input stream for reading the
/// part data.
///
/// Subclasses must override this method.
virtual const std::string& filename() const;
/// Returns the filename for the part or attachment.
///
/// May be overridded by subclasses. The default
/// implementation returns an empty string.
const std::string& mediaType() const;
/// Returns the MIME media type for this part or attachment.
MessageHeader& headers();
/// Returns a MessageHeader containing additional header
/// fields for the part.
@@ -62,13 +62,14 @@ public:
virtual ~PartSource();
/// Destroys the PartSource.
static const int UNKNOWN_CONTENT_LENGTH;
static const int UNKNOWN_CONTENT_LENGTH;
protected:
PartSource();
/// Creates the PartSource, using
/// the application/octet-stream MIME type.
PartSource(const std::string& mediaType);
/// Creates the PartSource, using the
/// given MIME type.