aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mailbox/main.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2004-10-21 15:05:47 +0000
committerVincent Richard <[email protected]>2004-10-21 15:05:47 +0000
commit2949fb51f13e1236d5c161f02e1c2c8541100e9f (patch)
tree991edcf50483116ce83977a4d9e652de8c5328dc /tests/mailbox/main.cpp
parentheader class unit tests added (diff)
downloadvmime-2949fb51f13e1236d5c161f02e1c2c8541100e9f.tar.gz
vmime-2949fb51f13e1236d5c161f02e1c2c8541100e9f.zip
Refactoring (see ChangeLog).
Diffstat (limited to 'tests/mailbox/main.cpp')
-rw-r--r--tests/mailbox/main.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/mailbox/main.cpp b/tests/mailbox/main.cpp
index 9f1de6ac..cd59d900 100644
--- a/tests/mailbox/main.cpp
+++ b/tests/mailbox/main.cpp
@@ -32,14 +32,14 @@ std::ostream& operator<<(std::ostream& os, const vmime::text& txt)
{
os << "[";
- for (int i = 0 ; i < txt.size() ; ++i)
+ for (int i = 0 ; i < txt.getWordCount() ; ++i)
{
- const vmime::word& w = txt[i];
+ const vmime::word& w = *txt.getWordAt(i);
if (i != 0)
os << ",";
- os << "[" << w.charset().name() << "," << w.buffer() << "]";
+ os << "[" << w.getCharset().getName() << "," << w.getBuffer() << "]";
}
os << "]";
@@ -50,7 +50,7 @@ std::ostream& operator<<(std::ostream& os, const vmime::text& txt)
std::ostream& operator<<(std::ostream& os, const vmime::mailbox& mbox)
{
- std::cout << "MAILBOX[name=" << mbox.name() << ",email=" << mbox.email() << "]" << std::endl;
+ std::cout << "MAILBOX[name=" << mbox.getName() << ",email=" << mbox.getEmail() << "]" << std::endl;
return (os);
}
@@ -58,11 +58,11 @@ std::ostream& operator<<(std::ostream& os, const vmime::mailbox& mbox)
std::ostream& operator<<(std::ostream& os, const vmime::mailboxGroup& group)
{
- std::cout << "GROUP[name=" << group.name() << "]" << std::endl;
+ std::cout << "GROUP[name=" << group.getName() << "]" << std::endl;
- for (int i = 0 ; i < group.size() ; ++i)
+ for (int i = 0 ; i < group.getMailboxCount() ; ++i)
{
- std::cout << "* " << group[i];
+ std::cout << "* " << *group.getMailboxAt(i);
}
return (os);
@@ -97,9 +97,9 @@ int main(int argc, char* argv[])
vmime::addressList list;
list.parse(data.str());
- for (int i = 0 ; i < list.size() ; ++i)
+ for (int i = 0 ; i < list.getAddressCount() ; ++i)
{
- const vmime::address& addr = list[i];
+ const vmime::address& addr = *list.getAddressAt(i);
if (addr.isGroup())
{