Renamed 'progressionListener' to 'progressListener'.

This commit is contained in:
Vincent Richard 2005-10-06 11:08:56 +00:00
parent c106ac3c82
commit ee46de08f7
49 changed files with 158 additions and 152 deletions

View File

@ -2,6 +2,11 @@
VERSION 0.7.2cvs
================
2005-10-06 Vincent Richard <vincent@vincent-richard.net>
* utility/progressionListener.{hpp|cpp}: renamed 'progressionListener'
to 'progressListener'.
2005-10-04 Vincent Richard <vincent@vincent-richard.net>
* net/service: removed "server.socket-factory" property; added the

View File

@ -147,7 +147,7 @@ libvmime_sources = [
'utility/datetimeUtils.cpp', 'utility/datetimeUtils.hpp',
'utility/filteredStream.cpp', 'utility/filteredStream.hpp',
'utility/path.cpp', 'utility/path.hpp',
'utility/progressionListener.cpp', 'utility/progressionListener.hpp',
'utility/progressListener.cpp', 'utility/progressListener.hpp',
'utility/random.cpp', 'utility/random.hpp',
'utility/smartPtr.hpp',
'utility/stream.cpp', 'utility/stream.hpp',

View File

@ -47,7 +47,7 @@ void emptyContentHandler::generate(utility::outputStream& /* os */, const vmime:
void emptyContentHandler::extract(utility::outputStream& /* os */,
utility::progressionListener* progress) const
utility::progressListener* progress) const
{
if (progress)
progress->start(0);
@ -60,7 +60,7 @@ void emptyContentHandler::extract(utility::outputStream& /* os */,
void emptyContentHandler::extractRaw(utility::outputStream& /* os */,
utility::progressionListener* progress) const
utility::progressListener* progress) const
{
if (progress)
progress->start(0);

View File

@ -75,7 +75,7 @@ const unsigned char encoderB64::sm_decodeMap[256] =
const utility::stream::size_type encoderB64::encode(utility::inputStream& in,
utility::outputStream& out, utility::progressionListener* progress)
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
@ -187,7 +187,7 @@ const utility::stream::size_type encoderB64::encode(utility::inputStream& in,
const utility::stream::size_type encoderB64::decode(utility::inputStream& in,
utility::outputStream& out, utility::progressionListener* progress)
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...

View File

@ -34,7 +34,7 @@ encoderDefault::encoderDefault()
const utility::stream::size_type encoderDefault::encode(utility::inputStream& in,
utility::outputStream& out, utility::progressionListener* progress)
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
@ -51,7 +51,7 @@ const utility::stream::size_type encoderDefault::encode(utility::inputStream& in
const utility::stream::size_type encoderDefault::decode(utility::inputStream& in,
utility::outputStream& out, utility::progressionListener* progress)
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...

View File

@ -90,7 +90,7 @@ const unsigned char encoderQP::sm_hexDecodeTable[256] =
const utility::stream::size_type encoderQP::encode(utility::inputStream& in,
utility::outputStream& out, utility::progressionListener* progress)
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
@ -298,7 +298,7 @@ const utility::stream::size_type encoderQP::encode(utility::inputStream& in,
const utility::stream::size_type encoderQP::decode(utility::inputStream& in,
utility::outputStream& out, utility::progressionListener* progress)
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...

View File

@ -64,7 +64,7 @@ static inline const unsigned char UUDECODE(const unsigned char c)
const utility::stream::size_type encoderUUE::encode(utility::inputStream& in,
utility::outputStream& out, utility::progressionListener* progress)
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...
@ -143,7 +143,7 @@ const utility::stream::size_type encoderUUE::encode(utility::inputStream& in,
const utility::stream::size_type encoderUUE::decode(utility::inputStream& in,
utility::outputStream& out, utility::progressionListener* progress)
utility::outputStream& out, utility::progressListener* progress)
{
in.reset(); // may not work...

View File

@ -602,7 +602,7 @@ std::vector <ref <folder> > IMAPFolder::getFolders(const bool recursive)
void IMAPFolder::fetchMessages(std::vector <ref <message> >& msg, const int options,
utility::progressionListener* progress)
utility::progressListener* progress)
{
if (!m_store)
throw exceptions::illegal_state("Store disconnected");
@ -1065,7 +1065,7 @@ void IMAPFolder::setMessageFlags(const string& set, const int flags, const int m
void IMAPFolder::addMessage(ref <vmime::message> msg, const int flags,
vmime::datetime* date, utility::progressionListener* progress)
vmime::datetime* date, utility::progressListener* progress)
{
std::ostringstream oss;
utility::outputStreamAdapter ossAdapter(oss);
@ -1080,7 +1080,7 @@ void IMAPFolder::addMessage(ref <vmime::message> msg, const int flags,
void IMAPFolder::addMessage(utility::inputStream& is, const int size, const int flags,
vmime::datetime* date, utility::progressionListener* progress)
vmime::datetime* date, utility::progressListener* progress)
{
if (!m_store)
throw exceptions::illegal_state("Store disconnected");
@ -1151,7 +1151,7 @@ void IMAPFolder::addMessage(utility::inputStream& is, const int size, const int
// Put read data into socket output stream
m_connection->sendRaw(buffer, read);
// Notify progression
// Notify progress
if (progress)
progress->progress(current, total);
}

View File

@ -235,7 +235,7 @@ class IMAPMessage_literalHandler : public IMAPParser::literalHandler
{
public:
IMAPMessage_literalHandler(utility::outputStream& os, utility::progressionListener* progress)
IMAPMessage_literalHandler(utility::outputStream& os, utility::progressListener* progress)
: m_os(os), m_progress(progress)
{
}
@ -260,7 +260,7 @@ public:
private:
utility::outputStream& m_os;
utility::progressionListener* m_progress;
utility::progressListener* m_progress;
};
#endif // VMIME_BUILDING_DOC
@ -356,7 +356,7 @@ ref <const header> IMAPMessage::getHeader() const
}
void IMAPMessage::extract(utility::outputStream& os, utility::progressionListener* progress,
void IMAPMessage::extract(utility::outputStream& os, utility::progressListener* progress,
const int start, const int length, const bool peek) const
{
if (!m_folder)
@ -367,7 +367,7 @@ void IMAPMessage::extract(utility::outputStream& os, utility::progressionListene
void IMAPMessage::extractPart
(ref <const part> p, utility::outputStream& os, utility::progressionListener* progress,
(ref <const part> p, utility::outputStream& os, utility::progressListener* progress,
const int start, const int length, const bool peek) const
{
if (!m_folder)
@ -392,7 +392,7 @@ void IMAPMessage::fetchPartHeader(ref <part> p)
void IMAPMessage::extract(ref <const part> p, utility::outputStream& os,
utility::progressionListener* progress, const int start,
utility::progressListener* progress, const int start,
const int length, const bool headerOnly, const bool peek) const
{
IMAPMessage_literalHandler literalHandler(os, progress);

View File

@ -852,7 +852,7 @@ void maildirFolder::setMessageFlagsImpl
void maildirFolder::addMessage(ref <vmime::message> msg, const int flags,
vmime::datetime* date, utility::progressionListener* progress)
vmime::datetime* date, utility::progressListener* progress)
{
std::ostringstream oss;
utility::outputStreamAdapter ossAdapter(oss);
@ -867,7 +867,7 @@ void maildirFolder::addMessage(ref <vmime::message> msg, const int flags,
void maildirFolder::addMessage(utility::inputStream& is, const int size,
const int flags, vmime::datetime* /* date */, utility::progressionListener* progress)
const int flags, vmime::datetime* /* date */, utility::progressListener* progress)
{
if (!m_store)
throw exceptions::illegal_state("Store disconnected");
@ -956,7 +956,7 @@ void maildirFolder::addMessage(utility::inputStream& is, const int size,
void maildirFolder::copyMessageImpl(const utility::file::path& tmpDirPath,
const utility::file::path& curDirPath, const utility::file::path::component& filename,
utility::inputStream& is, const utility::stream::size_type size,
utility::progressionListener* progress)
utility::progressListener* progress)
{
utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
@ -1324,7 +1324,7 @@ weak_ref <store> maildirFolder::getStore()
void maildirFolder::fetchMessages(std::vector <ref <message> >& msg,
const int options, utility::progressionListener* progress)
const int options, utility::progressListener* progress)
{
if (!m_store)
throw exceptions::illegal_state("Store disconnected");

View File

@ -302,7 +302,7 @@ void maildirMessage::setFlags(const int flags, const int mode)
void maildirMessage::extract(utility::outputStream& os,
utility::progressionListener* progress, const int start,
utility::progressListener* progress, const int start,
const int length, const bool peek) const
{
extractImpl(os, progress, 0, m_size, start, length, peek);
@ -310,7 +310,7 @@ void maildirMessage::extract(utility::outputStream& os,
void maildirMessage::extractPart(ref <const part> p, utility::outputStream& os,
utility::progressionListener* progress, const int start,
utility::progressListener* progress, const int start,
const int length, const bool peek) const
{
const maildirPart& mp = dynamic_cast <const maildirPart&>(p);
@ -320,7 +320,7 @@ void maildirMessage::extractPart(ref <const part> p, utility::outputStream& os,
}
void maildirMessage::extractImpl(utility::outputStream& os, utility::progressionListener* progress,
void maildirMessage::extractImpl(utility::outputStream& os, utility::progressListener* progress,
const int start, const int length, const int partialStart, const int partialLength,
const bool /* peek */) const
{

View File

@ -285,7 +285,7 @@ std::vector <ref <folder> > POP3Folder::getFolders(const bool /* recursive */)
void POP3Folder::fetchMessages(std::vector <ref <message> >& msg, const int options,
utility::progressionListener* progress)
utility::progressListener* progress)
{
if (!m_store)
throw exceptions::illegal_state("Store disconnected");
@ -683,14 +683,14 @@ void POP3Folder::rename(const folder::path& /* newPath */)
void POP3Folder::addMessage(ref <vmime::message> /* msg */, const int /* flags */,
vmime::datetime* /* date */, utility::progressionListener* /* progress */)
vmime::datetime* /* date */, utility::progressListener* /* progress */)
{
throw exceptions::operation_not_supported();
}
void POP3Folder::addMessage(utility::inputStream& /* is */, const int /* size */, const int /* flags */,
vmime::datetime* /* date */, utility::progressionListener* /* progress */)
vmime::datetime* /* date */, utility::progressListener* /* progress */)
{
throw exceptions::operation_not_supported();
}

View File

@ -109,7 +109,7 @@ ref <const header> POP3Message::getHeader() const
void POP3Message::extract(utility::outputStream& os,
utility::progressionListener* progress, const int start,
utility::progressListener* progress, const int start,
const int length, const bool /* peek */) const
{
if (!m_folder)
@ -146,7 +146,7 @@ void POP3Message::extract(utility::outputStream& os,
void POP3Message::extractPart
(ref <const part> /* p */, utility::outputStream& /* os */,
utility::progressionListener* /* progress */,
utility::progressListener* /* progress */,
const int /* start */, const int /* length */,
const bool /* peek */) const
{

View File

@ -702,7 +702,7 @@ void POP3Store::sendRequest(const string& buffer, const bool end)
void POP3Store::readResponse(string& buffer, const bool multiLine,
utility::progressionListener* progress)
utility::progressListener* progress)
{
bool foundTerminator = false;
int current = 0, total = 0;
@ -777,7 +777,7 @@ void POP3Store::readResponse(string& buffer, const bool multiLine,
// Check for terminator string (and strip it if present)
foundTerminator = checkTerminator(buffer, multiLine);
// Notify progression
// Notify progress
if (progress)
{
total = std::max(total, current);
@ -800,7 +800,7 @@ void POP3Store::readResponse(string& buffer, const bool multiLine,
void POP3Store::readResponse(utility::outputStream& os,
utility::progressionListener* progress, const int predictedSize)
utility::progressListener* progress, const int predictedSize)
{
int current = 0, total = predictedSize;
@ -875,7 +875,7 @@ void POP3Store::readResponse(utility::outputStream& os,
os.write(buffer, read);
current += read;
// Notify progression
// Notify progress
if (progress)
{
total = std::max(total, current);

View File

@ -116,7 +116,7 @@ void sendmailTransport::noop()
void sendmailTransport::send
(const mailbox& expeditor, const mailboxList& recipients,
utility::inputStream& is, const utility::stream::size_type size,
utility::progressionListener* progress)
utility::progressListener* progress)
{
// If no recipient/expeditor was found, throw an exception
if (recipients.isEmpty())
@ -149,7 +149,7 @@ void sendmailTransport::send
void sendmailTransport::internalSend
(const std::vector <string> args, utility::inputStream& is,
const utility::stream::size_type size, utility::progressionListener* progress)
const utility::stream::size_type size, utility::progressListener* progress)
{
const utility::file::path path = vmime::platformDependant::getHandler()->
getFileSystemFactory()->stringToPath(m_sendmailPath);

View File

@ -494,7 +494,7 @@ void SMTPTransport::noop()
void SMTPTransport::send(const mailbox& expeditor, const mailboxList& recipients,
utility::inputStream& is, const utility::stream::size_type size,
utility::progressionListener* progress)
utility::progressListener* progress)
{
// If no recipient/expeditor was found, throw an exception
if (recipients.isEmpty())

View File

@ -47,7 +47,7 @@ static void extractMailboxes
}
void transport::send(ref <vmime::message> msg, utility::progressionListener* progress)
void transport::send(ref <vmime::message> msg, utility::progressListener* progress)
{
// Extract expeditor
mailbox expeditor;

View File

@ -133,7 +133,7 @@ void streamContentHandler::generate(utility::outputStream& os, const vmime::enco
void streamContentHandler::extract(utility::outputStream& os,
utility::progressionListener* progress) const
utility::progressListener* progress) const
{
if (!m_stream)
return;
@ -155,7 +155,7 @@ void streamContentHandler::extract(utility::outputStream& os,
m_stream->reset(); // may not work...
utility::progressionListenerSizeAdapter plsa(progress, getLength());
utility::progressListenerSizeAdapter plsa(progress, getLength());
theDecoder->decode(*m_stream, os, &plsa);
}
@ -163,7 +163,7 @@ void streamContentHandler::extract(utility::outputStream& os,
void streamContentHandler::extractRaw(utility::outputStream& os,
utility::progressionListener* progress) const
utility::progressListener* progress) const
{
if (!m_stream)
return;

View File

@ -151,7 +151,7 @@ void stringContentHandler::generate(utility::outputStream& os,
void stringContentHandler::extract(utility::outputStream& os,
utility::progressionListener* progress) const
utility::progressListener* progress) const
{
// No decoding to perform
if (!isEncoded())
@ -164,7 +164,7 @@ void stringContentHandler::extract(utility::outputStream& os,
ref <encoder> theDecoder = m_encoding.getEncoder();
utility::inputStreamStringProxyAdapter in(m_string);
utility::progressionListenerSizeAdapter plsa(progress, getLength());
utility::progressListenerSizeAdapter plsa(progress, getLength());
theDecoder->decode(in, os, &plsa);
}
@ -172,7 +172,7 @@ void stringContentHandler::extract(utility::outputStream& os,
void stringContentHandler::extractRaw(utility::outputStream& os,
utility::progressionListener* progress) const
utility::progressListener* progress) const
{
m_string.extract(os, 0, m_string.length(), progress);
}

View File

@ -21,36 +21,36 @@
// the GNU General Public License cover the whole combination.
//
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
namespace vmime {
namespace utility {
// progressionListenerSizeAdapter
// progressListenerSizeAdapter
progressionListenerSizeAdapter::progressionListenerSizeAdapter
(progressionListener* list, const int total)
progressListenerSizeAdapter::progressListenerSizeAdapter
(progressListener* list, const int total)
: m_wrapped(list), m_total(total)
{
}
const bool progressionListenerSizeAdapter::cancel() const
const bool progressListenerSizeAdapter::cancel() const
{
return (m_wrapped ? m_wrapped->cancel() : false);
}
void progressionListenerSizeAdapter::start(const int predictedTotal)
void progressListenerSizeAdapter::start(const int predictedTotal)
{
if (m_wrapped)
m_wrapped->start(predictedTotal);
}
void progressionListenerSizeAdapter::progress(const int current, const int currentTotal)
void progressListenerSizeAdapter::progress(const int current, const int currentTotal)
{
if (m_wrapped)
{
@ -62,7 +62,7 @@ void progressionListenerSizeAdapter::progress(const int current, const int curre
}
void progressionListenerSizeAdapter::stop(const int total)
void progressListenerSizeAdapter::stop(const int total)
{
if (m_wrapped)
{

View File

@ -55,7 +55,7 @@ const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os)
const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os,
const stream::size_type length, progressionListener* progress)
const stream::size_type length, progressListener* progress)
{
stream::value_type buffer[65536];
stream::size_type total = 0;

View File

@ -86,7 +86,7 @@ stringProxy& stringProxy::operator=(const string_type& s)
void stringProxy::extract(outputStream& os, const size_type start, const size_type end,
utility::progressionListener* progress) const
utility::progressListener* progress) const
{
size_type len = 0;

View File

@ -30,7 +30,7 @@
#include "vmime/base.hpp"
#include "vmime/utility/stringProxy.hpp"
#include "vmime/utility/smartPtr.hpp"
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
#include "vmime/encoding.hpp"
@ -71,20 +71,20 @@ public:
* @throw exceptions::no_encoder_available if the encoding is
* not supported
* @param os output stream
* @param progress progression listener, or NULL if you do not
* want to receive progression notifications
* @param progress progress listener, or NULL if you do not
* want to receive progress notifications
*/
virtual void extract(utility::outputStream& os, utility::progressionListener* progress = NULL) const = 0;
virtual void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const = 0;
/** Extract the contents into the specified stream, without
* decoding it. It may be useful in case the encoding is not
* supported and you want to extract raw data.
*
* @param os output stream
* @param progress progression listener, or NULL if you do not
* want to receive progression notifications
* @param progress progress listener, or NULL if you do not
* want to receive progress notifications
*/
virtual void extractRaw(utility::outputStream& os, utility::progressionListener* progress = NULL) const = 0;
virtual void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const = 0;
/** Returns the actual length of data. WARNING: this can return 0 if no
* length was specified when setting data of this object.

View File

@ -42,8 +42,8 @@ public:
void generate(utility::outputStream& os, const vmime::encoding& enc, const string::size_type maxLineLength = lineLengthLimits::infinite) const;
void extract(utility::outputStream& os, utility::progressionListener* progress = NULL) const;
void extractRaw(utility::outputStream& os, utility::progressionListener* progress = NULL) const;
void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const;
void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const;
const string::size_type getLength() const;

View File

@ -28,7 +28,7 @@
#include "vmime/base.hpp"
#include "vmime/propertySet.hpp"
#include "vmime/exception.hpp"
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
namespace vmime
@ -49,21 +49,21 @@ public:
*
* @param in input data (decoded)
* @param out output stream for encoded data
* @param progress progression listener, or NULL if you do not
* want to receive progression notifications
* @param progress progress listener, or NULL if you do not
* want to receive progress notifications
* @return number of bytes written into output stream
*/
virtual const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL) = 0;
virtual const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0;
/** Decode data.
*
* @param in input data (encoded)
* @param out output stream for decoded data
* @param progress progression listener, or NULL if you do not
* want to receive progression notifications
* @param progress progress listener, or NULL if you do not
* want to receive progress notifications
* @return number of bytes written into output stream
*/
virtual const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL) = 0;
virtual const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL) = 0;
/** Return the properties of the encoder.
*

View File

@ -41,8 +41,8 @@ public:
encoderB64();
const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL);
const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL);
const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const std::vector <string> getAvailableProperties() const;

View File

@ -41,8 +41,8 @@ public:
encoderDefault();
const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL);
const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL);
const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
};

View File

@ -41,8 +41,8 @@ public:
encoderQP();
const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL);
const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL);
const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const std::vector <string> getAvailableProperties() const;

View File

@ -41,8 +41,8 @@ public:
encoderUUE();
const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL);
const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressionListener* progress = NULL);
const utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL);
const std::vector <string> getAvailableProperties() const;
};

View File

@ -36,7 +36,7 @@
#include "vmime/utility/path.hpp"
#include "vmime/utility/stream.hpp"
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
namespace vmime {
@ -249,9 +249,9 @@ public:
* @param msg message to add (data: header + body)
* @param flags flags for the new message
* @param date date/time for the new message (if NULL, the current time is used)
* @param progress progression listener, or NULL if not used
* @param progress progress listener, or NULL if not used
*/
virtual void addMessage(ref <vmime::message> msg, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressionListener* progress = NULL) = 0;
virtual void addMessage(ref <vmime::message> msg, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressListener* progress = NULL) = 0;
/** Add a message to this folder.
*
@ -259,9 +259,9 @@ public:
* @param size size of the message to add (in bytes)
* @param flags flags for the new message
* @param date date/time for the new message (if NULL, the current time is used)
* @param progress progression listener, or NULL if not used
* @param progress progress listener, or NULL if not used
*/
virtual void addMessage(utility::inputStream& is, const int size, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressionListener* progress = NULL) = 0;
virtual void addMessage(utility::inputStream& is, const int size, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressListener* progress = NULL) = 0;
/** Copy a message from this folder to another folder.
*
@ -334,9 +334,9 @@ public:
*
* @param msg list of message sequence numbers
* @param options objects to fetch (combination of folder::FetchOptions flags)
* @param progress progression listener, or NULL if not used
* @param progress progress listener, or NULL if not used
*/
virtual void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressionListener* progress = NULL) = 0;
virtual void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL) = 0;
/** Fetch objects for the specified message.
*

View File

@ -96,8 +96,8 @@ public:
void setMessageFlags(const int from, const int to, const int flags, const int mode = message::FLAG_MODE_SET);
void setMessageFlags(const std::vector <int>& nums, const int flags, const int mode = message::FLAG_MODE_SET);
void addMessage(ref <vmime::message> msg, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressionListener* progress = NULL);
void addMessage(utility::inputStream& is, const int size, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressionListener* progress = NULL);
void addMessage(ref <vmime::message> msg, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressListener* progress = NULL);
void addMessage(utility::inputStream& is, const int size, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressListener* progress = NULL);
void copyMessage(const folder::path& dest, const int num);
void copyMessages(const folder::path& dest, const int from = 1, const int to = -1);
@ -113,7 +113,7 @@ public:
weak_ref <store> getStore();
void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressionListener* progress = NULL);
void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL);
void fetchMessage(ref <message> msg, const int options);
const int getFetchCapabilities() const;

View File

@ -72,8 +72,8 @@ public:
const int getFlags() const;
void setFlags(const int flags, const int mode = FLAG_MODE_SET);
void extract(utility::outputStream& os, utility::progressionListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void extractPart(ref <const part> p, utility::outputStream& os, utility::progressionListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void extractPart(ref <const part> p, utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void fetchPartHeader(ref <part> p);
@ -83,7 +83,7 @@ private:
void processFetchResponse(const int options, const IMAPParser::msg_att* msgAtt);
void extract(ref <const part> p, utility::outputStream& os, utility::progressionListener* progress, const int start, const int length, const bool headerOnly, const bool peek) const;
void extract(ref <const part> p, utility::outputStream& os, utility::progressListener* progress, const int start, const int length, const bool headerOnly, const bool peek) const;
void convertAddressList(const IMAPParser::address_list& src, mailboxList& dest);

View File

@ -32,7 +32,7 @@
#include "vmime/utility/smartPtr.hpp"
#include "vmime/utility/stringUtils.hpp"
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
#include "vmime/encoderB64.hpp"
#include "vmime/encoderQP.hpp"
@ -144,7 +144,7 @@ public:
{
protected:
target(utility::progressionListener* progress) : m_progress(progress) {}
target(utility::progressListener* progress) : m_progress(progress) {}
target(const target&) {}
public:
@ -152,13 +152,13 @@ public:
virtual ~target() { }
utility::progressionListener* progressionListener() { return (m_progress); }
utility::progressListener* progressListener() { return (m_progress); }
virtual void putData(const string& chunk) = 0;
private:
utility::progressionListener* m_progress;
utility::progressListener* m_progress;
};
@ -167,7 +167,7 @@ public:
{
public:
targetString(utility::progressionListener* progress, vmime::string& str)
targetString(utility::progressListener* progress, vmime::string& str)
: target(progress), m_string(str) { }
const vmime::string& string() const { return (m_string); }
@ -190,7 +190,7 @@ public:
{
public:
targetStream(utility::progressionListener* progress, utility::outputStream& stream)
targetStream(utility::progressListener* progress, utility::outputStream& stream)
: target(progress), m_stream(stream) { }
const utility::outputStream& stream() const { return (m_stream); }
@ -818,7 +818,7 @@ public:
m_value = "[literal-handler]";
const string::size_type length = text->value().length();
utility::progressionListener* progress = target->progressionListener();
utility::progressListener* progress = target->progressListener();
if (progress)
{
@ -871,7 +871,7 @@ public:
{
m_value = "[literal-handler]";
parser.m_progress = target->progressionListener();
parser.m_progress = target->progressListener();
parser.readLiteral(*target, length);
parser.m_progress = NULL;
@ -4916,7 +4916,7 @@ private:
weak_ref <IMAPTag> m_tag;
weak_ref <socket> m_socket;
utility::progressionListener* m_progress;
utility::progressListener* m_progress;
literalHandler* m_literalHandler;
@ -5064,7 +5064,7 @@ public:
len += receiveBuffer.length();
}
// Notify progression
// Notify progress
if (m_progress)
m_progress->progress(len, count);
}

View File

@ -97,8 +97,8 @@ public:
void setMessageFlags(const int from, const int to, const int flags, const int mode = message::FLAG_MODE_SET);
void setMessageFlags(const std::vector <int>& nums, const int flags, const int mode = message::FLAG_MODE_SET);
void addMessage(ref <vmime::message> msg, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressionListener* progress = NULL);
void addMessage(utility::inputStream& is, const int size, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressionListener* progress = NULL);
void addMessage(ref <vmime::message> msg, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressListener* progress = NULL);
void addMessage(utility::inputStream& is, const int size, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressListener* progress = NULL);
void copyMessage(const folder::path& dest, const int num);
void copyMessages(const folder::path& dest, const int from = 1, const int to = -1);
@ -114,7 +114,7 @@ public:
weak_ref <store> getStore();
void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressionListener* progress = NULL);
void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL);
void fetchMessage(ref <message> msg, const int options);
const int getFetchCapabilities() const;
@ -138,7 +138,7 @@ private:
void setMessageFlagsImpl(const std::vector <int>& nums, const int flags, const int mode);
void copyMessagesImpl(const folder::path& dest, const std::vector <int>& nums);
void copyMessageImpl(const utility::file::path& tmpDirPath, const utility::file::path& curDirPath, const utility::file::path::component& filename, utility::inputStream& is, const utility::stream::size_type size, utility::progressionListener* progress);
void copyMessageImpl(const utility::file::path& tmpDirPath, const utility::file::path& curDirPath, const utility::file::path::component& filename, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress);
void notifyMessagesCopied(const folder::path& dest);

View File

@ -70,8 +70,8 @@ public:
const int getFlags() const;
void setFlags(const int flags, const int mode = FLAG_MODE_SET);
void extract(utility::outputStream& os, utility::progressionListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void extractPart(ref <const part> p, utility::outputStream& os, utility::progressionListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void extractPart(ref <const part> p, utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void fetchPartHeader(ref <part> p);
@ -83,7 +83,7 @@ private:
ref <header> getOrCreateHeader();
void extractImpl(utility::outputStream& os, utility::progressionListener* progress, const int start, const int length, const int partialStart, const int partialLength, const bool peek) const;
void extractImpl(utility::outputStream& os, utility::progressListener* progress, const int start, const int length, const int partialStart, const int partialLength, const bool peek) const;
weak_ref <maildirFolder> m_folder;

View File

@ -27,7 +27,7 @@
#include "vmime/header.hpp"
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
#include "vmime/utility/stream.hpp"
@ -256,14 +256,14 @@ public:
* \warning Partial fetch might not be supported by the underlying protocol.
*
* @param os output stream in which to write message data
* @param progress progression listener, or NULL if not used
* @param progress progress listener, or NULL if not used
* @param start index of the first byte to retrieve (used for partial fetch)
* @param length number of bytes to retrieve (used for partial fetch)
* @param peek if true, try not to mark the message as read. This may not
* be supported by the protocol (IMAP supports this), but it will NOT throw
* an exception if not supported.
*/
virtual void extract(utility::outputStream& os, utility::progressionListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const = 0;
virtual void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const = 0;
/** Extract the specified MIME part of the message (header + contents).
*
@ -271,14 +271,14 @@ public:
*
* @param p part to extract
* @param os output stream in which to write part data
* @param progress progression listener, or NULL if not used
* @param progress progress listener, or NULL if not used
* @param start index of the first byte to retrieve (used for partial fetch)
* @param length number of bytes to retrieve (used for partial fetch)
* @param peek if true, try not to mark the message as read. This may not
* be supported by the protocol (IMAP supports this), but it will NOT throw
* an exception if not supported.
*/
virtual void extractPart(ref <const part> p, utility::outputStream& os, utility::progressionListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const = 0;
virtual void extractPart(ref <const part> p, utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const = 0;
/** Fetch the MIME header for the specified part.
*

View File

@ -95,8 +95,8 @@ public:
void setMessageFlags(const int from, const int to, const int flags, const int mode = message::FLAG_MODE_SET);
void setMessageFlags(const std::vector <int>& nums, const int flags, const int mode = message::FLAG_MODE_SET);
void addMessage(ref <vmime::message> msg, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressionListener* progress = NULL);
void addMessage(utility::inputStream& is, const int size, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressionListener* progress = NULL);
void addMessage(ref <vmime::message> msg, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressListener* progress = NULL);
void addMessage(utility::inputStream& is, const int size, const int flags = message::FLAG_UNDEFINED, vmime::datetime* date = NULL, utility::progressListener* progress = NULL);
void copyMessage(const folder::path& dest, const int num);
void copyMessages(const folder::path& dest, const int from = 1, const int to = -1);
@ -112,7 +112,7 @@ public:
weak_ref <store> getStore();
void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressionListener* progress = NULL);
void fetchMessages(std::vector <ref <message> >& msg, const int options, utility::progressListener* progress = NULL);
void fetchMessage(ref <message> msg, const int options);
const int getFetchCapabilities() const;

View File

@ -72,8 +72,8 @@ public:
const int getFlags() const;
void setFlags(const int flags, const int mode = FLAG_MODE_SET);
void extract(utility::outputStream& os, utility::progressionListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void extractPart(ref <const part> p, utility::outputStream& os, utility::progressionListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void extract(utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void extractPart(ref <const part> p, utility::outputStream& os, utility::progressListener* progress = NULL, const int start = 0, const int length = -1, const bool peek = false) const;
void fetchPartHeader(ref <part> p);

View File

@ -102,8 +102,8 @@ private:
static const int getResponseCode(const string& buffer);
void sendRequest(const string& buffer, const bool end = true);
void readResponse(string& buffer, const bool multiLine, utility::progressionListener* progress = NULL);
void readResponse(utility::outputStream& os, utility::progressionListener* progress = NULL, const int predictedSize = 0);
void readResponse(string& buffer, const bool multiLine, utility::progressListener* progress = NULL);
void readResponse(utility::outputStream& os, utility::progressListener* progress = NULL, const int predictedSize = 0);
static const bool checkTerminator(string& buffer, const bool multiLine);
static const bool checkOneTerminator(string& buffer, const string& term);

View File

@ -63,14 +63,14 @@ public:
void noop();
void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressionListener* progress = NULL);
void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress = NULL);
private:
void internalDisconnect();
void internalSend(const std::vector <string> args, utility::inputStream& is,
const utility::stream::size_type size, utility::progressionListener* progress);
const utility::stream::size_type size, utility::progressListener* progress);
string m_sendmailPath;

View File

@ -40,7 +40,7 @@
#include "vmime/net/tls/certificateVerifier.hpp"
#endif // VMIME_HAVE_TLS_SUPPORT
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
namespace vmime {

View File

@ -38,7 +38,7 @@
#include "vmime/security/authenticator.hpp"
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
namespace vmime {

View File

@ -60,7 +60,7 @@ public:
void noop();
void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressionListener* progress = NULL);
void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress = NULL);
private:

View File

@ -53,9 +53,9 @@ public:
/** Send a message over this transport service.
*
* @param msg message to send
* @param progress progression listener, or NULL if not used
* @param progress progress listener, or NULL if not used
*/
virtual void send(ref <vmime::message> msg, utility::progressionListener* progress = NULL);
virtual void send(ref <vmime::message> msg, utility::progressListener* progress = NULL);
/** Send a message over this transport service.
*
@ -63,9 +63,9 @@ public:
* @param recipients list of recipient mailboxes
* @param is input stream provding message data (header + body)
* @param size size of the message data
* @param progress progression listener, or NULL if not used
* @param progress progress listener, or NULL if not used
*/
virtual void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressionListener* progress = NULL) = 0;
virtual void send(const mailbox& expeditor, const mailboxList& recipients, utility::inputStream& is, const utility::stream::size_type size, utility::progressListener* progress = NULL) = 0;
const Type getType() const;

View File

@ -51,8 +51,8 @@ public:
void generate(utility::outputStream& os, const vmime::encoding& enc, const string::size_type maxLineLength = lineLengthLimits::infinite) const;
void extract(utility::outputStream& os, utility::progressionListener* progress = NULL) const;
void extractRaw(utility::outputStream& os, utility::progressionListener* progress = NULL) const;
void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const;
void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const;
const string::size_type getLength() const;

View File

@ -69,8 +69,8 @@ public:
void generate(utility::outputStream& os, const vmime::encoding& enc, const string::size_type maxLineLength = lineLengthLimits::infinite) const;
void extract(utility::outputStream& os, utility::progressionListener* progress = NULL) const;
void extractRaw(utility::outputStream& os, utility::progressionListener* progress = NULL) const;
void extract(utility::outputStream& os, utility::progressListener* progress = NULL) const;
void extractRaw(utility::outputStream& os, utility::progressListener* progress = NULL) const;
const string::size_type getLength() const;

View File

@ -21,8 +21,8 @@
// the GNU General Public License cover the whole combination.
//
#ifndef VMIME_UTILITY_PROGRESSIONLISTENER_HPP_INCLUDED
#define VMIME_UTILITY_PROGRESSIONLISTENER_HPP_INCLUDED
#ifndef VMIME_UTILITY_PROGRESSLISTENER_HPP_INCLUDED
#define VMIME_UTILITY_PROGRESSLISTENER_HPP_INCLUDED
namespace vmime {
@ -30,14 +30,14 @@ namespace utility {
/** An interface to implement if you want to be notified
* of a progression status by some objects.
* of a state of progress by some objects.
*/
class progressionListener
class progressListener
{
protected:
virtual ~progressionListener() { }
virtual ~progressListener() { }
public:
@ -73,20 +73,20 @@ public:
/** A progression listener used when total size is known by the
/** A progress listener used when total size is known by the
* receiver, but not by the notifier.
*/
class progressionListenerSizeAdapter : public progressionListener
class progressListenerSizeAdapter : public progressListener
{
public:
/** Construct a new progressionListenerSizeAdapter object.
/** Construct a new progressListenerSizeAdapter object.
*
* @param list wrapped progression listener (can be NULL)
* @param list wrapped progress listener (can be NULL)
* @param total predicted total
*/
progressionListenerSizeAdapter(progressionListener* list, const int total);
progressListenerSizeAdapter(progressListener* list, const int total);
const bool cancel() const;
@ -96,7 +96,7 @@ public:
private:
progressionListener* m_wrapped;
progressListener* m_wrapped;
int m_total;
};
@ -105,4 +105,5 @@ private:
} // vmime
#endif // VMIME_UTILITY_PROGRESSIONLISTENER_HPP_INCLUDED
#endif // VMIME_UTILITY_PROGRESSLISTENER_HPP_INCLUDED

View File

@ -32,7 +32,7 @@
#include "vmime/config.hpp"
#include "vmime/types.hpp"
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
#if VMIME_HAVE_MESSAGING_FEATURES
@ -177,7 +177,7 @@ outputStream& operator<<(outputStream& os, const T& t)
const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os);
/** Copy data from one stream into another stream using a buffered method
* and notify progression of the operation.
* and notify progress state of the operation.
*
* @param is input stream (source data)
* @param os output stream (destination for data)
@ -187,7 +187,7 @@ const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os);
*/
const stream::size_type bufferedStreamCopy(inputStream& is, outputStream& os,
const stream::size_type length, progressionListener* progress);
const stream::size_type length, progressListener* progress);
// Adapters

View File

@ -29,7 +29,7 @@
#include "vmime/types.hpp"
#include "vmime/utility/stream.hpp"
#include "vmime/utility/progressionListener.hpp"
#include "vmime/utility/progressListener.hpp"
namespace vmime {
@ -63,7 +63,7 @@ public:
// Extract some portion (or whole) of the string
// and output it into a stream.
void extract(outputStream& os, const size_type start = 0, const size_type end = std::numeric_limits <size_type>::max(), utility::progressionListener* progress = NULL) const;
void extract(outputStream& os, const size_type start = 0, const size_type end = std::numeric_limits <size_type>::max(), utility::progressListener* progress = NULL) const;
// Return the "virtual" length of the string
const size_type length() const;