1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
/* $Id: misc.H,v 1.2 2004/06/14 00:18:42 mrsam Exp $
**
** Copyright 2003-2004, Double Precision Inc.
**
** See COPYING for distribution information.
*/
#ifndef libmail_misc_H
#define libmail_misc_H
#include "libmail_config.h"
#include "namespace.H"
#include <string>
struct unicode_info;
LIBMAIL_START
class loginInfo;
std::string toutf8(std::string);
std::string fromutf8(std::string);
std::string hostname();
// Return this machine's name
extern const struct unicode_info *appcharset;
enum readMode {readHeadersFolded, readContents, readBoth, readHeaders};
bool setAppCharset(const char *charsetName);
//
// The application character set. Folder names are automatically
// translated to the specified character set. Should be initialized
// by the application at startup. Defaults to iso-8859-1 mapping.
void upper(std::string &w);
//
// Convert the string to uppercase characters using the ISO-8859-1
// character set
std::string homedir();
//
// The home directory of the userid running this application.
std::string loginUrlEncode(std::string method,
std::string server, std::string uid,
std::string password);
// Create a new mail account URL.
// method - the support method (imap, pop3Account, etc...)
// server - the name of the mail account's server
// uid - mail account ID
// pwd - mail account password
bool loginUrlDecode(std::string url, class loginInfo &info);
// Decode a mail account URL
//
// url - the URL.
//
// info - login information
LIBMAIL_END
#endif
|