parse_subscription_state.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (C) 2006 Vaclav Kubart, vaclav dot kubart at iptel dot org
  3. *
  4. * This file is part of SIP-router, a free SIP server.
  5. *
  6. * SIP-router 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. * SIP-router is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. /*! \file
  21. * \brief Parser :: Parse subscription-state in NOTIFY
  22. *
  23. * \ingroup parser
  24. */
  25. #ifndef __PARSE_SUBSCRIPTION_STATE_H
  26. #define __PARSE_SUBSCRIPTION_STATE_H
  27. #include "hf.h"
  28. typedef enum {
  29. ss_active,
  30. ss_pending,
  31. ss_terminated,
  32. ss_extension
  33. } substate_value_t;
  34. typedef struct _subscription_state_t {
  35. substate_value_t value;
  36. unsigned int expires;
  37. int expires_set; /* expires is valid if nonzero here */
  38. } subscription_state_t;
  39. int parse_subscription_state(struct hdr_field *h);
  40. void free_subscription_state(subscription_state_t **ss);
  41. #endif