aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2010-07-21 12:21:07 +0000
committerVincent Richard <[email protected]>2010-07-21 12:21:07 +0000
commit7a51887dba85c643089ba2d8dc544f87b9c24cf7 (patch)
treed5b32b8bb8ac43a99ad205f5a3e390e81b3e0689
parentTake account of charset recommended encoding (thanks to John van der Kamp, Za... (diff)
downloadvmime-7a51887dba85c643089ba2d8dc544f87b9c24cf7.tar.gz
vmime-7a51887dba85c643089ba2d8dc544f87b9c24cf7.zip
Added section about deleting messages from store.
-rw-r--r--doc/book/net.tex21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/book/net.tex b/doc/book/net.tex
index 08b7df56..30568611 100644
--- a/doc/book/net.tex
+++ b/doc/book/net.tex
@@ -614,6 +614,27 @@ Suppose we have a message with the following structure:
The previous example will extract the header and body of the \emph{image/jpeg}
part.
+\subsection{Deleting messages} % ---------------------------------------------
+
+The following example will delete the second and the third message from the
+store.
+
+\begin{lstlisting}[caption={Deleting messages}]
+vmime::ref <vmime::net::folder> folder = store->getDefaultFolder();
+
+folder->deleteMessage(3);
+folder->deleteMessage(2);
+
+// This is equivalent
+std::vector <int> nums;
+nums.push_back(2);
+nums.push_back(3);
+folder->deleteMessages(nums);
+
+// This is also equivalent
+folder->deleteMessages(/* from */ 2, /* to */ 3);
+\end{lstlisting}
+
\subsection{Events} % --------------------------------------------------------
As a result of executing some operation (or from time to time, even if no