event_parser.xml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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="event_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>Event Body Parser</title>
  14. <para>
  15. Purpose of this parser is to parse body of an Event Header field. The
  16. parser can be found in file <filename>parse_event.c</filename> under
  17. <filename>parser</filename> subdirectory.
  18. </para>
  19. <note>
  20. <para>
  21. This is <emphasis>NOT</emphasis> fully featured Event body parser !
  22. The parser was written for Presence Agent module only and thus can
  23. recognize Presence package only. No subpackages will be
  24. recognized. All other packages will be marked as "OTHER".
  25. </para>
  26. <para>
  27. The parser should be replace by a more generic parser if
  28. subpackages or parameters should be parsed too.
  29. </para>
  30. </note>
  31. <para>
  32. Main function is <function>parse_event</function> in file
  33. <filename>parse_event.c</filename>. The function will create an
  34. instance of <structname>event_t</structname> structure and call the
  35. parser. If everything went OK, pointer to the newly created structure
  36. will be stored in <structfield>parsed</structfield> field of
  37. <structname>hdr_field</structname> structure representing the parsed
  38. header field.
  39. </para>
  40. <para>
  41. As usually, the newly created structure will be freed when the whole
  42. message is being destroyed. See function
  43. <function>clean_hdr_field</function> in file <filename>hf.c</filename>.
  44. </para>
  45. <para>
  46. The parser will be not called automatically when the main parser finds
  47. an Event header field. It is up to you to call the parser when you
  48. really need the body of the header field to be parsed (call
  49. <function>parse_event</function> function).
  50. </para>
  51. <xi:include href="event_t.xml"/>
  52. </section>