diff options
author | Vincent Richard <[email protected]> | 2008-10-12 14:00:45 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2008-10-12 14:00:45 +0000 |
commit | bb55b63657d01edea475f59cb9eeb2fe83eb609c (patch) | |
tree | 6be3520c5091a2dd0680fb609aa9801a9157a2ff /doc | |
parent | New namespace for encoders. (diff) | |
download | vmime-bb55b63657d01edea475f59cb9eeb2fe83eb609c.tar.gz vmime-bb55b63657d01edea475f59cb9eeb2fe83eb609c.zip |
Updated doc to take into account the new namespace for encoders.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/book/basics.tex | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/book/basics.tex b/doc/book/basics.tex index 27591e48..30909c22 100644 --- a/doc/book/basics.tex +++ b/doc/book/basics.tex @@ -725,7 +725,7 @@ const vmime::string subjectText = The MIME standard defines a certain number of encodings to allow data to be safely transmitted from one peer to another. VMime provides -data encoding and decoding using the {\vcode vmime::encoder} object. +data encoding and decoding using the {\vcode vmime::utility::encoder::encoder} object. You should not need to use encoders directly, as all encoding/decoding process is handled internally by the library, but it is good to know @@ -733,14 +733,14 @@ they exist and how they work. \subsection{Using encoders} % ------------------------------------------------ -You can create an instance of an encoder using the 'vmime::encoderFactory' +You can create an instance of an encoder using the 'vmime::utility::encoder::encoderFactory' object, giving the encoding name ({\it base64}, {\it quoted-printable}, ...). The following example creates an instance of the Base64 encoder to encode some data: \begin{lstlisting}[caption={A simple example of using an encoder}] -vmime::ref <vmime::encoder> enc = - vmime::encoderFactory::getInstance()->create("base64"); +vmime::ref <vmime::utility::encoder::encoder> enc = + vmime::utility::encoder::encoderFactory::getInstance()->create("base64"); vmime::string inString("Some data to encode"); vmime::utility::inputStreamStringAdapter in(inString); @@ -761,20 +761,21 @@ an excerpt from {\vexample example6}} enumerates available encoders and the supported properties for each of them: \begin{lstlisting}[caption={Enumerating encoders and their properties}] -vmime::encoderFactory* ef = vmime::encoderFactory::getInstance(); +vmime::utility::encoder::encoderFactory* ef = + vmime::utility::encoder::encoderFactory::getInstance(); std::cout << "Available encoders:" << std::endl; for (int i = 0 ; i < ef->getEncoderCount() ; ++i) { // Output encoder name - vmime::ref <const vmime::encoderFactory::registeredEncoder> + vmime::ref <const vmime::utility::encoder::encoderFactory::registeredEncoder> enc = ef->getEncoderAt(i); std::cout << " * " << enc->getName() << std::endl; // Create an instance of the encoder to get its properties - vmime::ref <vmime::encoder> e = enc->create(); + vmime::ref <vmime::utility::encoder::encoder> e = enc->create(); std::vector <vmime::string> props = e->getAvailableProperties(); std::vector <vmime::string>::const_iterator it; |