parse_require.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2006 Andreas Granig <[email protected]>
  5. *
  6. * This file is part of Kamailio, a free SIP server.
  7. *
  8. * Kamailio 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. * Kamailio 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. */
  23. /*!
  24. * \file
  25. * \brief Require parser
  26. * \ingroup parser
  27. */
  28. #ifndef PARSE_REQUIRE_H
  29. #define PARSE_REQUIRE_H
  30. #include "msg_parser.h"
  31. #include "hf.h"
  32. #include "../mem/mem.h"
  33. #include "parse_option_tags.h"
  34. #define get_require(p_msg) \
  35. ((p_msg)->require ? ((struct option_tag_body*)(p_msg)->require->parsed)->option_tags_all : 0)
  36. /*!
  37. * Parse all Require headers.
  38. */
  39. int parse_require( struct sip_msg *msg);
  40. void free_require(struct option_tag_body **rb);
  41. #endif /* PARSE_REQUIRE_H */