parse_expires.h 1.5 KB

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