Debian Codegraph @

Xpjproject/pjsip/include/pjsip-simple/evsub_msg.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <[email protected]>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 #ifndef __PJSIP_SIMPLE_EVENT_NOTIFY_MSG_H__
20 #define __PJSIP_SIMPLE_EVENT_NOTIFY_MSG_H__
21
22 /**
23 * @file evsub_msg.h
24 * @brief SIP Event Notification Headers (RFC 3265)
25 */
26 #include <pjsip/sip_msg.h>
27
28 /**
29 * @defgroup PJSIP_EVENT_HDRS Additional Header Fields
30 * @ingroup PJSIP_EVENT_NOT
31 * @{
32 */
33
34 PJ_BEGIN_DECL
35
36
37 /** Max events in Allow-Events header. */
38 #define PJSIP_MAX_ALLOW_EVENTS 16
39
40 /**
41 * This structure describes Event header.
42 */
43 typedef struct pjsip_event_hdr
44 {
45 /** Standard header fields. */
46 PJSIP_DECL_HDR_MEMBER(struct pjsip_event_hdr);
47
48 pj_str_t event_type; /**< Event name. */
49 pj_str_t id_param; /**< Optional event ID parameter. */
50 pjsip_param other_param; /**< Other parameter. */
51 } pjsip_event_hdr;
52
53 /**
54 * Create an Event header.
55 *
56 * @param pool The pool.
57 *
58 * @return New Event header instance.
59 */
60 PJ_DECL(pjsip_event_hdr*) pjsip_event_hdr_create(pj_pool_t *pool);
61
62
63 /**
64 * This structure describes Allow-Events header.
65 */
66 typedef pjsip_generic_array_hdr pjsip_allow_events_hdr;
67
68
69 /**
70 * Create a new Allow-Events header.
71 *
72 * @param pool The pool.
73 *
74 * @return Allow-Events header.
75 */
76 PJ_DECL(pjsip_allow_events_hdr*)
77 pjsip_allow_events_hdr_create(pj_pool_t *pool);
78
79
80 /**
81 * This structure describes Subscription-State header.
82 */
83 typedef struct pjsip_sub_state_hdr
84 {
85 /** Standard header fields. */
86 PJSIP_DECL_HDR_MEMBER(struct pjsip_sub_state_hdr);
87
88 pj_str_t sub_state; /**< Subscription state. */
89 pj_str_t reason_param; /**< Optional termination reason. */
90 unsigned expires_param; /**< Expires param, or
91 PJSIP_EXPIRES_NOT_SPECIFIED. */
92 int retry_after; /**< Retry after param, or -1. */
93 pjsip_param other_param; /**< Other parameters. */
94 } pjsip_sub_state_hdr;
95
96 /**
97 * Create new Subscription-State header.
98 *
99 * @param pool The pool.
100 *
101 * @return Subscription-State header.
102 */
103 PJ_DECL(pjsip_sub_state_hdr*) pjsip_sub_state_hdr_create(pj_pool_t *pool);
104
105 /**
106 * Initialize parser for event notify module.
107 */
108 PJ_DECL(pj_status_t) pjsip_evsub_init_parser(void);
109
110
111 PJ_END_DECL
112
113
114 /**
115 * @}
116 */
117
118 #endif /* __PJSIP_SIMPLE_EVENT_NOTIFY_MSG_H__ */
119