from_parser.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  4. <section id="from_parser" xmlns:xi="http://www.w3.org/2001/XInclude">
  5. <sectioninfo>
  6. <revhistory>
  7. <revision>
  8. <revnumber>$Revision$</revnumber>
  9. <date>$Date$</date>
  10. </revision>
  11. </revhistory>
  12. </sectioninfo>
  13. <title>From Header Field Parser</title>
  14. <para>
  15. This parser is only a wrapper to the To header field parser. Since
  16. bodies of both header fields are identical, From parser only calls To
  17. parser.
  18. </para>
  19. <para>
  20. The wrapper can be found in file <filename>parse_from.c</filename>
  21. under <filename>parser</filename> subdirectory. There is only one
  22. function called <function>parse_from_header</function>. The function
  23. accepts one parameter which is pointer to structure representing the
  24. From header field to be parsed. The function creates an instance of
  25. <structname>to_body</structname> structure and initializes it. It then
  26. calls <function>parse_to</function> function and if everything went OK,
  27. the pointer to the newly created structure will be put in
  28. <structfield>parsed</structfield> field of the structure representing
  29. the parsed header field.
  30. </para>
  31. <para>
  32. The newly created structure will be freed when the whole message is
  33. being destroyed. (See To header field parser description for more
  34. details).
  35. </para>
  36. <para>
  37. From parser <emphasis>must be called explicitly</emphasis> !
  38. </para>
  39. <para>
  40. If the main parser finds a From header field, it will not parse the
  41. header field body automatically. It is up to you to call the
  42. <function>parse_from_header</function> when you want to parse a From
  43. header field body.
  44. </para>
  45. </section>