sal_eXosip2.h 1.71 KB
Newer Older
Simon Morlat's avatar
Simon Morlat committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
/*
linphone
Copyright (C) 2010  Simon MORLAT (simon.morlat@free.fr)

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

#ifndef sal_exosip2_h
#define sal_exosip2_h

#include "sal.h"
#include <eXosip2/eXosip.h>



sdp_message_t *media_description_to_sdp(const SalMediaDescription *sal);
int sdp_to_media_description(sdp_message_t *sdp, SalMediaDescription *desc);

struct Sal{
	SalCallbacks callbacks;
	MSList *registers;/*MSList of SalOp */
	MSList *out_subscribes;/*MSList of SalOp */
	MSList *in_subscribes;/*MSList of SalOp */
	int running;
	int session_expires;
Simon Morlat's avatar
Simon Morlat committed
38
	void *up;
Simon Morlat's avatar
Simon Morlat committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
};

struct SalOp{
	SalOpBase base;
	int cid;
	int did;
	int tid;
	int rid;
	int sid;
	int nid;
	int expires;
	SalMediaDescription *result;
	sdp_message_t *sdp_answer;
	eXosip_event_t *pending_auth;
	bool_t supports_session_timers;
	bool_t sdp_offering;
	bool_t reinvite;
};

void sal_exosip_subscription_recv(Sal *sal, eXosip_event_t *ev);
void sal_exosip_subscription_answered(Sal *sal,eXosip_event_t *ev);
void sal_exosip_notify_recv(Sal *sal,eXosip_event_t *ev);
void sal_exosip_subscription_closed(Sal *sal,eXosip_event_t *ev);


#endif