1 /**
2  * Copyright (C) 2012 Daniel-Constantin Mierla (asipto.com)
3  *
4  * This file is part of Kamailio, a free SIP server.
5  *
6  * This file 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  *
12  * This file is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20  *
21  */
22 
23 #ifndef _MSRP_ENV_H_
24 #define _MSRP_ENV_H_
25 
26 #include "../../core/parser/msg_parser.h"
27 #include "msrp_parser.h"
28 
29 #define MSRP_ENV_SRCINFO	(1<<0)
30 #define MSRP_ENV_DSTINFO	(1<<1)
31 
32 typedef struct msrp_env {
33 	msrp_frame_t *msrp;
34 	struct dest_info srcinfo;
35 	struct dest_info dstinfo;
36 	int envflags;
37 	int sndflags;
38 	int rplflags;
39 } msrp_env_t;
40 
41 msrp_env_t *msrp_get_env(void);
42 void msrp_reset_env(void);
43 msrp_frame_t *msrp_get_current_frame(void);
44 int msrp_set_current_frame(msrp_frame_t *mf);
45 sip_msg_t *msrp_fake_sipmsg(msrp_frame_t *mf);
46 
47 int msrp_env_set_dstinfo(msrp_frame_t *mf, str *addr, str *fsock, int flags);
48 int msrp_env_set_sndflags(msrp_frame_t *mf, int flags);
49 int msrp_env_set_rplflags(msrp_frame_t *mf, int flags);
50 
51 #endif
52