From 2949fb51f13e1236d5c161f02e1c2c8541100e9f Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 21 Oct 2004 15:05:47 +0000 Subject: Refactoring (see ChangeLog). --- examples/example5.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'examples/example5.cpp') diff --git a/examples/example5.cpp b/examples/example5.cpp index a36d8c09..e5a7c93b 100644 --- a/examples/example5.cpp +++ b/examples/example5.cpp @@ -45,12 +45,13 @@ int main() vmime::messageParser mp("<...MIME message content...>"); // Enumerate attachments - for (std::vector ::const_iterator i = mp.attachments().begin() ; - i != mp.attachments().end() ; ++i) + for (int i = 0 ; i < mp.getAttachmentCount() ; ++i) { - // Media type (content type) is in "(*i).type()" - // Description is in "(*i).description()" - // Data is in "(*i).data()" + const vmime::attachment& att = *mp.getAttachmentAt(i); + + // Media type (content type) is in "att.getType()" + // Description is in "att.getDescription()" + // Data is in "att.getData()" } } // VMime exception -- cgit v1.2.3