nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] mime-aware filtering?

2012-06-25 22:03:04
m_getfld() is the heart of MH.

Truer words have never been spoken; it's used by so much (including the
profile parser).

so when i say "let's talk about what m_getfld should look like" i really
mean "let's talk about what MH's storage and access model should be."

int
m_getfld (int state, unsigned char *name, unsigned char *buf,
         int bufsz, FILE *iob)

Okay ... just shooting from the hip, and based on our discussion back in
January ... here's something (I'm ignoring how this would be implemented
for now, and I'm not defining any of the structures).  I hope these
functions would be obvious in operation.

int nmh_openmsg(struct message, messagehandle *, char **error);

int nmh_getheader(messagehandle, const char *, char **header, int *numheaders,
                  char **error);

int nmh_getmime(messagehandle, mimehandle_ret *, char **error);

int nmh_openmime(mimehandle, char **type, char **subtype,
                 int *nested, mimehandle_ret *, char **error);

int nmh_nextmime(mimehandle, char **type, char **subtype, int *iterator,
                 char **error);

int nmh_closemime(mimehandle);

int nmh_closemsg(message);

I'm sure there are problems with this, just wanted to get the ball rolling.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>