2
The osipua library is a library based on oSIP that implements CallLeg and User Agent
4
Copyright (C) 2001 Simon MORLAT simon.morlat@free.fr
5
Aymeric MOIZARD jack@atosc.org
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
11
This library 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 GNU
14
Lesser General Public License for more details.
16
You should have received a copy of the GNU Lesser General Public
17
License along with this library; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
#error "Do not include this file directly. Use osipua.h instead."
32
struct _BodyContextClass *klass;
33
struct _BodyHandler *handler; /* the handler of the context */
34
struct _OsipDialog *dialog; /* the dialog the handler must deal with */
38
typedef struct _BodyContext BodyContext;
41
typedef void (*BodyContextDestroyFunc)(BodyContext*);
42
typedef int (*BodyContextNotifyMessageFunc)(BodyContext*,sip_t *,char *body);
43
typedef int (*BodyContextAddBodyFunc)(BodyContext*,sip_t *);
45
struct _BodyContextClass
47
BodyContextDestroyFunc _destroy;
48
BodyContextNotifyMessageFunc _notify_inc_request;
49
BodyContextNotifyMessageFunc _notify_inc_response;
50
BodyContextAddBodyFunc _gen_out_request;
51
BodyContextAddBodyFunc _gen_out_response;
54
typedef struct _BodyContextClass BodyContextClass;
56
#define BODY_CONTEXT(b) ((BodyContext*)(b))
57
#define BODY_CONTEXT_CLASS(klass) ((BodyContextClass*)(klass))
59
void body_context_init(BodyContext *obj, BodyHandler *info);
61
#define body_context_class_init(k)
63
#define body_context_get_mime(context) ((context)->handler->klass->mime_type)
65
#define body_context_notify_inc_request(context, msg, body) \
66
(context)->klass->_notify_inc_request((context),(msg), (body))
68
#define body_context_notify_inc_response(context, msg, body) \
69
(context)->klass->_notify_inc_response((context),(msg),(body))
71
#define body_context_gen_out_request(context, msg) \
72
(context)->klass->_gen_out_request((context),(msg))
74
#define body_context_gen_out_response(context, msg) \
75
(context)->klass->_gen_out_response((context),(msg))
78
#define body_context_get_dialog(context) ((context)->call)
80
#define body_context_get_handler(context) ((context)->handler)