From 706c270073daeb2b303ab34b7c5c9862da62b1ae Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 21 Dec 2004 09:04:19 +0000 Subject: Fixed ',2' in filename/flags + fixed file renaming when moving from 'new' to 'cur' + new functions random::getString() and maildirUtils::generateId(). --- src/utility/random.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/utility/random.hpp') diff --git a/src/utility/random.hpp b/src/utility/random.hpp index 70ae6716..442905a5 100644 --- a/src/utility/random.hpp +++ b/src/utility/random.hpp @@ -21,6 +21,9 @@ #define VMIME_UTILITY_RANDOM_HPP_INCLUDED +#include "types.hpp" + + namespace vmime { namespace utility { @@ -52,6 +55,15 @@ public: */ static const unsigned int getProcess(); + /** Return a random character string with the specified length. + * + * @param length length of the string to generate + * @param randomChars list of characters to use + * @return random string + */ + static const string getString(const int length, const string& randomChars + = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); + protected: static unsigned int m_next; -- cgit