library/src/network/email/BP-Email.cc
/** Print the MIME structure of a message on the standard output.
  *
  * @param s structure object
  * @param level current depth
  */
Print the MIME structure of a message on the standard output.
@param s structure object
@param level current depth
Print the MIME structure of a message on the standard output . @param s structure object @param level current depth
static void printStructure(vmime::ref <const vmime::net::structure> s, const int level = 0)
{
	for (int i = 0 ; i < s->getPartCount() ; ++i)
	{
		vmime::ref <const vmime::net::part> part = s->getPartAt(i);
		for (int j = 0 ; j < level * 2 ; ++j)
			std::cout << " ";
		std::cout << (part->getNumber() + 1) << ". "
				<< part->getType().generate()
				<< " [" << part->getSize() << " byte(s)]"
				<< std::endl;
		printStructure(part->getStructure(), level + 1);
	}
}
static void printStructure ( vmime :: ref < const vmime :: net :: structure > s , const int level = 0 ) { for ( int i = 0 ; i < s -> getPartCount ( ) ; ++ i ) { vmime :: ref < const vmime :: net :: part > part = s -> getPartAt ( i ) ; for ( int j = 0 ; j < level * 2 ; ++ j ) std :: cout << " " ; std :: cout << ( part -> getNumber ( ) + 1 ) << " " << part -> getType ( ) . generate ( ) << " " << part -> getSize ( ) << " " << std :: endl ; printStructure ( part -> getStructure ( ) , level + 1 ) ; } }
Print the MIME structure of a message on the standard output.
Print the MIME structure of a message on the standard output .