[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-mailutils] mailcap rfc1524
From: |
Alain Magloire |
Subject: |
[bug-mailutils] mailcap rfc1524 |
Date: |
Sat, 8 Feb 2003 17:30:31 -0500 (EST) |
Bonjour
I do not know much about mailcap files, this is a proposition
base on the reading of the rfc. I'll try to implement later
on, been so long that I do not remember all the oops of the mailbox
library, so maybe there are more elegant ways to do this.
-------------- mailutils/mailcap.h-----------------
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Mailutils 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 Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef _MAILUTILS_MAILCAP_H
#define _MAILUTILS_MAILCAP_H
/* See RFC1524 (A User Agent Configuration Mechanism). */
/* Create a mailcap from filename. */
int mu_mailcap_create_file (mu_mailcap_t * mailcap, const char *filename);
/* Create a mailcap from buffer. */
int mu_mailcap_create_buffer (mu_mailcap_t * mailcap, const char *buffer,
size_t buflen);
/* Return in entries, all the mailcap records of mailcap file, *pcound holds
the number. */
int mu_mailcap_get_entries (mu_mailcap_t mailcap, mu_mailcap_entry_t *entries,
size_t *pcount);
/* Save in buffer[buflen] the content-type of the record. */
int mu_mailcap_entry_get_typefield (mu_mailcap_entry_t entry, char *buffer,
size_t buflen, size_t *pn);
/* Save in buffer[buflen] the view command of the record. */
int mu_mailcap_entry_get_viewcommand (mu_mailcap_entry_t entry, char *buffer,
size_t buflen, size_t *pn);
/* Return in const char *fields[*pn] all the fields f the record . */
int mu_mailcap_entry_get_fields (mu_mailcap_entry_t entry, const char**fields,
size_t *pn);
/* Helper function saving in buffer, the argument of "compose" field. */
int mu_mailcap_entry_get_compose (mu_mailcap_entry_t entry, char *buffer,
size_t buflen, size_t *pn);
/* Helper function saving in buffer, the argument of "composetyped" field. */
int mu_mailcap_entry_get_composetyped (mu_mailcap_entry_t entry, char *buffer,
size_t buflen, size_t *pn);
/* Helper function saving in buffer, the argument of "edit" field. */
int mu_mailcap_entry_get_edit (mu_mailcap_entry_t entry, char *buffer, size_t
buflen, size_t *pn);
/* Helper function saving in buffer, the argument of "textualnewlines" field.
*/
int mu_mailcap_entry_get_textualnewlines (mu_mailcap_entry_t entry, char
*buffer, size_t buflen, size_t *pn);
/* Helper function saving in buffer, the argument of "test" field. */
int mu_mailcap_entry_get_test (mu_mailcap_entry_t entry, char *buffer, size_t
buflen, size_t *pn);
/* Helper function saving in buffer, the argument of "x11-bitmap" field. */
int mu_mailcap_entry_get_x11bitmap (mu_mailcap_entry_t entry, char *buffer,
size_t buflen, size_t *pn);
/* Helper function saving in buffer, the argument of "description" field. */
int mu_mailcap_entry_get_description (mu_mailcap_entry_t entry, char *buffer,
size_t buflen, size_t *pn);
/* Helper function saving in buffer, the argument of "nametemplate" field. */
int mu_mailcap_entry_get_nametemplate (mu_mailcap_entry_t entry, char *buffer,
size_t buflen, size_t *pn);
/* Helper function saving in buffer, the argument of "notes" field. */
int mu_mailcap_entry_get_notes (mu_mailcap_entry_t entry, char *buffer, size_t
buflen, size_t *pn);
/* Helper function return *on != 0 if the flag "needsterminal" is in the
record. */
int mu_mailcap_entry_needsterminal (mu_mailcap_entry_t entry, int *on);
/* Helper function return *on != 0 if the flag "copiousoutput" is in the
record. */
int mu_mailcap_entry_copiousoutput (mu_mailcap_entry_t entry, int *on);
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-mailutils] mailcap rfc1524,
Alain Magloire <=