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 enc = - vmime::encoderFactory::getInstance()->create("base64"); +vmime::ref 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 + vmime::ref enc = ef->getEncoderAt(i); std::cout << " * " << enc->getName() << std::endl; // Create an instance of the encoder to get its properties - vmime::ref e = enc->create(); + vmime::ref e = enc->create(); std::vector props = e->getAvailableProperties(); std::vector ::const_iterator it;