Update example to test STATUS command.
This commit is contained in:
parent
394224e7ab
commit
30d22deaf5
@ -559,6 +559,7 @@ static void connectStore()
|
|||||||
choices.push_back("Show message header");
|
choices.push_back("Show message header");
|
||||||
choices.push_back("Show message envelope");
|
choices.push_back("Show message envelope");
|
||||||
choices.push_back("Extract whole message");
|
choices.push_back("Extract whole message");
|
||||||
|
choices.push_back("Status");
|
||||||
choices.push_back("List folders");
|
choices.push_back("List folders");
|
||||||
choices.push_back("Change folder");
|
choices.push_back("Change folder");
|
||||||
choices.push_back("Return to main menu");
|
choices.push_back("Return to main menu");
|
||||||
@ -664,8 +665,17 @@ static void connectStore()
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// List folders
|
// Status
|
||||||
case 6:
|
case 6:
|
||||||
|
{
|
||||||
|
int count, unseen;
|
||||||
|
f->status(count, unseen);
|
||||||
|
|
||||||
|
std::cout << "Status: count=" << count << ", unseen=" << unseen << std::endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// List folders
|
||||||
|
case 7:
|
||||||
{
|
{
|
||||||
vmime::ref <vmime::net::folder>
|
vmime::ref <vmime::net::folder>
|
||||||
root = st->getRootFolder();
|
root = st->getRootFolder();
|
||||||
@ -674,7 +684,7 @@ static void connectStore()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Change folder
|
// Change folder
|
||||||
case 7:
|
case 8:
|
||||||
{
|
{
|
||||||
std::cout << "Enter folder path (eg. /root/subfolder):" << std::endl;
|
std::cout << "Enter folder path (eg. /root/subfolder):" << std::endl;
|
||||||
std::cout.flush();
|
std::cout.flush();
|
||||||
@ -712,7 +722,7 @@ static void connectStore()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Main menu
|
// Main menu
|
||||||
case 8:
|
case 9:
|
||||||
|
|
||||||
f->close(true); // 'true' to expunge deleted messages
|
f->close(true); // 'true' to expunge deleted messages
|
||||||
cont = false;
|
cont = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user