aboutsummaryrefslogtreecommitdiffstats
path: root/examples/example5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example5.cpp')
-rw-r--r--examples/example5.cpp11
1 files changed, 6 insertions, 5 deletions
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 <vmime::attachment*>::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