mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-14 02:57:45 +01:00
renamed getPartStore() to createPartStore()
This commit is contained in:
parent
ad077b8f3f
commit
ea57bf8207
@ -43,7 +43,6 @@
|
|||||||
#include "Poco/Net/Net.h"
|
#include "Poco/Net/Net.h"
|
||||||
#include "Poco/Net/PartSource.h"
|
#include "Poco/Net/PartSource.h"
|
||||||
#include "Poco/FileStream.h"
|
#include "Poco/FileStream.h"
|
||||||
#include "Poco/TemporaryFile.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
@ -219,15 +219,15 @@ public:
|
|||||||
/// 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()).
|
/// use RFC 2047 word encoding (see encodeWord()).
|
||||||
|
|
||||||
PartSource* getPartStore(const std::string& content,
|
PartSource* createPartStore(const std::string& content,
|
||||||
const std::string& mediaType,
|
const std::string& mediaType,
|
||||||
const std::string& filename = "");
|
const std::string& filename = "");
|
||||||
/// Returns either built-in default (StringPartSource) part store or,
|
/// Returns either default StringPartSource part store or,
|
||||||
/// if the part store factory was provided during contruction,
|
/// if the part store factory was provided during contruction,
|
||||||
/// the one created by PartStoreFactory.
|
/// the one created by PartStoreFactory.
|
||||||
/// Returned part store is allocated on the heap; it is caller's responsibility
|
/// Returned part store is allocated on the heap; it is caller's
|
||||||
/// to delete it after use. Typical use is handler passing it back to MailMessage,
|
/// responsibility to delete it after use. Typical use is handler
|
||||||
/// which takes care of the cleanup.
|
/// passing it back to MailMessage, which takes care of the cleanup.
|
||||||
|
|
||||||
const PartVec& parts() const;
|
const PartVec& parts() const;
|
||||||
/// Returns const reference to the vector containing part stores.
|
/// Returns const reference to the vector containing part stores.
|
||||||
|
@ -114,7 +114,7 @@ namespace
|
|||||||
|
|
||||||
NameValueCollection::ConstIterator it = header.begin();
|
NameValueCollection::ConstIterator it = header.begin();
|
||||||
NameValueCollection::ConstIterator end = header.end();
|
NameValueCollection::ConstIterator end = header.end();
|
||||||
PartSource* pPS = _pMsg->getPartStore(tmp,
|
PartSource* pPS = _pMsg->createPartStore(tmp,
|
||||||
header[MailMessage::HEADER_CONTENT_TYPE],
|
header[MailMessage::HEADER_CONTENT_TYPE],
|
||||||
getFileNameFromDisp(it->second));
|
getFileNameFromDisp(it->second));
|
||||||
poco_check_ptr (pPS);
|
poco_check_ptr (pPS);
|
||||||
@ -680,7 +680,7 @@ std::string MailMessage::encodeWord(const std::string& text, const std::string&
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PartSource* MailMessage::getPartStore(const std::string& content, const std::string& mediaType, const std::string& filename)
|
PartSource* MailMessage::createPartStore(const std::string& content, const std::string& mediaType, const std::string& filename)
|
||||||
{
|
{
|
||||||
if (!_pStoreFactory) return new StringPartSource(content, mediaType, filename);
|
if (!_pStoreFactory) return new StringPartSource(content, mediaType, filename);
|
||||||
else return _pStoreFactory->createPartStore(content, mediaType, filename);
|
else return _pStoreFactory->createPartStore(content, mediaType, filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user