]> sjero.net Git - linphone/blob - coreapi/sal_eXosip2.h
Merge branch 'master' into dev_sal
[linphone] / coreapi / sal_eXosip2.h
1 /*
2 linphone
3 Copyright (C) 2010  Simon MORLAT (simon.morlat@free.fr)
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (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
20 #ifndef sal_exosip2_h
21 #define sal_exosip2_h
22
23 #include "sal.h"
24 #include <eXosip2/eXosip.h>
25
26
27
28 sdp_message_t *media_description_to_sdp(const SalMediaDescription *sal);
29 int sdp_to_media_description(sdp_message_t *sdp, SalMediaDescription *desc);
30
31 struct Sal{
32         SalCallbacks callbacks;
33         MSList *registers;/*MSList of SalOp */
34         MSList *out_subscribes;/*MSList of SalOp */
35         MSList *in_subscribes;/*MSList of SalOp */
36         MSList *pending_auths;/*MSList of SalOp */
37         int running;
38         int session_expires;
39         void *up;
40 };
41
42 struct SalOp{
43         SalOpBase base;
44         int cid;
45         int did;
46         int tid;
47         int rid;
48         int sid;
49         int nid;
50         int expires;
51         SalMediaDescription *result;
52         sdp_message_t *sdp_answer;
53         eXosip_event_t *pending_auth;
54         bool_t supports_session_timers;
55         bool_t sdp_offering;
56         bool_t reinvite;
57 };
58
59 void sal_exosip_subscription_recv(Sal *sal, eXosip_event_t *ev);
60 void sal_exosip_subscription_answered(Sal *sal,eXosip_event_t *ev);
61 void sal_exosip_notify_recv(Sal *sal,eXosip_event_t *ev);
62 void sal_exosip_subscription_closed(Sal *sal,eXosip_event_t *ev);
63
64 void sal_exosip_fix_route(SalOp *op);
65
66
67 #endif