aboutsummaryrefslogtreecommitdiffhomepage
path: root/gmime-filter-headers.h
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2013-08-16 11:35:43 -0400
committerGravatar David Bremner <bremner@debian.org>2013-08-17 09:06:08 +0200
commitdc51bf0ad4ce84414e79d2f30752502f7c0d46c0 (patch)
tree49a37acb48dfbeb0d5aa22c3e9fcb520503b6af0 /gmime-filter-headers.h
parent6cdab6e0b77041791f70345ac729d63d865bae5e (diff)
reply: Use RFC 2822/MIME wholly for text format template
Previously, reply's default text format used an odd mix of RFC 2045 MIME encoding for the reply template's body and some made-up RFC 2822-like UTF-8 format for the headers. The intent was to present the headers to the user in a nice, un-encoded format, but this assumed that whatever ultimately sent the email would RFC 2047-encode the headers, while at the same time the body was already RFC 2045 encoded, so it assumed that whatever sent the email would *not* re-encode the body. This can be fixed by either producing a fully decoded UTF-8 reply template, or a fully encoded MIME-compliant RFC 2822 message. This patch does the latter because it is a) Well-defined by RFC 2822 and MIME (while any UTF-8 format would be ad hoc). b) Ready to be piped to sendmail. The point of the text format is to be minimal, so a user should be able to pop up the template in whatever editor they want, edit it, and push it to sendmail. c) Consistent with frontend capabilities. If a frontend has the smarts to RFC 2047 encode the headers before sending the mail, it probably has the smarts to RFC 2047 decode them before presenting the template to a user for editing. Also, as far as I know, nothing automated consumes the reply text format, so changing this should not cause serious problems. (And if anything does still consume this format, it probably gets these encoding issues wrong anyway.)
Diffstat (limited to 'gmime-filter-headers.h')
-rw-r--r--gmime-filter-headers.h69
1 files changed, 0 insertions, 69 deletions
diff --git a/gmime-filter-headers.h b/gmime-filter-headers.h
deleted file mode 100644
index 1d1a3ebb..00000000
--- a/gmime-filter-headers.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright © 2009 Keith Packard <keithp@keithp.com>
- * Copyright © 2010 Michal Sojka <sojkam1@fel.cvut.cz>
- *
- * 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 3 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-1307 USA.
- */
-
-#ifndef _GMIME_FILTER_HEADERS_H_
-#define _GMIME_FILTER_HEADERS_H_
-
-#include <gmime/gmime-filter.h>
-
-G_BEGIN_DECLS
-
-#define GMIME_TYPE_FILTER_HEADERS (g_mime_filter_headers_get_type ())
-#define GMIME_FILTER_HEADERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMIME_TYPE_FILTER_HEADERS, GMimeFilterHeaders))
-#define GMIME_FILTER_HEADERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMIME_TYPE_FILTER_HEADERS, GMimeFilterHeadersClass))
-#define GMIME_IS_FILTER_HEADERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMIME_TYPE_FILTER_HEADERS))
-#define GMIME_IS_FILTER_HEADERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMIME_TYPE_FILTER_HEADERS))
-#define GMIME_FILTER_HEADERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMIME_TYPE_FILTER_HEADERS, GMimeFilterHeadersClass))
-
-typedef struct _GMimeFilterHeaders GMimeFilterHeaders;
-typedef struct _GMimeFilterHeadersClass GMimeFilterHeadersClass;
-
-/**
- * GMimeFilterHeaders:
- * @parent_object: parent #GMimeFilter
- * @saw_nl: previous char was a \n
- * @line: temporary buffer for line unfolding
- * @line_size: size of currently allocated memory for @line
- * @lineptr: pointer to the first unused character in @line
- *
- * A filter to decode rfc2047 encoded headers
- **/
-struct _GMimeFilterHeaders {
- GMimeFilter parent_object;
-
- gboolean saw_nl;
- char *line;
- size_t line_size;
- char *lineptr;
-};
-
-struct _GMimeFilterHeadersClass {
- GMimeFilterClass parent_class;
-
-};
-
-
-GType g_mime_filter_headers_get_type (void);
-
-GMimeFilter *g_mime_filter_headers_new (void);
-
-G_END_DECLS
-
-
-#endif /* _GMIME_FILTER_HEADERS_H_ */