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
21
#ifndef BODYHANDLERINFO_H
22
#define BODYHANDLERINFO_H
27
struct _BodyHandlerClass *klass;
32
typedef struct _BodyHandler BodyHandler;
34
typedef struct _BodyContext * (*BodyContextNewFunc)(struct _BodyHandler *);
35
typedef void (*BodyHandlerFunc)(BodyHandler *);
36
struct _BodyHandlerClass
39
BodyContextNewFunc _body_context_new; /* the constructor of the bodyhandler managed by the BodyHandler*/
40
BodyHandlerFunc _init; /* called when the body handler info is placed on the ua list of infos.*/
42
typedef struct _BodyHandlerClass BodyHandlerClass;
44
#define BODY_HANDLER(obj) ((BodyHandler*)(obj))
45
#define BODY_HANDLER_CLASS(obj) ((BodyHandlerClass*)(obj))
47
void body_handler_init(BodyHandler *info);
48
void body_handler_class_init(BodyHandlerClass *info);
50
#define body_handler_ref(info) (info)->ref_count++;
51
#define body_handler_unref(info) (info)->ref_count--;
53
//typedef struct _OsipUA OsipUA;
54
//typedef struct _OsipCallLeg OsipCallLeg;
56
struct _BodyContext *body_handler_create_context(BodyHandler *info, OsipDialog *call);
58
void body_handler_init_with_ua(BodyHandler *info, OsipUA *ua);
60
#define body_handler_get_mime(info) ((info)->klass->mime_type)
62
#define body_handler_get_ua(bh) ((bh)->ua)