~ubuntu-branches/ubuntu/vivid/linphone/vivid

« back to all changes in this revision

Viewing changes to osipua/src/bodyhandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2006-11-15 10:34:50 UTC
  • mfrom: (1.2.1 upstream) (2.1.8 feisty)
  • Revision ID: james.westby@ubuntu.com-20061115103450-qgafwcks2lkhctlj
* New upstream release.
* Enable video support.
* Fix mismatched #endif in mscommon.h, closes: #398307.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 /*
2
 
  The osipua library is a library based on oSIP that implements CallLeg and User Agent
3
 
  level.
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.
10
 
 
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.
15
 
 
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
19
 
*/
20
 
 
21
 
#ifndef BODYHANDLERINFO_H
22
 
#define BODYHANDLERINFO_H
23
 
 
24
 
 
25
 
struct _BodyHandler
26
 
{
27
 
        struct _BodyHandlerClass *klass;
28
 
        struct _OsipUA *ua;
29
 
                
30
 
};
31
 
 
32
 
typedef struct _BodyHandler BodyHandler;
33
 
 
34
 
typedef struct _BodyContext * (*BodyContextNewFunc)(struct _BodyHandler *);
35
 
typedef void (*BodyHandlerFunc)(BodyHandler *);
36
 
struct _BodyHandlerClass
37
 
{
38
 
        char *mime_type;
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.*/
41
 
};
42
 
typedef struct _BodyHandlerClass BodyHandlerClass;
43
 
 
44
 
#define BODY_HANDLER(obj)               ((BodyHandler*)(obj))
45
 
#define BODY_HANDLER_CLASS(obj)         ((BodyHandlerClass*)(obj))
46
 
 
47
 
void body_handler_init(BodyHandler *info);
48
 
void body_handler_class_init(BodyHandlerClass *info);
49
 
/*
50
 
#define body_handler_ref(info)          (info)->ref_count++;
51
 
#define body_handler_unref(info)                (info)->ref_count--;
52
 
 */
53
 
//typedef struct _OsipUA OsipUA;
54
 
//typedef struct _OsipCallLeg OsipCallLeg;
55
 
 
56
 
struct _BodyContext *body_handler_create_context(BodyHandler *info, OsipDialog *call);
57
 
 
58
 
void body_handler_init_with_ua(BodyHandler *info, OsipUA *ua);  
59
 
 
60
 
#define body_handler_get_mime(info)     ((info)->klass->mime_type)
61
 
 
62
 
#define body_handler_get_ua(bh)         ((bh)->ua)
63
 
 
64
 
#endif
65
 
 
66
 
 
67
 
 
68
 
 
69
 
 
70
 
 
71
 
 
72
 
 
73
 
 
74