parse_methods.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) 2004 Juha Heinanen
  3. *
  4. * This file is part of ser, a free SIP server.
  5. *
  6. * ser is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version
  10. *
  11. * For a license to use the ser software under conditions
  12. * other than those described here, or to purchase support for this
  13. * software, please contact iptel.org by e-mail at the following addresses:
  14. * [email protected]
  15. *
  16. * ser is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  24. */
  25. /*! \file
  26. * \brief Parser :: Parse Methods
  27. *
  28. * \ingroup parser
  29. */
  30. #ifndef PARSE_METHODS_H
  31. #define PARSE_METHODS_H
  32. #include "../str.h"
  33. #include "msg_parser.h"
  34. #define ALL_METHODS 0xffffffff
  35. /*
  36. * Parse comma separated list of methods pointed by _body and assign their
  37. * enum bits to _methods. Returns 1 on success and 0 on failure.
  38. */
  39. int parse_methods(const str* const _body, unsigned int* const _methods);
  40. int parse_method_name(const str* const s, enum request_method* const method);
  41. #endif /* PARSE_METHODS_H */