parse_subscription_state.h 561 B

1234567891011121314151617181920212223242526272829
  1. /*! \file
  2. * \brief Parser :: Parse subscription-state in NOTIFY
  3. *
  4. * \ingroup parser
  5. */
  6. #ifndef __PARSE_SUBSCRIPTION_STATE_H
  7. #define __PARSE_SUBSCRIPTION_STATE_H
  8. #include "hf.h"
  9. typedef enum {
  10. ss_active,
  11. ss_pending,
  12. ss_terminated,
  13. ss_extension
  14. } substate_value_t;
  15. typedef struct _subscription_state_t {
  16. substate_value_t value;
  17. unsigned int expires;
  18. int expires_set; /* expires is valid if nonzero here */
  19. } subscription_state_t;
  20. int parse_subscription_state(struct hdr_field *h);
  21. void free_subscription_state(subscription_state_t **ss);
  22. #endif