parse_expires.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * $Id$
  3. *
  4. * Expires header field body parser
  5. *
  6. * Copyright (C) 2001-2003 FhG Fokus
  7. *
  8. * This file is part of ser, a free SIP server.
  9. *
  10. * ser is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version
  14. *
  15. * ser is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. */
  24. /*! \file
  25. * \brief Parser :: Expires header field body parser
  26. *
  27. * \ingroup parser
  28. */
  29. #ifndef PARSE_EXPIRES_H
  30. #define PARSE_EXPIRES_H
  31. #include "../str.h"
  32. #include "hf.h"
  33. typedef struct exp_body {
  34. str text; /*!< Original text representation */
  35. unsigned char valid; /*!< Was parsing successful ? */
  36. unsigned int val; /*!< Parsed value */
  37. } exp_body_t;
  38. /*! \brief
  39. * Parse expires header field body
  40. */
  41. int parse_expires(struct hdr_field* _h);
  42. /*! \brief
  43. * Free all memory associated with exp_body_t
  44. */
  45. void free_expires(exp_body_t** _e);
  46. /*! \brief
  47. * Print exp_body_t content, for debugging only
  48. */
  49. void print_expires(exp_body_t* _e);
  50. #endif /* PARSE_EXPIRES_H */