summaryrefslogtreecommitdiffstats
path: root/mutt_idna.h
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2003-03-03 14:01:06 +0000
committerThomas Roessler <roessler@does-not-exist.org>2003-03-03 14:01:06 +0000
commitd044f05207a3eea8124b2029c4b04826b9f14003 (patch)
tree096b05db63f07f52223c1215e6531dce5a9e20e8 /mutt_idna.h
parente8b857a970452e6301b3e937002b623f2684334e (diff)
IDN support for e-mail messages. Things should work automagically
once you have the GNU IDN library available from ftp://alpha.gnu.org/pub/gnu/libidn/ installed. For IDN's which can't be losslessly recoded to your local character set, mutt should automatically fall back to using the ASCII representation. There's probably a considerable number of bugs in this, and the code may, at this point, not even compile on machines without libidn. Will start working on that ASAP.
Diffstat (limited to 'mutt_idna.h')
-rw-r--r--mutt_idna.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/mutt_idna.h b/mutt_idna.h
new file mode 100644
index 00000000..270c4209
--- /dev/null
+++ b/mutt_idna.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2003 Thomas Roessler <roessler@does-not-exist.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ */
+
+#ifndef _MUTT_IDNA_H
+# define _MUTT_IDNA_H
+
+#include "config.h"
+#include "rfc822.h"
+#include "charset.h"
+
+#ifdef HAVE_LIBIDN
+#include <idna.h>
+#endif
+
+#define MI_MAY_BE_IRREVERSIBLE (1 << 0)
+
+int mutt_idna_to_local (const char *, char **, int);
+int mutt_local_to_idna (const char *, char **);
+
+int mutt_addrlist_to_idna (ADDRESS *, char **);
+int mutt_addrlist_to_local (ADDRESS *);
+
+void mutt_env_to_local (ENVELOPE *);
+int mutt_env_to_idna (ENVELOPE *, char **, char **);
+
+const char *mutt_addr_for_display (ADDRESS *a);
+
+#endif