osip.h   osip.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 42 skipping to change at line 42
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#include <osipparser2/osip_parser.h> #include <osipparser2/osip_parser.h>
#include <osip2/osip_fifo.h> #include <osip2/osip_fifo.h>
/** /**
* @file osip.h * @file osip.h
* @brief oSIP fsm Routines * @brief oSIP fsm Routines
* *
* <H2>Introduction.</H2>
* fsm stands for 'finite state machine'. The possible STATE of the state
* machines are defined in the enum state. In oSIP, you can actually find
* 4 different state machines. Those state machines definitions are directl
y
* related to the definitions of transactions from the SIP specifications.
* (See section: 17.1.1, 17.1.2, 17.2.1, 17.2.2). In the 4 drawings show
n
* in those sections, you'll find the possible STATES and the possible EVEN
TS
* (osip_event_t) that can occur. EVENTS can be either TIMEOUT events and
* SIP message (incoming and outgoing) events.
* <H2>Why 4 finite state machines.</H2>
* <BR>SIP has two different kind of transaction: INVITE and NON-INVITE one
s.
* Also, a SIP User Agent can act as a server and as a client. This simply
* leads to 4 transactions state machines.
* <BR>
* <H2>Step 1: oSIP initialisation</H2>
* <BR>To use oSIP, a program MUST first initialise internal elements in th
e
* stack. The initialisation is shown below:
* <pre><code>
* osip_t *osip;
* // allocate a global osip element.
* if (0!=osip_init(&osip))
* return -1;
*
* // the next step is the initialisation of the callbacks used by the
* // oSIP stack to announce events (when a transition occurs in the fsm)
*
* // This callback is somewhat special and is used by oSIP to inform
* // the application that a message has to be sent. The message is
* // sent by your application! oSIP has no ways to send it alone.
* // Also, the method you supply will be called with default values where
* // you should send the SIP message. You are not mandated to send the
* // SIP message by using those default values.
* // the callback MUST return 0 on success, 1 on ECONNREFUSED, -1 on error
.
* osip_set_cb_send_message(osip, &application_cb_snd_message);
*
* // here is the long list of callback that you can register. Some
* // of this callbacks are very useless (announcing a retransmission,
* // or announcing that you have sent a SIP message which you may already
* // know...).
*
* // those callbacks are mandatory. They are called when oSIP has decided
* // that this transaction MUST no longer be handled by oSIP. (This is
* // called in both successful or error cases scenario)
osip_set_kill_transaction_callback(osip ,OSIP_ICT_KILL_TRANSACTION,
&cb_ict_kill_transaction);
osip_set_kill_transaction_callback(osip ,OSIP_NIST_KILL_TRANSACTION,
&cb_ist_kill_transaction);
osip_set_kill_transaction_callback(osip ,OSIP_NICT_KILL_TRANSACTION,
&cb_nict_kill_transaction);
osip_set_kill_transaction_callback(osip ,OSIP_NIST_KILL_TRANSACTION,
&cb_nist_kill_transaction);
*
* // those callbacks are optional. The purpose is to announce retransmissi
ons
* // of SIP message decided by the oSIP stack. (They can be used for stati
stics?)
osip_set_message_callback(osip ,OSIP_ICT_STATUS_2XX_RECEIVED_AGAIN,
&cb_rcvresp_retransmission);
osip_set_message_callback(osip ,OSIP_ICT_STATUS_3456XX_RECEIVED_AGAIN,
&cb_rcvresp_retransmission);
osip_set_message_callback(osip ,OSIP_ICT_INVITE_SENT_AGAIN,
&cb_sndreq_retransmission);
osip_set_message_callback(osip ,OSIP_IST_STATUS_2XX_SENT_AGAIN,
&cb_sndresp_retransmission);
osip_set_message_callback(osip ,OSIP_IST_STATUS_3456XX_SENT_AGAIN,
&cb_sndresp_retransmission);
osip_set_message_callback(osip ,OSIP_IST_INVITE_RECEIVED_AGAIN,
&cb_rcvreq_retransmission);
osip_set_message_callback(osip ,OSIP_NICT_STATUS_2XX_RECEIVED_AGAIN,
&cb_rcvresp_retransmission);
osip_set_message_callback(osip ,OSIP_NICT_STATUS_3456XX_RECEIVED_AGAIN,
&cb_rcvresp_retransmission);
osip_set_message_callback(osip ,OSIP_NICT_REQUEST_SENT_AGAIN,
&cb_sndreq_retransmission);
osip_set_message_callback(osip ,OSIP_NIST_STATUS_2XX_SENT_AGAIN,
&cb_sndresp_retransmission);
osip_set_message_callback(osip ,OSIP_NIST_STATUS_3456XX_SENT_AGAIN,
&cb_sndresp_retransmission);
osip_set_message_callback(osip ,OSIP_NIST_REQUEST_RECEIVED_AGAIN,
&cb_rcvreq_retransmission);
*
* // those callbacks are mandatory. They are used to announce network rela
ted
* // errors (the return code of the network callback if it was not 0)
osip_set_transport_error_callback(osip ,OSIP_ICT_TRANSPORT_ERROR,
&cb_transport_error);
osip_set_transport_error_callback(osip ,OSIP_IST_TRANSPORT_ERROR,
&cb_transport_error);
osip_set_transport_error_callback(osip ,OSIP_NICT_TRANSPORT_ERROR,
&cb_transport_error);
osip_set_transport_error_callback(osip ,OSIP_NIST_TRANSPORT_ERROR,
&cb_transport_error);
*
* // those callbacks are optional. They are used to announce the initial
* // request sent for a newly created transaction.
osip_set_message_callback(osip ,OSIP_ICT_INVITE_SENT, &cb_sndinvite);
osip_set_message_callback(osip ,OSIP_ICT_ACK_SENT, &cb_sndack);
osip_set_message_callback(osip ,OSIP_NICT_REGISTER_SENT, &cb_sndregister
);
osip_set_message_callback(osip ,OSIP_NICT_BYE_SENT, &cb_sndbye);
osip_set_message_callback(osip ,OSIP_NICT_CANCEL_SENT, &cb_sndcancel);
osip_set_message_callback(osip ,OSIP_NICT_INFO_SENT, &cb_sndinfo);
osip_set_message_callback(osip ,OSIP_NICT_OPTIONS_SENT, &cb_sndoptions)
;
osip_set_message_callback(osip ,OSIP_NICT_SUBSCRIBE_SENT, &cb_sndsubscrib
e);
osip_set_message_callback(osip ,OSIP_NICT_NOTIFY_SENT, &cb_sndnotify);
osip_set_message_callback(osip ,OSIP_NICT_UNKNOWN_REQUEST_SENT, &cb_sndun
krequest);
*
* // those callbacks are mandatory. They are used to announce the initial
* // response received for a transaction. (for SIP response between 100 an
d 199,
* // all responses are announced because this is not a retransmission case
)
osip_set_message_callback(osip ,OSIP_ICT_STATUS_1XX_RECEIVED, &cb_rcv1xx)
;
osip_set_message_callback(osip ,OSIP_ICT_STATUS_2XX_RECEIVED, &cb_rcv2xx)
;
osip_set_message_callback(osip ,OSIP_ICT_STATUS_3XX_RECEIVED, &cb_rcv3xx)
;
osip_set_message_callback(osip ,OSIP_ICT_STATUS_4XX_RECEIVED, &cb_rcv4xx)
;
osip_set_message_callback(osip ,OSIP_ICT_STATUS_5XX_RECEIVED, &cb_rcv5xx)
;
osip_set_message_callback(osip ,OSIP_ICT_STATUS_6XX_RECEIVED, &cb_rcv6xx)
;
*
* // those callbacks are optional. They are used to announce the initial
* // response sent for a transaction. (for SIP response between 100 and 19
9,
* // all responses are announced because this is not a retransmission case
)
osip_set_message_callback(osip ,OSIP_IST_STATUS_1XX_SENT, &cb_snd1xx);
osip_set_message_callback(osip ,OSIP_IST_STATUS_2XX_SENT, &cb_snd2xx);
osip_set_message_callback(osip ,OSIP_IST_STATUS_3XX_SENT, &cb_snd3xx);
osip_set_message_callback(osip ,OSIP_IST_STATUS_4XX_SENT, &cb_snd4xx);
osip_set_message_callback(osip ,OSIP_IST_STATUS_5XX_SENT, &cb_snd5xx);
osip_set_message_callback(osip ,OSIP_IST_STATUS_6XX_SENT, &cb_snd6xx);
*
* // those callbacks are mandatory. They are used to announce the initial
* // response received for a transaction. (for SIP response between 100 an
d 199,
* // all responses are announced because this is not a retransmission case
)
osip_set_message_callback(osip ,OSIP_NICT_STATUS_1XX_RECEIVED, &cb_rcv1xx
);
osip_set_message_callback(osip ,OSIP_NICT_STATUS_2XX_RECEIVED, &cb_rcv2xx
);
osip_set_message_callback(osip ,OSIP_NICT_STATUS_3XX_RECEIVED, &cb_rcv3xx
);
osip_set_message_callback(osip ,OSIP_NICT_STATUS_4XX_RECEIVED, &cb_rcv4xx
);
osip_set_message_callback(osip ,OSIP_NICT_STATUS_5XX_RECEIVED, &cb_rcv5xx
);
osip_set_message_callback(osip ,OSIP_NICT_STATUS_6XX_RECEIVED, &cb_rcv6xx
);
*
* // those callbacks are optional. They are used to announce the initial
* // response sent for a transaction. (for SIP response between 100 and 19
9,
* // all responses are announced because this is not a retransmission case
)
osip_set_message_callback(osip ,OSIP_NIST_STATUS_1XX_SENT, &cb_snd1xx);
osip_set_message_callback(osip ,OSIP_NIST_STATUS_2XX_SENT, &cb_snd2xx);
osip_set_message_callback(osip ,OSIP_NIST_STATUS_3XX_SENT, &cb_snd3xx);
osip_set_message_callback(osip ,OSIP_NIST_STATUS_4XX_SENT, &cb_snd4xx);
osip_set_message_callback(osip ,OSIP_NIST_STATUS_5XX_SENT, &cb_snd5xx);
osip_set_message_callback(osip ,OSIP_NIST_STATUS_6XX_SENT, &cb_snd6xx);
*
* // those callbacks are mandatory. They are used to announce the initial
* // request received for a transaction. It is not useless to notice that
* // a special behaviour exist for the 200 OK and the ACK in the case of
* // a successful INVITE transaction. This will be discussed later.
osip_set_message_callback(osip ,OSIP_IST_INVITE_RECEIVED, &cb_rcvinvi
te);
osip_set_message_callback(osip ,OSIP_IST_ACK_RECEIVED, &cb_rcvack)
;
osip_set_message_callback(osip ,OSIP_IST_ACK_RECEIVED_AGAIN, &cb_rcvack2
);
osip_set_message_callback(osip ,OSIP_NIST_REGISTER_RECEIVED, &cb_rcvregi
ster);
osip_set_message_callback(osip ,OSIP_NIST_BYE_RECEIVED, &cb_rcvbye)
;
osip_set_message_callback(osip ,OSIP_NIST_CANCEL_RECEIVED, &cb_rcvcanc
el);
osip_set_message_callback(osip ,OSIP_NIST_INFO_RECEIVED, &cb_rcvinfo
);
osip_set_message_callback(osip ,OSIP_NIST_OPTIONS_RECEIVED, &cb_rcvopti
ons);
osip_set_message_callback(osip ,OSIP_NIST_SUBSCRIBE_RECEIVED, &cb_rcvsubs
cribe);
osip_set_message_callback(osip ,OSIP_NIST_NOTIFY_RECEIVED, &cb_rcvnoti
fy);
osip_set_message_callback(osip ,OSIP_NIST_UNKNOWN_REQUEST_RECEIVED, &cb_s
ndunkrequest);
*
* </code></pre>
* <P>
* <H2>Step 2: Initialising a new transaction.</H2>
* <BR>Let's assume you want to implement a User Agent and you want to
* start a REGISTER transaction. Using the parser library, you will first
* have to build a SIP compliant message. (oSIP, as a low layer library
* provides an interface to build SIP messages, but it's up to you to
* correctly fill all the required fields.)
* As soon as you have build the SIP message, you are ready to start a new
* transaction. Here is the code:
* <BR><pre><code>
* osip_t *osip = your_global_osip_context;
* osip_transaction_t *transaction;
* osip_message_t *sip_register_message;
* osip_event_t *sipevent;
*
* application_build_register(&sip_register_message);
* osip_transaction_init(&transaction,
* NICT, //a REGISTER is a Non-Invite-Client-Transaction
* osip,
* sip_register_message);
*
* // If you have a special context that you want to associate to that
* // transaction, you can use a special method that associate your context
* // to the transaction context.
*
* osip_transaction_set_your_instance(transaction, any_pointer);
*
* // at this point, the transaction context exists in oSIP but you still h
ave
* // to give the SIP message to the finite state machine.
* sipevent = osip_new_outgoing_sipmessage(msg);
* sipevent->transactionid = transaction->transactionid;
* osip_transaction_add_event(transaction, sipevent);
* // at this point, the event will be handled by oSIP. (The memory resourc
e will
* // also be handled by oSIP). Note that no action is taken there.
* </pre></code>
* <P>Adding new events in the fsm is made with similar code.
* <P>
* <H2>Step 3: Consuming events.</H2>
* <BR>The previous step show how to create a transaction and one possible
way
* to add a new event. (Note, that some events -the TIMEOUT_* ones- will be
* added by oSIP not by the application). In this step, we describe how the
* oSIP stack will consume events. In fact, this is very simple, but you
* should be aware that it's not always allowed to consume an event at any
time!
* The fsm MUST consume events sequentially within a transaction. This mean
s
* that when your are calling osip_transaction_execute(), it is forbidden t
o call
* this method again with the same transaction context until the first call
* has returned. In a multi threaded application, if one thread handles one
* transaction, the code will be the following:
* <BR><pre><code>
* while (1)
* {
* se = (osip_event_t *)osip_fifo_get(transaction->transactionff);
* if (se==NULL)
* osip_thread_exit();
* if (osip_transaction_execute(transaction,se)<1) // deletion asked
* osip_thread_exit();
* }
* </pre></code>
* <P>
* <H2>Step 4: How the stack will announce the events</H2>
* Looking at the case of a usual outgoing REGISTER transaction, this behav
iour
* is expected.
* <BR>When an event is seen as useful for the fsm, it means that a transit
ion
* from one state to another has to be done on the transaction context. If
the
* event is SND_REQUEST (this is the case for an outgoing REGISTER), the
* callback previously registered to announce this action will be called. T
his
* callback is useless for the application as no action has to be taken at
this
* step. A more interesting announcement will be made when consuming the
* first final response received. If the callbacks associated to 2xx messag
e
* is called, then the transaction has succeeded. Inside this callback, you
* will probably inform the user of the success of the registration if you
want
* to do so...
* If the final response is not a 2xx, or the network callback is called, y
ou'll
* probably want to take some actions. For example, if you receive a 302, y
ou'll
* probably want to retry a registration at the new location. All that deci
sion
* is up to you.
*/ */
/** /**
* @defgroup oSIP_FSM oSIP fsm Handling * @defgroup oSIP_FSM oSIP fsm Handling
* @ingroup oSIP * @ingroup osip2_fsm
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Enumeration for transaction state. * Enumeration for transaction state.
skipping to change at line 434 skipping to change at line 197
#ifndef DEFAULT_T4 #ifndef DEFAULT_T4
/** /**
* You can re-define the default value for T4. (T1 is defined in rfcxxxx) * You can re-define the default value for T4. (T1 is defined in rfcxxxx)
* The default value is 5000ms. * The default value is 5000ms.
*/ */
#define DEFAULT_T4 5000 /* 5s */ #define DEFAULT_T4 5000 /* 5s */
#endif #endif
/** /**
* Structure for INVITE CLIENT TRANSACTION (outgoing INVITE transaction). * Structure for INVITE CLIENT TRANSACTION (outgoing INVITE transaction).
* @defvar osip_ict_t * @var osip_ict_t
*/ */
typedef struct osip_ict osip_ict_t; typedef struct osip_ict osip_ict_t;
/**
* Structure for INVITE CLIENT TRANSACTION.
* @struct osip_ict
*/
struct osip_ict struct osip_ict
{ {
/* state machine is implied... */ int timer_a_length; /**@internal A=T1, A=2xT1... (unre
int timer_a_length; /* A=T1, A=2xT1... (unreliable tr on liable only) */
ly) */ struct timeval timer_a_start; /**@internal */
struct timeval timer_a_start; int timer_b_length; /**@internal B = 64* T1 */
int timer_b_length; /* B = 64* T1 struct timeval timer_b_start; /**@internal fire when transaction timeou
*/ ts */
struct timeval timer_b_start; /* fire when transaction timeouts int timer_d_length; /**@internal D >= 32s for unreliab
*/ le tr (or 0) */
int timer_d_length; /* D >= 32s for unreliable tr (or 0) struct timeval timer_d_start; /**@internal should be equal to timer H *
*/ /
struct timeval timer_d_start; /* should be equal to timer H char *destination; /**@internal url used to send requests */
*/ int port; /**@internal port of next hop */
char *destination; /* url used to send requests */
int port; /* port of next hop */
}; };
/** /**
* Structure for NON-INVITE CLIENT TRANSACTION (outgoing NON-INVITE transac tion). * Structure for NON-INVITE CLIENT TRANSACTION (outgoing NON-INVITE transac tion).
* @defvar osip_nict_t * @var osip_nict_t
*/ */
typedef struct osip_nict osip_nict_t; typedef struct osip_nict osip_nict_t;
/**
* Structure for NON-INVITE CLIENT TRANSACTION.
* @struct osip_nict
*/
struct osip_nict struct osip_nict
{ {
/* state machine is implied... */ int timer_e_length; /**@internal A=T1, A=2xT1... (unre
liable only) */
int timer_e_length; /* A=T1, A=2xT1... (unreliable tr. o struct timeval timer_e_start; /**@internal */
nly) */ int timer_f_length; /**@internal B = 64* T1 */
struct timeval timer_e_start; /* (else = -1) not active struct timeval timer_f_start; /**@internal fire when transaction timeou
*/ ts */
int timer_f_length; /* B = 64* T1 int timer_k_length; /**@internal K = T4 (else = 0) */
*/ struct timeval timer_k_start; /**@internal */
struct timeval timer_f_start; /* fire when transaction timeouts char *destination; /**@internal url used to send requests */
*/ int port; /**@internal port of next hop */
int timer_k_length; /* K = T4 (else = 0)
*/
struct timeval timer_k_start;
char *destination; /* url used to send requests */
int port; /* port of next hop */
}; };
/** /**
* Structure for INVITE SERVER TRANSACTION (incoming INVITE transaction). * Structure for INVITE SERVER TRANSACTION (incoming INVITE transaction).
* @defvar osip_ist_t * @var osip_ist_t
*/ */
typedef struct osip_ist osip_ist_t; typedef struct osip_ist osip_ist_t;
/**
* Structure for INVITE SERVER TRANSACTION.
* @struct osip_ist
*/
struct osip_ist struct osip_ist
{ {
int timer_g_length; /* G=MIN(T1*2,T2) for unreliable tra int timer_g_length; /**@internal G=MIN(T1*2,T2) for unrelia
ns. */ ble trans. */
struct timeval timer_g_start; /* 0 when reliable transport is used struct timeval timer_g_start; /**@internal 0 when reliable transport is
! */ used */
int timer_h_length; /* H = 64* T1 int timer_h_length; /**@internal H = 64* T1 */
*/ struct timeval timer_h_start; /**@internal fire when if no ACK is recei
struct timeval timer_h_start; /* fire when if no ACK is received ved */
*/ int timer_i_length; /**@internal I = T4 for unreliable
int timer_i_length; /* I = T4 for unreliable transport ( (or 0) */
or 0) */ struct timeval timer_i_start; /**@internal absorb all ACK */
struct timeval timer_i_start; /* absorb all ACK
*/
}; };
/** /**
* Structure for NON-INVITE SERVER TRANSACTION (incoming SERVER transaction ). * Structure for NON-INVITE SERVER TRANSACTION (incoming SERVER transaction ).
* @defvar osip_nist_t * @var osip_nist_t
*/ */
typedef struct osip_nist osip_nist_t; typedef struct osip_nist osip_nist_t;
/**
* Structure for NON-INVITE SERVER TRANSACTION.
* @struct osip_nist
*/
struct osip_nist struct osip_nist
{ {
int timer_j_length; /* J = 64*T1 (else 0) */ int timer_j_length; /**@internal J = 64*T1 (else 0) *
struct timeval timer_j_start; /
struct timeval timer_j_start; /**@internal */
}; };
/** /**
* Structure for transaction handling. * Structure for transaction handling.
* @defvar osip_transaction_t * @var osip_transaction_t
*/ */
typedef struct osip_transaction osip_transaction_t; typedef struct osip_transaction osip_transaction_t;
/**
* Structure for transaction handling
* @struct osip_transaction
*/
struct osip_transaction struct osip_transaction
{ {
void *your_instance; /* add whatever you want here. */ void *your_instance; /**< User Defined Pointer. */
int transactionid; /* simple id used to identify the tr. */ int transactionid; /**< Internal Transaction Identifier. */
osip_fifo_t *transactionff; /* events must be added in this fifo osip_fifo_t *transactionff; /**< events must be added in this fi
*/ fo */
osip_via_t *topvia; /* CALL-LEG definition */ osip_via_t *topvia; /**< CALL-LEG definition (Top Via) *
osip_from_t *from; /* CALL-LEG definition */ /
osip_to_t *to; osip_from_t *from; /**< CALL-LEG definition (From) */
osip_call_id_t *callid; osip_to_t *to; /**< CALL-LEG definition (To) */
osip_cseq_t *cseq; osip_call_id_t *callid; /**< CALL-LEG definition (Call-ID) */
osip_cseq_t *cseq; /**< CALL-LEG definition (CSeq) */
osip_message_t *orig_request; /* last request sent osip_message_t *orig_request; /**< Initial request */
*/ osip_message_t *last_response; /**< Last response */
osip_message_t *last_response; /* last response received osip_message_t *ack; /**< ack request sent */
*/
osip_message_t *ack; /* ack request sent */
state_t state; /* state of transaction */ state_t state; /**< Current state of the transaction */
time_t birth_time; /* birth_date of transaction */ time_t birth_time; /**< birth date of transaction */
time_t completed_time; /* end date of transaction */ time_t completed_time; /**< end date of transaction */
/* RESPONSE are received on this socket */ int in_socket; /**< Optional socket for incoming message *
int in_socket; /
/* REQUESTS are sent on this socket */ int out_socket; /**< Optional place for outgoing message */
int out_socket;
void *config; /* transaction is managed by config */ void *config; /**@internal transaction is managed by osip_ t */
osip_fsm_type_t ctx_type; osip_fsm_type_t ctx_type; /**< Type of the transaction */
osip_ict_t *ict_context; osip_ict_t *ict_context; /**@internal */
osip_ist_t *ist_context; osip_ist_t *ist_context; /**@internal */
osip_nict_t *nict_context; osip_nict_t *nict_context; /**@internal */
osip_nist_t *nist_context; osip_nist_t *nist_context; /**@internal */
}; };
/** /**
* Enumeration for callback type. * Enumeration for callback type.
*/ */
typedef enum osip_message_callback_type typedef enum osip_message_callback_type
{ {
OSIP_ICT_INVITE_SENT = 0, /**< INVITE MESSAGE SENT */ OSIP_ICT_INVITE_SENT = 0, /**< INVITE MESSAGE SENT */
OSIP_ICT_INVITE_SENT_AGAIN, /**< INVITE MESSAGE RETRANSMITT ED */ OSIP_ICT_INVITE_SENT_AGAIN, /**< INVITE MESSAGE RETRANSMITT ED */
OSIP_ICT_ACK_SENT, /**< ACK MESSAGE SENT */ OSIP_ICT_ACK_SENT, /**< ACK MESSAGE SENT */
skipping to change at line 629 skipping to change at line 406
OSIP_ICT_KILL_TRANSACTION, /**< end of Client INVITE transaction * / OSIP_ICT_KILL_TRANSACTION, /**< end of Client INVITE transaction * /
OSIP_IST_KILL_TRANSACTION, /**< end of Server INVITE transaction * / OSIP_IST_KILL_TRANSACTION, /**< end of Server INVITE transaction * /
OSIP_NICT_KILL_TRANSACTION, /**< end of Client Non-INVITE transacti on */ OSIP_NICT_KILL_TRANSACTION, /**< end of Client Non-INVITE transacti on */
OSIP_NIST_KILL_TRANSACTION, /**< end of Server Non-INVITE transacti on */ OSIP_NIST_KILL_TRANSACTION, /**< end of Server Non-INVITE transacti on */
OSIP_KILL_CALLBACK_COUNT /**< END OF ENUM */ OSIP_KILL_CALLBACK_COUNT /**< END OF ENUM */
} osip_kill_callback_type_t; } osip_kill_callback_type_t;
/** /**
* Enumeration for callback type used when a transport error is detected. * Enumeration for callback type used when a transport error is detected.
* @enum osip_transport_error_callback_type_t
*/ */
typedef enum osip_transport_error_callback_type typedef enum osip_transport_error_callback_type
{ {
OSIP_ICT_TRANSPORT_ERROR, /**< transport error for ICT */ OSIP_ICT_TRANSPORT_ERROR, /**< transport error for ICT */
OSIP_IST_TRANSPORT_ERROR, /**< transport error for IST */ OSIP_IST_TRANSPORT_ERROR, /**< transport error for IST */
OSIP_NICT_TRANSPORT_ERROR, /**< transport error for NICT */ OSIP_NICT_TRANSPORT_ERROR, /**< transport error for NICT */
OSIP_NIST_TRANSPORT_ERROR, /**< transport error for NIST */ OSIP_NIST_TRANSPORT_ERROR, /**< transport error for NIST */
OSIP_TRANSPORT_ERROR_CALLBACK_COUNT /**< END OF ENUM */ OSIP_TRANSPORT_ERROR_CALLBACK_COUNT /**< END OF ENUM */
} osip_transport_error_callback_type_t; } osip_transport_error_callback_type_t;
/**
* Callback definition for message announcements.
* @var osip_message_cb_t
*/
typedef void (*osip_message_cb_t) (int type, osip_transaction_t *, typedef void (*osip_message_cb_t) (int type, osip_transaction_t *,
osip_message_t *); osip_message_t *);
/**
* Callback definition for end of transaction announcements.
* @var osip_kill_transaction_cb_t
*/
typedef void (*osip_kill_transaction_cb_t) (int type, osip_transaction_t *); typedef void (*osip_kill_transaction_cb_t) (int type, osip_transaction_t *);
/**
* Callback definition for transport error announcements.
* @var osip_transport_error_cb_t
*/
typedef void (*osip_transport_error_cb_t) (int type, osip_transaction_t * , typedef void (*osip_transport_error_cb_t) (int type, osip_transaction_t * ,
int error); int error);
#ifdef OSIP_RETRANSMIT_2XX
struct osip_dialog; struct osip_dialog;
/**
* Structure for 2XX retransmission management.
* @var ixt_t
*/
typedef struct ixt_t ixt_t; typedef struct ixt_t ixt_t;
/**
* Structure for 2XX retransmission management.
* @struct ixt
*/
struct ixt_t struct ixt_t
{ {
/* any ACK received that match this context will set counter to -1 */ /* any ACK received that match this context will set counter to -1 */
struct osip_dialog *dialog; struct osip_dialog *dialog; /**< related dialog */
osip_message_t *msg2xx; /* copy of string to retransmit */ osip_message_t *msg2xx; /**< buffer to retransmit */
osip_message_t *ack; /* useless for ist */ osip_message_t *ack; /**< ack message if needed */
time_t start; time_t start; /**< Time of first retransmission */
int interval; /* between each retransmission, in ms */ int interval; /**< delay between retransmission, in ms */
char *dest; char *dest; /**< destination host */
int port; int port; /**< destination port */
int sock; int sock; /**< socket to use */
int counter; /* start at 7 */ int counter; /**< start at 7 */
}; };
#endif
/** /**
* Structure for osip handling. * Structure for osip handling.
* In order to use osip, you have to manage at least one global instance * In order to use osip, you have to manage at least one global instance
* of an osip_t element. Then, you'll register a set of required callbacks * of an osip_t element. Then, you'll register a set of required callbacks
* and a set of optional ones. * and a set of optional ones.
* @defvar osip_t * @var osip_t
*/ */
typedef struct osip osip_t; typedef struct osip osip_t;
/**
* Structure for osip handling.
* @struct osip
*/
struct osip struct osip
{ {
void *application_context; /* a pointer for your personnal usage */ void *application_context; /**< User defined Pointer */
/* list of transactions for ict, ist, nict, nist */ /* list of transactions for ict, ist, nict, nist */
osip_list_t *osip_ict_transactions; osip_list_t *osip_ict_transactions; /**< list of ict transactions */
osip_list_t *osip_ist_transactions; osip_list_t *osip_ist_transactions; /**< list of ist transactions */
osip_list_t *osip_nict_transactions; osip_list_t *osip_nict_transactions; /**< list of nict transactions */
osip_list_t *osip_nist_transactions; osip_list_t *osip_nist_transactions; /**< list of nist transactions */
osip_list_t *ixt_retransmissions; /* for retransmission of 2xx & ACK f or INVITE */ osip_list_t *ixt_retransmissions; /**< list of ixt elements */
osip_message_cb_t msg_callbacks[OSIP_MESSAGE_CALLBACK_COUNT]; osip_message_cb_t msg_callbacks[OSIP_MESSAGE_CALLBACK_COUNT]; /*
osip_kill_transaction_cb_t kill_callbacks[OSIP_KILL_CALLBACK_COUNT]; *@internal */
osip_transport_error_cb_t osip_kill_transaction_cb_t kill_callbacks[OSIP_KILL_CALLBACK_COUNT]; /*
tp_error_callbacks[OSIP_TRANSPORT_ERROR_CALLBACK_COUNT]; *@internal */
osip_transport_error_cb_t tp_error_callbacks[OSIP_TRANSPORT_ERROR_CALLB
ACK_COUNT]; /**@internal */
/* callbacks for sending messages */
int (*cb_send_message) (osip_transaction_t *, osip_message_t *, char *, int (*cb_send_message) (osip_transaction_t *, osip_message_t *, char *,
int, int); int, int); /**@internal */
}; };
/** /**
* Set a callback for each transaction operation. * Set a callback for each transaction operation.
* @param osip The element to work on. * @param osip The element to work on.
* @param type The event type to hook on. * @param type The event type to hook on.
* @param cb The method to be called upon the event. * @param cb The method to be called upon the event.
*/ */
int osip_set_message_callback (osip_t *osip, int type, osip_message_cb_t cb); int osip_set_message_callback (osip_t *osip, int type, osip_message_cb_t cb);
skipping to change at line 726 skipping to change at line 523
/** /**
* Set a callback for each transaction operation related to network error. * Set a callback for each transaction operation related to network error.
* @param osip The element to work on. * @param osip The element to work on.
* @param type The event type to hook on. * @param type The event type to hook on.
* @param cb The method to be called upon the event. * @param cb The method to be called upon the event.
*/ */
int osip_set_transport_error_callback (osip_t *osip, int type, int osip_set_transport_error_callback (osip_t *osip, int type,
osip_transport_error_cb_t cb); osip_transport_error_cb_t cb);
/** /**
* Structure for sipevent handling. * Structure for osip event handling.
* A osip_event_t element will have a type and will be related * A osip_event_t element will have a type and will be related
* to a transaction. In the general case, it is used by the * to a transaction. In the general case, it is used by the
* application layer to give SIP messages to the oSIP finite * application layer to give SIP messages to the oSIP finite
* state machine. * state machine.
* @defvar osip_event_t * @var osip_event_t
*/ */
typedef struct osip_event osip_event_t; typedef struct osip_event osip_event_t;
/**
* Structure for osip event handling.
* @struct osip_event
*/
struct osip_event struct osip_event
{ {
type_t type; type_t type; /**< Event Type */
int transactionid; int transactionid; /**< identifier of the related osip transactio
osip_message_t *sip; n */
osip_message_t *sip; /**< SIP message (optional) */
}; };
/** /**
* Allocate an osip_transaction_t element. * Allocate an osip_transaction_t element.
* @param transaction The element to allocate. * @param transaction The element to allocate.
* @param ctx_type The type of transaction. (ICT, IST, NICT, NIST) * @param ctx_type The type of transaction. (ICT, IST, NICT, NIST)
* @param osip The global instance of oSIP. * @param osip The global instance of oSIP.
* @param request The SIP request that initiate the transaction. * @param request The SIP request that initiate the transaction.
*/ */
int osip_transaction_init (osip_transaction_t ** transaction, int osip_transaction_init (osip_transaction_t ** transaction,
skipping to change at line 767 skipping to change at line 568
/** /**
* Free all resource in a osip_transaction_t element. * Free all resource in a osip_transaction_t element.
* This method does the same than osip_transaction_free() but it assumes * This method does the same than osip_transaction_free() but it assumes
* that the transaction is already removed from the list of transaction * that the transaction is already removed from the list of transaction
* in the osip stack. (to remove it use osip_xixt_remove(osip, transaction) ; * in the osip stack. (to remove it use osip_xixt_remove(osip, transaction) ;
* @param transaction The element to free. * @param transaction The element to free.
*/ */
int osip_transaction_free2 (osip_transaction_t * transaction); int osip_transaction_free2 (osip_transaction_t * transaction);
/** /**
* Search in a SIP response the destination where the message
* should be sent.
* @param response the message to work on.
* @param address a pointer to receive the allocated host address.
* @param portnum a pointer to receive the host port.
*/
void osip_response_get_destination (osip_message_t * response,
char **address,
int *portnum);
/**
* Set the host and port destination used for sending the SIP message. * Set the host and port destination used for sending the SIP message.
* This can be useful for an application with 'DIRECT ROOTING MODE' * This can be useful for an application with 'DIRECT ROOTING MODE'
* NOTE: Instead, you should use the 'Route' header facility which * NOTE: Instead, you should use the 'Route' header facility which
* leads to the same behaviour. * leads to the same behaviour.
* @param ict The element to work on. * @param ict The element to work on.
* @param destination The destination host. * @param destination The destination host.
* @param port The destination port. * @param port The destination port.
*/ */
int osip_ict_set_destination (osip_ict_t * ict, char *destination, int osip_ict_set_destination (osip_ict_t * ict, char *destination,
int port); int port);
skipping to change at line 1003 skipping to change at line 814
* Create a transaction for this event (MUST be a SIP REQUEST event). * Create a transaction for this event (MUST be a SIP REQUEST event).
* @param osip The element to work on. * @param osip The element to work on.
* @param evt The element representing the new SIP REQUEST. * @param evt The element representing the new SIP REQUEST.
*/ */
osip_transaction_t *osip_create_transaction (osip_t * osip, osip_transaction_t *osip_create_transaction (osip_t * osip,
osip_event_t * evt); osip_event_t * evt);
/** /**
* Create a sipevent from a SIP message string. * Create a sipevent from a SIP message string.
* @param buf The SIP message as a string. * @param buf The SIP message as a string.
* @param length The length of the buffer to parse.
*/ */
osip_event_t *osip_parse (char *buf); osip_event_t *osip_parse (const char *buf, size_t length);
#ifdef OSIP_RETRANSMIT_2XX
/**
* Send required retransmissions
* @param osip The element to work on.
*/
void osip_retransmissions_execute (osip_t * osip); void osip_retransmissions_execute (osip_t * osip);
/** /**
* Start out of fsm 200 Ok retransmissions. This is usefull for user-agents . * Start out of fsm 200 Ok retransmissions. This is usefull for user-agents .
* @param osip The osip_t structure. * @param osip The osip_t structure.
* @param dialog The dialog the 200 Ok is part of. * @param dialog The dialog the 200 Ok is part of.
* @param msg200ok The 200 ok response. * @param msg200ok The 200 ok response.
* @param sock The socket to be used to send the message. (optional). * @param sock The socket to be used to send the message. (optional).
*/ */
void osip_start_200ok_retransmissions (osip_t * osip, void osip_start_200ok_retransmissions (osip_t * osip,
skipping to change at line 1040 skipping to change at line 854
void osip_start_ack_retransmissions (osip_t * osip, void osip_start_ack_retransmissions (osip_t * osip,
struct osip_dialog *dialog, struct osip_dialog *dialog,
osip_message_t * ack, char *dest, osip_message_t * ack, char *dest,
int port, int sock); int port, int sock);
/** /**
* Stop the out of fsm 200 Ok retransmissions matching an incoming ACK. * Stop the out of fsm 200 Ok retransmissions matching an incoming ACK.
* @param osip The osip_t structure. * @param osip The osip_t structure.
* @param ack The ack that has just been received. * @param ack The ack that has just been received.
*/ */
void osip_stop_200ok_retransmissions (osip_t * osip, osip_message_t * ack ); struct osip_dialog *osip_stop_200ok_retransmissions (osip_t * osip, osip_ message_t * ack);
/** /**
* Stop out of fsm retransmissions (ACK or 200 Ok) associated to a given di alog. * Stop out of fsm retransmissions (ACK or 200 Ok) associated to a given di alog.
* This function must be called before freeing a dialog if out of fsm retra nsmissions * This function must be called before freeing a dialog if out of fsm retra nsmissions
* have been scheduled. * have been scheduled.
* @param osip The osip_t structure * @param osip The osip_t structure
* @param dialog The dialog. * @param dialog The dialog.
*/ */
void osip_stop_retransmissions_from_dialog (osip_t * osip, void osip_stop_retransmissions_from_dialog (osip_t * osip,
struct osip_dialog *dialog); struct osip_dialog *dialog);
#endif
/** /**
* Allocate a sipevent (we know this message is an OUTGOING SIP message). * Allocate a sipevent (we know this message is an OUTGOING SIP message).
* @param sip The SIP message we want to send. * @param sip The SIP message we want to send.
*/ */
osip_event_t *osip_new_outgoing_sipmessage (osip_message_t * sip); osip_event_t *osip_new_outgoing_sipmessage (osip_message_t * sip);
/** /**
* Free all ressource in a sipevent. * Free all ressource in a sipevent.
* @param event The event to free. * @param event The event to free.
*/ */
 End of changes. 52 change blocks. 
413 lines changed or deleted 164 lines changed or added


 osip_accept.h   osip_accept.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_ACCEPT oSIP accept header definition. * @defgroup oSIP_ACCEPT oSIP accept header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for accept headers. * Structure for accept headers.
* @defvar osip_accept_t * @var osip_accept_t
*/ */
typedef osip_content_type_t osip_accept_t; typedef osip_content_type_t osip_accept_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate an Accept element. * Allocate an Accept element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_accept_encoding.h   osip_accept_encoding.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc3261 -) The oSIP library implements the Session Initiation Protocol (SIP -rfc3261 -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_ACCEPT_ENCODING oSIP accept-encoding header definition. * @defgroup oSIP_ACCEPT_ENCODING oSIP accept-encoding header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Accept-Encoding header. * Structure for Accept-Encoding header.
* @defvar osip_accept_encoding_t * @var osip_accept_encoding_t
*/ */
typedef struct osip_accept_encoding osip_accept_encoding_t; typedef struct osip_accept_encoding osip_accept_encoding_t;
/**
* Definition of the Accept-Encoding header.
* @struct osip_accept_encoding
*/
struct osip_accept_encoding struct osip_accept_encoding
{ {
char *element; char *element; /**< accept encoding main value */
osip_list_t *gen_params; osip_list_t *gen_params; /**< accept encoding parameters */
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Accept-Encoding element. * Allocate a Accept-Encoding element.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 4 change blocks. 
4 lines changed or deleted 8 lines changed or added


 osip_accept_language.h   osip_accept_language.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_ACCEPT_LANGUAGE oSIP accept-language header definition. * @defgroup oSIP_ACCEPT_LANGUAGE oSIP accept-language header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Accept-Language headers. * Structure for Accept-Language headers.
* @defvar osip_accept_language_t * @var osip_accept_language_t
*/ */
typedef osip_accept_encoding_t osip_accept_language_t; typedef osip_accept_encoding_t osip_accept_language_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate an Accept-Language element. * Allocate an Accept-Language element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_alert_info.h   osip_alert_info.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_ALERT_INFO oSIP alert-info definition. * @defgroup oSIP_ALERT_INFO oSIP alert-info definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Alert-Info headers. * Structure for Alert-Info headers.
* @defvar osip_alert_info_t * @var osip_alert_info_t
*/ */
typedef osip_call_info_t osip_alert_info_t; typedef osip_call_info_t osip_alert_info_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Alert-Info element. * Allocate a Alert-Info element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_allow.h   osip_allow.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_ALLOW oSIP allow header definition. * @defgroup oSIP_ALLOW oSIP allow header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Allow headers. * Structure for Allow headers.
* @defvar osip_allow_t * @var osip_allow_t
*/ */
typedef osip_content_length_t osip_allow_t; typedef osip_content_length_t osip_allow_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Allow element. * Allocate a Allow element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_authorization.h   osip_authorization.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 36 skipping to change at line 36
*/ */
/** /**
* @defgroup oSIP_AUTHORIZATION oSIP authorization header definition. * @defgroup oSIP_AUTHORIZATION oSIP authorization header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Authorization headers. * Structure for Authorization headers.
* @defvar osip_authorization_t * @var osip_authorization_t
*/ */
typedef struct osip_authorization osip_authorization_t; typedef struct osip_authorization osip_authorization_t;
/**
* Definition of the Authorization header.
* @struct osip_authorization
*/
struct osip_authorization struct osip_authorization
{ {
char *auth_type; /* ( "Basic" | "Digest" ) */ char *auth_type; /**< Authentication Type (Basic or Digest) *
char *username; /
char *realm; /* mandatory ( quoted-string ) */ char *username; /**< login */
char *nonce; char *realm; /**< realm (as a quoted-string) */
char *uri; char *nonce; /**< nonce */
char *response; char *uri; /**< uri */
char *digest; /* DO NOT USE IT IN AUTHORIZATION_T HEADER?? char *response; /**< response */
*/ char *digest; /**< digest */
char *algorithm; /* optionnal, default is "md5" */ char *algorithm; /**< algorithm (optionnal) */
char *cnonce; /* optionnal */ char *cnonce; /**< cnonce (optionnal) */
char *opaque; /* optionnal */ char *opaque; /**< opaque (optionnal) */
char *message_qop; /* optionnal */ char *message_qop; /**< message_qop (optionnal) */
char *nonce_count; /* optionnal */ char *nonce_count; /**< nonce_count (optionnal) */
char *auth_param; /* optionnal */ char *auth_param; /**< other parameters (optionnal) */
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Authorization element. * Allocate a Authorization element.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 4 change blocks. 
18 lines changed or deleted 22 lines changed or added


 osip_body.h   osip_body.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 33 skipping to change at line 33
#include <osipparser2/headers/osip_content_type.h> #include <osipparser2/headers/osip_content_type.h>
/** /**
* @file osip_body.h * @file osip_body.h
* @brief oSIP SIP Message Body Routines * @brief oSIP SIP Message Body Routines
* *
*/ */
/** /**
* @defgroup oSIP_BODY oSIP body API * @defgroup oSIP_BODY oSIP body API
* @ingroup oSIP * @ingroup osip2_parser
* @{ * @{
*/ */
/** /**
* Structure for Body * Structure for holding Body
* @defvar osip_body_t * @var osip_body_t
*/ */
typedef struct osip_body osip_body_t; typedef struct osip_body osip_body_t;
/**
* Structure for holding Body
* @struct osip_body
*/
struct osip_body struct osip_body
{ {
char *body; char *body; /**< buffer containing data */
osip_list_t *headers; size_t length; /**< length of data */
osip_content_type_t *content_type; osip_list_t *headers; /**< List of headers (when mime is use
d) */
osip_content_type_t *content_type; /**< Content-Type (when mime is used)
*/
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a osip_body_t element. * Allocate a osip_body_t element.
* @param body The element to work on. * @param body The element to work on.
skipping to change at line 69 skipping to change at line 74
int osip_body_init (osip_body_t ** body); int osip_body_init (osip_body_t ** body);
/** /**
* Free a osip_body_t element. * Free a osip_body_t element.
* @param body The element to work on. * @param body The element to work on.
*/ */
void osip_body_free (osip_body_t * body); void osip_body_free (osip_body_t * body);
/** /**
* Parse a osip_body_t element. * Parse a osip_body_t element.
* @param body The element to work on. * @param body The element to work on.
* @param buf The buffer to parse. * @param buf The buffer to parse.
* @param length The length of the buffer to parse.
*/ */
int osip_body_parse (osip_body_t * body, const char *buf); int osip_body_parse (osip_body_t * body, const char *buf, size_t length);
/** /**
* Clone a osip_body_t element. * Clone a osip_body_t element.
* @param body The element to clone. * @param body The element to clone.
* @param dest The cloned element. * @param dest The cloned element.
*/ */
int osip_body_clone (const osip_body_t * body, osip_body_t ** dest); int osip_body_clone (const osip_body_t * body, osip_body_t ** dest);
/** /**
* Parse a osip_body_t element. (for mime message format) (NOT TESTED, use with care) * Parse a osip_body_t element. (for mime message format) (NOT TESTED, use with care)
* @param body The element to work on. * @param body The element to work on.
* @param buf The buffer to parse. * @param buf The buffer to parse.
* @param length The length of the buffer to parse.
*/ */
int osip_body_parse_mime (osip_body_t * body, const char *buf); int osip_body_parse_mime (osip_body_t * body, const char *buf, size_t len gth);
/** /**
* Get a string representation of a osip_body_t element. * Get a string representation of a osip_body_t element.
* @param body The element to work on. * @param body The element to work on.
* @param dest The resulting buffer. * @param dest The resulting buffer.
* @param length The length of the returned buffer.
*/ */
int osip_body_to_str (const osip_body_t * body, char **dest); int osip_body_to_str (const osip_body_t * body, char **dest, size_t *leng th);
/** /**
* Set the Content-Type header in the osip_body_t element. * Set the Content-Type header in the osip_body_t element.
* @param body The element to work on. * @param body The element to work on.
* @param hvalue The content type string value. * @param hvalue The content type string value.
*/ */
int osip_body_set_contenttype (osip_body_t * body, const char *hvalue); int osip_body_set_contenttype (osip_body_t * body, const char *hvalue);
/** /**
* Add a header in the osip_body_t element. * Add a header in the osip_body_t element.
* @param body The element to work on. * @param body The element to work on.
* @param hname The header string name.
* @param hvalue The header string value. * @param hvalue The header string value.
*/ */
int osip_body_set_header (osip_body_t * body, const char *hname, int osip_body_set_header (osip_body_t * body, const char *hname,
const char *hvalue); const char *hvalue);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/** @} */ /** @} */
 End of changes. 12 change blocks. 
12 lines changed or deleted 23 lines changed or added


 osip_call_id.h   osip_call_id.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 36 skipping to change at line 36
*/ */
/** /**
* @defgroup oSIP_CALL_ID oSIP call-id header definition. * @defgroup oSIP_CALL_ID oSIP call-id header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Call-Id headers. * Structure for Call-Id headers.
* @defvar osip_call_id_t * @var osip_call_id_t
*/ */
typedef struct osip_call_id osip_call_id_t; typedef struct osip_call_id osip_call_id_t;
/**
* Definition of the Call-Id header.
* @struct osip_call_id
*/
struct osip_call_id struct osip_call_id
{ {
char *number; char *number; /**< Call-ID number */
char *host; char *host; /**< Call-ID host information */
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Call-id element. * Allocate a Call-id element.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 4 change blocks. 
6 lines changed or deleted 10 lines changed or added


 osip_call_info.h   osip_call_info.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_CALL_INFO oSIP call-info header definition. * @defgroup oSIP_CALL_INFO oSIP call-info header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Call-Info headers. * Structure for Call-Info headers.
* @defvar osip_call_info_t * @var osip_call_info_t
*/ */
typedef struct osip_call_info osip_call_info_t; typedef struct osip_call_info osip_call_info_t;
/**
* Definition of the Call-Info header.
* @struct osip_call_info
*/
struct osip_call_info struct osip_call_info
{ {
char *element; char *element; /**< Call-Info main value */
osip_list_t *gen_params; osip_list_t *gen_params; /**< Parameters for Call-Info header */
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Call-Info element. * Allocate a Call-Info element.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 4 change blocks. 
6 lines changed or deleted 10 lines changed or added


 osip_condv.h   osip_condv.h 
/* /*
eXosip - This is the eXtended osip library. The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
Copyright (C) 2002, 2003 Aymeric MOIZARD - jack@atosc.org -)
Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
eXosip is free software; you can redistribute it and/or modify This library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by modify it under the terms of the GNU Lesser General Public
the Free Software Foundation; either version 2 of the License, or License as published by the Free Software Foundation; either
(at your option) any later version. version 2.1 of the License, or (at your option) any later version.
eXosip is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
GNU General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU Lesser General Public
along with this program; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __OSIP_CONDV_H__ #ifndef __OSIP_CONDV_H__
#define __OSIP_CONDV_H__ #define __OSIP_CONDV_H__
#include <stdio.h> #include <stdio.h>
#ifdef OSIP_MT #ifdef OSIP_MT
skipping to change at line 41 skipping to change at line 41
/** /**
* @file osip_condv.h * @file osip_condv.h
* @brief oSIP condition variables definitions * @brief oSIP condition variables definitions
* *
* Those methods are only available if the library is compile * Those methods are only available if the library is compile
* in multi threaded mode. This is the default for oSIP. * in multi threaded mode. This is the default for oSIP.
*/ */
/** /**
* @defgroup oSIP_COND oSIP condition variables definitions * @defgroup oSIP_COND oSIP condition variables definitions
* @ingroup oSIP * @ingroup osip2_port
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#if defined(__PSOS__) || defined(__VXWORKS_OS__) #if defined(__PSOS__)
/* TODO */ /* TODO */
#else #else
/* condv implementation */ /* condv implementation */
#if defined(WIN32) || defined(_WIN32_WCE) #if defined(WIN32) || defined(_WIN32_WCE)
/** /**
* timespec structure * timespec structure
* @defvar struct timespec * @struct timespec
*/ */
struct timespec struct timespec
{ {
long tv_sec; long tv_sec;
long tv_nsec; long tv_nsec;
}; };
#endif #endif
struct osip_cond; struct osip_cond;
/* /**
* Allocate and Initialise a condition variable * Allocate and Initialise a condition variable
*/ */
struct osip_cond *osip_cond_init (void); struct osip_cond *osip_cond_init (void);
/* /**
* Destroy a condition variable * Destroy a condition variable
* @param cond The condition variable to destroy. * @param cond The condition variable to destroy.
*/ */
int osip_cond_destroy (struct osip_cond *_cond); int osip_cond_destroy (struct osip_cond *cond);
/** /**
* Signal the condition variable. * Signal the condition variable.
* @param cond The condition variable to signal. * @param cond The condition variable to signal.
*/ */
int osip_cond_signal (struct osip_cond *cond); int osip_cond_signal (struct osip_cond *cond);
/** /**
* Wait on the condition variable. * Wait on the condition variable.
* @param cond The condition variable to wait on. * @param cond The condition variable to wait on.
* @param mut The external mutex * @param mut The external mutex
 End of changes. 11 change blocks. 
17 lines changed or deleted 18 lines changed or added


 osip_const.h   osip_const.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 65 skipping to change at line 65
#define EXPIRES "expires" #define EXPIRES "expires"
#define FROM "from" #define FROM "from"
#define FROM_SHORT "f" #define FROM_SHORT "f"
#define IN_REPLY_TO "in-reply-to" #define IN_REPLY_TO "in-reply-to"
#define MAX_FORWARDS "max-forwards" #define MAX_FORWARDS "max-forwards"
#define MIME_VERSION "mime-version" #define MIME_VERSION "mime-version"
#define MIN_EXPIRES "min-expires" #define MIN_EXPIRES "min-expires"
#define ORGANIZATION "organization" #define ORGANIZATION "organization"
#define PRIORITY "priority" #define PRIORITY "priority"
#define PROXY_AUTHENTICATE "proxy-authenticate" #define PROXY_AUTHENTICATE "proxy-authenticate"
#define PROXY_AUTHENTICATION_INFO "proxy-authentication-info"
#define PROXY_AUTHORIZATION "proxy-authorization" #define PROXY_AUTHORIZATION "proxy-authorization"
#define PROXY_REQUIRE "proxy-require" #define PROXY_REQUIRE "proxy-require"
#define RECORD_ROUTE "record-route" #define RECORD_ROUTE "record-route"
#define REPLY_TO "reply-to" #define REPLY_TO "reply-to"
#define REQUIRE "require" #define REQUIRE "require"
#define RETRY_AFTER "retry-after" #define RETRY_AFTER "retry-after"
#define ROUTE "route" #define ROUTE "route"
#define SERVER "server" #define SERVER "server"
#define SUBJECT "subject" #define SUBJECT "subject"
#define SUBJECT_SHORT "s" #define SUBJECT_SHORT "s"
skipping to change at line 126 skipping to change at line 127
#define SIP_INTERVAL_TOO_BRIEF 423 #define SIP_INTERVAL_TOO_BRIEF 423
#define SIP_TEMPORARILY_UNAVAILABLE 480 #define SIP_TEMPORARILY_UNAVAILABLE 480
#define SIP_CALL_TRANSACTION_DOES_NOT_EXIST 481 #define SIP_CALL_TRANSACTION_DOES_NOT_EXIST 481
#define SIP_LOOP_DETECTED 482 #define SIP_LOOP_DETECTED 482
#define SIP_TOO_MANY_HOPS 483 #define SIP_TOO_MANY_HOPS 483
#define SIP_ADDRESS_INCOMPLETE 484 #define SIP_ADDRESS_INCOMPLETE 484
#define SIP_AMBIGUOUS 485 #define SIP_AMBIGUOUS 485
#define SIP_BUSY_HERE 486 #define SIP_BUSY_HERE 486
#define SIP_REQUEST_TERMINATED 487 #define SIP_REQUEST_TERMINATED 487
#define SIP_NOT_ACCEPTABLE_HERE 488 #define SIP_NOT_ACCEPTABLE_HERE 488
#define SIP_BAD_EVENT 489
#define SIP_REQUEST_PENDING 491 #define SIP_REQUEST_PENDING 491
#define SIP_UNDECIPHERABLE 493 #define SIP_UNDECIPHERABLE 493
#define SIP_INTERNAL_SERVER_ERROR 500 #define SIP_INTERNAL_SERVER_ERROR 500
#define SIP_NOT_IMPLEMENTED 501 #define SIP_NOT_IMPLEMENTED 501
#define SIP_BAD_GATEWAY 502 #define SIP_BAD_GATEWAY 502
#define SIP_SERVICE_UNAVAILABLE 503 #define SIP_SERVICE_UNAVAILABLE 503
#define SIP_SERVER_TIME_OUT 504 #define SIP_SERVER_TIME_OUT 504
#define SIP_VERSION_NOT_SUPPORTED 505 #define SIP_VERSION_NOT_SUPPORTED 505
#define SIP_MESSAGE_TOO_LARGE 513 #define SIP_MESSAGE_TOO_LARGE 513
#define SIP_BUSY_EVRYWHERE 600 #define SIP_BUSY_EVRYWHERE 600
 End of changes. 3 change blocks. 
3 lines changed or deleted 5 lines changed or added


 osip_contact.h   osip_contact.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_CONTACT oSIP contact header definition. * @defgroup oSIP_CONTACT oSIP contact header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Contact headers. * Structure for Contact headers.
* @defvar osip_contact_t * @var osip_contact_t
*/ */
typedef osip_from_t osip_contact_t; typedef osip_from_t osip_contact_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Contact element. * Allocate a Contact element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_content_disposition.h   osip_content_disposition.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_CONTENT_DISPOSITION oSIP content-disposition definition. * @defgroup oSIP_CONTENT_DISPOSITION oSIP content-disposition definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Content-Disposition headers. * Structure for Content-Disposition headers.
* @defvar osip_content_disposition_t * @var osip_content_disposition_t
*/ */
typedef osip_call_info_t osip_content_disposition_t; typedef osip_call_info_t osip_content_disposition_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Content-Disposition element. * Allocate a Content-Disposition element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_content_encoding.h   osip_content_encoding.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_CONTENT_ENCODING oSIP content-encoding header definition. * @defgroup oSIP_CONTENT_ENCODING oSIP content-encoding header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Content-Encoding headers. * Structure for Content-Encoding headers.
* @defvar osip_content_encoding_t * @var osip_content_encoding_t
*/ */
typedef osip_content_length_t osip_content_encoding_t; typedef osip_content_length_t osip_content_encoding_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Content-Encoding element. * Allocate a Content-Encoding element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_content_length.h   osip_content_length.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 36 skipping to change at line 36
*/ */
/** /**
* @defgroup oSIP_CONTENT_LENGTH oSIP content-length definition. * @defgroup oSIP_CONTENT_LENGTH oSIP content-length definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Content-Length headers. * Structure for Content-Length headers.
* @defvar osip_content_length_t * @var osip_content_length_t
*/ */
typedef struct osip_content_length osip_content_length_t; typedef struct osip_content_length osip_content_length_t;
/**
* Definition of the Content-Length header.
* @struct osip_content_length
*/
struct osip_content_length struct osip_content_length
{ {
char *value; char *value; /**< value for Content-Length (size of attachments) */
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Content-Length element. * Allocate a Content-Length element.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 4 change blocks. 
5 lines changed or deleted 9 lines changed or added


 osip_content_type.h   osip_content_type.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_CONTENT_TYPE oSIP content-type header definition. * @defgroup oSIP_CONTENT_TYPE oSIP content-type header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Content-Type headers. * Structure for Content-Type headers.
* @defvar osip_content_type_t * @var osip_content_type_t
*/ */
typedef struct osip_content_type osip_content_type_t; typedef struct osip_content_type osip_content_type_t;
/**
* Definition of the Content-Type header.
* @struct osip_content_type
*/
struct osip_content_type struct osip_content_type
{ {
char *type; char *type; /**< Type of attachement */
char *subtype; char *subtype; /**< Sub-Type of attachement */
osip_list_t *gen_params; osip_list_t *gen_params; /**< Content-Type parameters */
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Content-Type element. * Allocate a Content-Type element.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 4 change blocks. 
7 lines changed or deleted 11 lines changed or added


 osip_cseq.h   osip_cseq.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 36 skipping to change at line 36
*/ */
/** /**
* @defgroup oSIP_CSEQ oSIP cseq header definition. * @defgroup oSIP_CSEQ oSIP cseq header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for CSeq headers. * Structure for CSeq headers.
* @defvar osip_cseq_t * @var osip_cseq_t
*/ */
typedef struct osip_cseq osip_cseq_t; typedef struct osip_cseq osip_cseq_t;
/**
* Definition of the CSeq header.
* @struct osip_cseq
*/
struct osip_cseq struct osip_cseq
{ {
char *method; char *method; /**< CSeq method */
char *number; char *number; /**< CSeq number */
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a CSeq element. * Allocate a CSeq element.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 4 change blocks. 
6 lines changed or deleted 10 lines changed or added


 osip_dialog.h   osip_dialog.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 29 skipping to change at line 29
#ifndef _DIALOG_H_ #ifndef _DIALOG_H_
#define _DIALOG_H_ #define _DIALOG_H_
#include <osip2/osip.h> #include <osip2/osip.h>
/** /**
* @file osip_dialog.h * @file osip_dialog.h
* @brief oSIP dialog Routines * @brief oSIP dialog Routines
* *
* Dialog management is a powerful facility given by oSIP. This feature is
* needed by SIP end point who has the capability to answer calls. (i.e.
* answering 200 OK to an INVITE).
* <BR>
* A Dialog is a context for a call establishment in oSIP. It's not useless
* to say that ONE invite request can lead to several call establishment.
* This can happen if your call has been forked by a proxy and several
* user agent was contacted and replied at the same time. It is true that
* this case won't probably happen several times a month...
* <BR>
* There is two ways of creating a dialog. In one case, you are the CALLER
* and in the other case, you will be the CALLEE.
* <UL>
* <LI>Creating a dialog as a CALLER
* <BR>In this case, you have to create a dialog each time you receive
* an answer with a code between 101 and 299. The best place in oSIP to
* actually create a dialog is of course in the callback that announce
* such SIP messages. Of course, each time you receive a response, you have
* to check for an existing dialog associated to this INVITE that can have
* been created by earlier SIP answer coming from the same User Agent. The
* code in the callback will look like the following:
* <BR> void cb_rcv1xx(osip_transaction_t *tr,osip_message_t *sip)
* <BR> {
* <BR> osip_dialog_t *dialog;
* <BR> if (MSG_IS_RESPONSEFOR(sip, "INVITE")&&!MSG_TEST_CODE(sip, 100))
{
* <BR> dialog = my_application_search_existing_dialog(sip);
* <BR> if (dialog==NULL) //NO EXISTING DIALOG
* <BR> {
* <BR> i = osip_dialog_init_as_uac(&dialog, sip);
* <BR> my_application_add_existing_dialog(dialog);
* <BR> }
* <BR> } else {
* <BR> // no dialog establishment for other REQUEST
* <BR> }
* </LI>
* <LI>Creating a dialog as a CALLEE
* <BR>In this case, you will have to create a dialog upon receiving the fi
rst
* transmission of the INVITE request. The correct place to do that is insi
de
* the callback previously registered to announce new INVITE. First, you wi
ll
* build a SIP answer like 180 or 200 and you'll be able to create a dialog
* by calling the following code:
* <BR>osip_dialog_t *dialog;
* <BR>osip_dialog_init_as_uas(&dialog, original_invite, response_that_you_
build);
* <BR>To make things working, you MUST create a VALID response: do not
* forget to create a new tag and put it in the 'To' header. The dialog
* management heavily depends on this tag.
* </LI>
* </UL>
* <P>The dialog management is compliant with the latest SIP draft
* (rfc2543bis-09). It should handle successfully most cases where
* a remote UA is not compliant (no tag in the To of a final response!)
* But for example, if you receive 2 answers from 2 uncompliant
* UA, they will be detected as being related to the same dialog...
* Do not change any code in oSIP or in your application... instead, you
* should boycott such implementation. :-
*/ */
/** /**
* @defgroup oSIP_DIALOG oSIP dialog Handling * @defgroup oSIP_DIALOG oSIP dialog Handling
* @ingroup oSIP
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef DOXYGEN #ifndef DOXYGEN
typedef enum _osip_dialog_type_t typedef enum _osip_dialog_type_t
skipping to change at line 114 skipping to change at line 58
#endif #endif
/** /**
* Structure for referencing a dialog. * Structure for referencing a dialog.
* @var osip_dialog_t * @var osip_dialog_t
*/ */
typedef struct osip_dialog osip_dialog_t; typedef struct osip_dialog osip_dialog_t;
/** /**
* Structure for referencing a dialog. * Structure for referencing a dialog.
* @struct osip_dialog
*/ */
struct osip_dialog struct osip_dialog
{ {
/* char *dialog_id; ***implied*** *//* call-id:local_tag:remote-tag */ char *call_id; /**< Call-ID*/
char *call_id; char *local_tag; /**< local tag */
char *local_tag; char *remote_tag; /**< remote tag */
char *remote_tag; osip_list_t *route_set; /**< route set */
osip_list_t *route_set; int local_cseq; /**< last local cseq */
int local_cseq; int remote_cseq; /**< last remote cseq*/
int remote_cseq; osip_to_t *remote_uri; /**< remote_uri */
osip_to_t *remote_uri; osip_from_t *local_uri; /**< local_uri */
osip_from_t *local_uri; osip_contact_t *remote_contact_uri; /**< remote contact_uri */
osip_contact_t *remote_contact_uri; int secure; /**< use secure transport layer */
int secure;
/* type of dialog (CALLEE or CALLER) */ osip_dialog_type_t type; /**< type of dialog (CALLEE or CAL
osip_dialog_type_t type; LER) */
state_t state; /* DIALOG_EARLY || DIALOG_CONFIRMED || DIALO state_t state; /**< DIALOG_EARLY || DIALOG_CONFIR
G_CLOSED */ MED || DIALOG_CLOSED */
void *your_instance; /**< for application data referenc
e */
}; };
/** /**
* Link osip dialog to application
* @param dialog The osip dialog
* @param instance The application instance
*/
#define osip_dialog_set_instance(dialog,instance) (dialog)->your_instance =
(void*)(instance)
/**
* Retrieve application instance from dialog
* @param dialog The osip dialog
* @param instance The application instance
*/
#define osip_dialog_get_instance(dialog) (dialog)->your_instance
/**
* Allocate a osip_dialog_t element as a UAC. * Allocate a osip_dialog_t element as a UAC.
* <UL><LI>NOTE1: Only INVITE transactions can create a dialog.</LI> * NOTE1: The dialog should be created when the first response is received.
* <LI>NOTE2: The dialog should be created when the first response is recei * (except for a 100 Trying)
ved. * NOTE2: Remote UA should be compliant! If not (not tag in the to header?)
* (except for a 100 Trying)</LI>
* <LI>NOTE3: Remote UA should be compliant! If not (not tag in the to head
er?)
* the old mechanism is used to match the request but if 2 uncomplia nt * the old mechanism is used to match the request but if 2 uncomplia nt
* UA both answer 200 OK for the same transaction, they won't be det ected. * UA both answer 200 OK for the same transaction, they won't be det ected.
* This is a major BUG in the old rfc.</LI></UL> * This is a major BUG in the old rfc.
* @param dialog The element to allocate. * @param dialog The element to allocate.
* @param response The response containing the informations. * @param response The response containing the informations.
*/ */
int osip_dialog_init_as_uac (osip_dialog_t ** dialog, int osip_dialog_init_as_uac (osip_dialog_t ** dialog,
osip_message_t * response); osip_message_t * response);
/** /**
* Allocate a osip_dialog_t element as a UAC. * Allocate a osip_dialog_t element as a UAC.
* <UL><LI>This could be used to initiate dialog with a NOTIFY coming * <UL><LI>This could be used to initiate dialog with a NOTIFY coming
* before the answer for a subscribe has reached us.</LI> * before the answer for a subscribe has reached us.</LI></UL>
* @param dialog The element to allocate. * @param dialog The element to allocate.
* @param next_request The response containing the informations. * @param next_request The response containing the informations.
* @param local_cseq The local cseq * @param local_cseq The local cseq
*/ */
int osip_dialog_init_as_uac_with_remote_request (osip_dialog_t ** dialog, int osip_dialog_init_as_uac_with_remote_request (osip_dialog_t ** dialog,
osip_message_t * osip_message_t *next_requ
next_request, est,
int local_cseq); int local_cseq);
/** /**
* Allocate a osip_dialog_t element as a UAS. * Allocate a osip_dialog_t element as a UAS.
* NOTE1: Only INVITE transactions can create a dialog. * NOTE1: The dialog should be created when the first response is sent.
* NOTE2: The dialog should be created when the first response is sent.
* (except for a 100 Trying) * (except for a 100 Trying)
* @param dialog The element to allocate. * @param dialog The element to allocate.
* @param invite The INVITE request containing some informations. * @param invite The INVITE request containing some informations.
* @param response The response containing other informations. * @param response The response containing other informations.
*/ */
int osip_dialog_init_as_uas (osip_dialog_t ** dialog, int osip_dialog_init_as_uas (osip_dialog_t ** dialog,
osip_message_t * invite, osip_message_t * invite,
osip_message_t * response); osip_message_t * response);
/** /**
* Free all resource in a osip_dialog_t element. * Free all resource in a osip_dialog_t element.
skipping to change at line 190 skipping to change at line 145
* This is useful to keep information on who is the initiator of the call. * This is useful to keep information on who is the initiator of the call.
* @param dialog The element to work on. * @param dialog The element to work on.
* @param type The type of dialog (CALLEE or CALLER). * @param type The type of dialog (CALLEE or CALLER).
*/ */
void osip_dialog_set_state (osip_dialog_t * dialog, state_t type); void osip_dialog_set_state (osip_dialog_t * dialog, state_t type);
/** /**
* Update the Route-Set as UAS of a dialog. * Update the Route-Set as UAS of a dialog.
* NOTE: bis-09 says that only INVITE transactions can update the route-set . * NOTE: bis-09 says that only INVITE transactions can update the route-set .
* NOTE: bis-09 says that updating the route-set means: update the contact * NOTE: bis-09 says that updating the route-set means: update the contact
* field only (AND NOT THE ROUTE-SET). This method follow this behavi our. * field only (AND NOT THE ROUTE-SET). This method follow this behavi our.
* NOTE: This method should be called for each request (except 100 Trying) * NOTE: This method should be called for each request
* received for a dialog. * received for a dialog.
* @param dialog The element to work on. * @param dialog The element to work on.
* @param invite The invite received. * @param invite The invite received.
*/ */
int osip_dialog_update_route_set_as_uas (osip_dialog_t * dialog, int osip_dialog_update_route_set_as_uas (osip_dialog_t * dialog,
osip_message_t * invite); osip_message_t * invite);
/** /**
* Update the CSeq (remote cseq) during a UAS transaction of a dialog. * Update the CSeq (remote cseq) during a UAS transaction of a dialog.
* NOTE: All INCOMING transactions MUST update the remote CSeq. * NOTE: All INCOMING transactions MUST update the remote CSeq.
* @param dialog The element to work on. * @param dialog The element to work on.
skipping to change at line 242 skipping to change at line 197
osip_message_t * response); osip_message_t * response);
/** /**
* Match a request (response sent??) received with a dialog. * Match a request (response sent??) received with a dialog.
* @param dialog The element to work on. * @param dialog The element to work on.
* @param request The request received. * @param request The request received.
*/ */
int osip_dialog_match_as_uas (osip_dialog_t * dialog, int osip_dialog_match_as_uas (osip_dialog_t * dialog,
osip_message_t * request); osip_message_t * request);
#ifndef DOXYGEN /**
* @internal
* Is dialog initiated by as CALLER
* @param dialog The element to work on.
*/
int osip_dialog_is_originator (osip_dialog_t * dialog); int osip_dialog_is_originator (osip_dialog_t * dialog);
/**
* @internal
* Is dialog initiated by as CALLEE
* @param dialog The element to work on.
*/
int osip_dialog_is_callee (osip_dialog_t * dialog); int osip_dialog_is_callee (osip_dialog_t * dialog);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/** @} */ /** @} */
#endif #endif
 End of changes. 16 change blocks. 
94 lines changed or deleted 54 lines changed or added


 osip_error_info.h   osip_error_info.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_ERROR_INFO oSIP error-info definition. * @defgroup oSIP_ERROR_INFO oSIP error-info definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Error-Info headers. * Structure for Error-Info headers.
* @defvar osip_error_info_t * @var osip_error_info_t
*/ */
typedef osip_call_info_t osip_error_info_t; typedef osip_call_info_t osip_error_info_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Error-Info element. * Allocate a Error-Info element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_fifo.h   osip_fifo.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
/** /**
* @file osip_fifo.h * @file osip_fifo.h
* @brief oSIP fifo Routines * @brief oSIP fifo Routines
* *
* This is a very simple implementation of a fifo. * This is a very simple implementation of a fifo.
* <BR>There is not much to say about it... * <BR>There is not much to say about it...
*/ */
/** /**
* @defgroup oSIP_FIFO oSIP fifo Handling * @defgroup oSIP_FIFO oSIP fifo Handling
* @ingroup oSIP * @ingroup osip2_port
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef DOXYGEN #ifndef DOXYGEN
#define MAX_LEN 1000 #define MAX_LEN 1000
typedef enum typedef enum
{ ok, plein, vide } { ok, plein, vide }
osip_fifo_etat; osip_fifo_etat;
#endif #endif
/** /**
* Structure for referencing a fifo. * Structure for referencing a fifo.
* @defvar osip_fifo_t * @var osip_fifo_t
*/ */
typedef struct osip_fifo osip_fifo_t; typedef struct osip_fifo osip_fifo_t;
/**
* Structure for referencing a fifo.
* @struct osip_fifo
*/
struct osip_fifo struct osip_fifo
{ {
#ifdef OSIP_MT #ifdef OSIP_MT
struct osip_mutex *qislocked; struct osip_mutex *qislocked; /**@internal */
struct osip_sem *qisempty; struct osip_sem *qisempty; /**@internal */
#endif #endif
osip_list_t *queue; osip_list_t *queue; /**< list of nodes containing elements *
int nb_elt; /
osip_fifo_etat etat; int nb_elt; /**< nb of elements */
osip_fifo_etat etat; /**@internal state of the fifo */
}; };
/** /**
* Initialise a osip_fifo_t element. * Initialise a osip_fifo_t element.
* NOTE: this element MUST be previously allocated. * NOTE: this element MUST be previously allocated.
* @param ff The element to initialise. * @param ff The element to initialise.
*/ */
void osip_fifo_init (osip_fifo_t * ff); void osip_fifo_init (osip_fifo_t * ff);
/** /**
* Free a fifo element. * Free a fifo element.
 End of changes. 6 change blocks. 
10 lines changed or deleted 15 lines changed or added


 osip_from.h   osip_from.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 39 skipping to change at line 39
*/ */
/** /**
* @defgroup oSIP_FROM oSIP from header definition. * @defgroup oSIP_FROM oSIP from header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for From headers. * Structure for From headers.
* @defvar osip_from_t * @var osip_from_t
*/ */
typedef struct osip_from osip_from_t; typedef struct osip_from osip_from_t;
/**
* Definition of the From header.
* @struct osip_from
*/
struct osip_from struct osip_from
{ {
char *displayname; char *displayname; /**< Display Name */
osip_uri_t *url; /* could contain various urischeme_t osip_uri_t *url; /**< url */
? only in the future */ osip_list_t *gen_params; /**< other From parameters */
osip_list_t *gen_params;
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a From element. * Allocate a From element.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 4 change blocks. 
8 lines changed or deleted 11 lines changed or added


 osip_header.h   osip_header.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc3261 -) The oSIP library implements the Session Initiation Protocol (SIP -rfc3261 -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 43 skipping to change at line 43
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for 'unknown' headers. * Structure for 'unknown' headers.
* NOTE: 'unknown' header' are used in oSIP for all header that are not * NOTE: 'unknown' header' are used in oSIP for all header that are not
* defined by oSIP in the osip_message_t structure. This means that all * defined by oSIP in the osip_message_t structure. This means that all
* 'unknown' header has to be handled with the API related to this * 'unknown' header has to be handled with the API related to this
* structure. * structure.
* @defvar osip_header_t * @var osip_header_t
*/ */
typedef struct osip_header osip_header_t; typedef struct osip_header osip_header_t;
/**
* Definition of a generic sip header.
* @struct osip_header
*/
struct osip_header struct osip_header
{ {
char *hname; char *hname; /**< Name of header */
char *hvalue; char *hvalue; /**< Value for header */
}; };
/** /**
* Structure for generic parameter headers. * Structure for generic parameter headers.
* Generic parameter are used in a lot of headers. (To, From, Route, * Generic parameter are used in a lot of headers. (To, From, Route,
* Record-Route...) All those headers use a common API but this is * Record-Route...) All those headers use a common API but this is
* hidden by MACROs that you can be found in smsg.h. * hidden by MACROs that you can be found in smsg.h.
* @defvar osip_cseq_t * @var osip_generic_param_t
*/ */
typedef osip_uri_param_t osip_generic_param_t; typedef osip_uri_param_t osip_generic_param_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a header element. * Allocate a header element.
 End of changes. 5 change blocks. 
5 lines changed or deleted 9 lines changed or added


 osip_headers.h   osip_headers.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 33 skipping to change at line 33
#include <osipparser2/osip_port.h> #include <osipparser2/osip_port.h>
#include <osipparser2/osip_const.h> #include <osipparser2/osip_const.h>
#include <osipparser2/osip_uri.h> #include <osipparser2/osip_uri.h>
#include <osipparser2/headers/osip_header.h> #include <osipparser2/headers/osip_header.h>
#include <osipparser2/headers/osip_accept.h> #include <osipparser2/headers/osip_accept.h>
#include <osipparser2/headers/osip_accept_encoding.h> #include <osipparser2/headers/osip_accept_encoding.h>
#include <osipparser2/headers/osip_accept_language.h> #include <osipparser2/headers/osip_accept_language.h>
#include <osipparser2/headers/osip_alert_info.h> #include <osipparser2/headers/osip_alert_info.h>
#include <osipparser2/headers/osip_allow.h> #include <osipparser2/headers/osip_allow.h>
#include <osipparser2/headers/osip_authentication_info.h>
#include <osipparser2/headers/osip_authorization.h> #include <osipparser2/headers/osip_authorization.h>
#include <osipparser2/headers/osip_call_id.h> #include <osipparser2/headers/osip_call_id.h>
#include <osipparser2/headers/osip_call_info.h> #include <osipparser2/headers/osip_call_info.h>
#include <osipparser2/headers/osip_contact.h> #include <osipparser2/headers/osip_contact.h>
#include <osipparser2/headers/osip_content_disposition.h> #include <osipparser2/headers/osip_content_disposition.h>
#include <osipparser2/headers/osip_content_encoding.h> #include <osipparser2/headers/osip_content_encoding.h>
#include <osipparser2/headers/osip_content_length.h> #include <osipparser2/headers/osip_content_length.h>
#include <osipparser2/headers/osip_content_type.h> #include <osipparser2/headers/osip_content_type.h>
#include <osipparser2/headers/osip_cseq.h> #include <osipparser2/headers/osip_cseq.h>
#include <osipparser2/headers/osip_error_info.h> #include <osipparser2/headers/osip_error_info.h>
#include <osipparser2/headers/osip_from.h> #include <osipparser2/headers/osip_from.h>
#include <osipparser2/headers/osip_mime_version.h> #include <osipparser2/headers/osip_mime_version.h>
#include <osipparser2/headers/osip_proxy_authenticate.h> #include <osipparser2/headers/osip_proxy_authenticate.h>
#include <osipparser2/headers/osip_proxy_authentication_info.h>
#include <osipparser2/headers/osip_proxy_authorization.h> #include <osipparser2/headers/osip_proxy_authorization.h>
#include <osipparser2/headers/osip_record_route.h> #include <osipparser2/headers/osip_record_route.h>
#include <osipparser2/headers/osip_route.h> #include <osipparser2/headers/osip_route.h>
#include <osipparser2/headers/osip_to.h> #include <osipparser2/headers/osip_to.h>
#include <osipparser2/headers/osip_via.h> #include <osipparser2/headers/osip_via.h>
#include <osipparser2/headers/osip_www_authenticate.h> #include <osipparser2/headers/osip_www_authenticate.h>
/** /**
* @file osip_headers.h * @file osip_headers.h
* @brief oSIP osip_headers definition. * @brief oSIP osip_headers definition.
*/ */
/** /**
* @defgroup oSIP_HEADERS oSIP headers definitions * @defgroup oSIP_HEADERS oSIP headers definitions
* @ingroup oSIP * @ingroup osip2_parser
* @{ * @{
*/ */
/** @} */ /** @} */
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 6 lines changed or added


 osip_list.h   osip_list.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 40 skipping to change at line 40
* *
* This is a very simple implementation of a linked list. * This is a very simple implementation of a linked list.
* <BR>There is not much to say about it... Except that it * <BR>There is not much to say about it... Except that it
* could be a lot improved. Sadly, it would be difficult * could be a lot improved. Sadly, it would be difficult
* to improve it without breaking the compatibility with * to improve it without breaking the compatibility with
* older version! * older version!
*/ */
/** /**
* @defgroup oSIP_LIST oSIP list Handling * @defgroup oSIP_LIST oSIP list Handling
* @ingroup oSIP
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef DOXYGEN #ifndef DOXYGEN
/** /**
* Structure for referencing a node in a osip_list_t element. * Structure for referencing a node in a osip_list_t element.
* @defvar __node_t * @var __node_t
*/ */
typedef struct __node __node_t; typedef struct __node __node_t;
/**
* Structure for referencing a node in a osip_list_t element.
* @struct __node
*/
struct __node struct __node
{ {
void *next; /* next __node_t */ void *next; /**< next __node_t containing elemen
void *element; t */
void *element; /**< element in Current node */
}; };
#endif #endif
/** /**
* Structure for referencing a list of elements. * Structure for referencing a list of elements.
* @defvar osip_list_t * @var osip_list_t
*/ */
typedef struct osip_list osip_list_t; typedef struct osip_list osip_list_t;
/**
* Structure for referencing a list of elements.
* @struct osip_list
*/
struct osip_list struct osip_list
{ {
int nb_elt; int nb_elt; /**< Number of element in the list */
__node_t *node; __node_t *node; /**< Next node containing element */
}; };
/** /**
* Initialise a osip_list_t element. * Initialise a osip_list_t element.
* NOTE: this element MUST be previously allocated. * NOTE: this element MUST be previously allocated.
* @param li The element to initialise. * @param li The element to initialise.
*/ */
int osip_list_init (osip_list_t * li); int osip_list_init (osip_list_t * li);
/** /**
 End of changes. 8 change blocks. 
10 lines changed or deleted 18 lines changed or added


 osip_md5.h   osip_md5.h 
skipping to change at line 50 skipping to change at line 50
#define PROTOTYPES 0 #define PROTOTYPES 0
#endif #endif
/* POINTER defines a generic pointer type */ /* POINTER defines a generic pointer type */
typedef unsigned char *POINTER; typedef unsigned char *POINTER;
/* UINT2 defines a two byte word */ /* UINT2 defines a two byte word */
typedef unsigned short int UINT2; typedef unsigned short int UINT2;
/* UINT4 defines a four byte word */ /* UINT4 defines a four byte word */
typedef unsigned long int UINT4; typedef unsigned int UINT4;
/* PROTO_LIST is defined depending on how PROTOTYPES is defined above. /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
returns an empty list. returns an empty list.
*/ */
#if PROTOTYPES #if PROTOTYPES
#define PROTO_LIST(list) list #define PROTO_LIST(list) list
#else #else
#define PROTO_LIST(list) () #define PROTO_LIST(list) ()
#endif #endif
/* MD5 context. */ /**
* Structure for holding MD5 context.
* @var MD5_CTX
*/
typedef struct typedef struct
{ {
UINT4 state[4]; /* state (ABCD) */ UINT4 state[4]; /* state (ABCD) */
UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) * / UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) * /
unsigned char buffer[64]; /* input buffer */ unsigned char buffer[64]; /* input buffer */
} }
MD5_CTX; MD5_CTX;
void MD5Init PROTO_LIST ((MD5_CTX *)); void MD5Init PROTO_LIST ((MD5_CTX *));
void MD5Update PROTO_LIST ((MD5_CTX *, unsigned char *, unsigned int)); void MD5Update PROTO_LIST ((MD5_CTX *, unsigned char *, unsigned int));
 End of changes. 2 change blocks. 
2 lines changed or deleted 5 lines changed or added


 osip_mime_version.h   osip_mime_version.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 39 skipping to change at line 39
*/ */
/** /**
* @defgroup oSIP_MIME_VERSION oSIP mime-version header definition. * @defgroup oSIP_MIME_VERSION oSIP mime-version header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Mime-Version headers. * Structure for Mime-Version headers.
* @defvar osip_mime_version_t * @var osip_mime_version_t
*/ */
typedef osip_content_length_t osip_mime_version_t; typedef osip_content_length_t osip_mime_version_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Mime-Version element. * Allocate a Mime-Version element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_mt.h   osip_mt.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 42 skipping to change at line 42
/** /**
* @file osip_mt.h * @file osip_mt.h
* @brief oSIP Thread, Mutex and Semaphore definitions * @brief oSIP Thread, Mutex and Semaphore definitions
* *
* Those methods are only available if the library is compile * Those methods are only available if the library is compile
* in multi threaded mode. This is the default for oSIP. * in multi threaded mode. This is the default for oSIP.
*/ */
/** /**
* @defgroup oSIP_THREAD oSIP Thread Routines * @defgroup oSIP_THREAD oSIP Thread Routines
* @ingroup oSIP * @ingroup osip2_port
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Structure for referencing a thread * Structure for referencing a thread
* @var osip_thread_t * @struct osip_thread
*/ */
struct osip_thread; struct osip_thread;
/** /**
* Allocate (or initialise if a thread address is given) * Allocate (or initialise if a thread address is given)
* @param stacksize The stack size of the thread. (20000 is a good value) * @param stacksize The stack size of the thread. (20000 is a good value)
* @param func The method where the thread start. * @param func The method where the thread start.
* @param arg A pointer on the argument given to the method 'func'. * @param arg A pointer on the argument given to the method 'func'.
*/ */
struct osip_thread *osip_thread_create (int stacksize, struct osip_thread *osip_thread_create (int stacksize,
skipping to change at line 91 skipping to change at line 91
void osip_thread_exit (void); void osip_thread_exit (void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/** @} */ /** @} */
/** /**
* @defgroup oSIP_SEMA oSIP semaphore definitions * @defgroup oSIP_SEMA oSIP semaphore definitions
* @ingroup oSIP * @ingroup osip2_port
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Structure for referencing a semaphore element. * Structure for referencing a semaphore element.
* @defvar struct osip_sem * @struct osip_sem
*/ */
struct osip_sem; struct osip_sem;
/** /**
* Allocate and Initialise a semaphore. * Allocate and Initialise a semaphore.
* @param value The initial value for the semaphore. * @param value The initial value for the semaphore.
*/ */
struct osip_sem *osip_sem_init (unsigned int value); struct osip_sem *osip_sem_init (unsigned int value);
/** /**
* Destroy a semaphore. * Destroy a semaphore.
skipping to change at line 142 skipping to change at line 142
int osip_sem_trywait (struct osip_sem *sem); int osip_sem_trywait (struct osip_sem *sem);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/** @} */ /** @} */
/** /**
* @defgroup oSIP_MUTEX oSIP semaphore definitions * @defgroup oSIP_MUTEX oSIP semaphore definitions
* @ingroup oSIP * @ingroup osip2_port
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Structure for referencing a semaphore element. * Structure for referencing a semaphore element.
* @defvar struct osip_mutex * @struct osip_mutex
*/ */
struct osip_mutex; struct osip_mutex;
/** /**
* Allocate and Initialise a semaphore. * Allocate and Initialise a semaphore.
*/ */
struct osip_mutex *osip_mutex_init (void); struct osip_mutex *osip_mutex_init (void);
/** /**
* Destroy the mutex. * Destroy the mutex.
* @param mut The mutex to destroy. * @param mut The mutex to destroy.
 End of changes. 7 change blocks. 
9 lines changed or deleted 9 lines changed or added


 osip_negotiation.h   osip_negotiation.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 26 skipping to change at line 26
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _SDP_NEGOC_H_ #ifndef _SDP_NEGOC_H_
#define _SDP_NEGOC_H_ #define _SDP_NEGOC_H_
#include <osipparser2/sdp_message.h> #include <osipparser2/sdp_message.h>
/** /**
* @internal
* @file osip_negotiation.h * @file osip_negotiation.h
* @brief oSIP and SDP offer/answer model Routines * @brief oSIP and SDP offer/answer model Routines
* *
* The SDP offer/answer model is where most SIP interoperability issue
* comes from. The SDP specification (rfc2327.txt) is often not fully
* respected. As an example, most SIP applications forget to add the
* mandatory 's' field in the SDP packet. Another mistake is to assume
* that an SDP packet don't need a 'p' and a 'e' field. Even if they
* are both optional, at least of those is mandatory! I have never
* seen ONE implementation that send at least one 'p' or 'e' field!!
* <BR>For all the reasons, that make negotiation a hard task, I have
* decided to provide a helpful facility to build SDP answer from an
* SDP offer. (This facility does not help to build the compliant offer)
* Of course, after the SDP negotiator has been executed and produced
* a valid response, you can still modify your SDP answer to add
* attributes or modify anything. You always keep the entire control
* over it.
* <H2>Do you need the negotiator</H2>
* If you are planning a simple application, I advise you to use it.
* Advanced applications may find it inappropriate, but as you can
* modify the SDP answer after running the negotiation, I see no reason
* why you should not use it. The only goal of the SDP negotiator is
* to make sure only one line of audio codec is accepted (the first one)
* and only one line of video codec is accepted (the first one). It
* also remove from the media lines, the codec that you don't support
* without asking you. (Also, you can still refuse the codec you support.)
* <BR>Using the negotiator, your only task is to check/add/remove
* the media attributes.
*
* <H2>How-To</H2>
* Using the SDP negotiator is simple. An example is provided in the
* test directory as 'torture_sdp.c'. It parses a SDP packet from
* a file (a sample is available in conf/) and produce the answer
* that would be made with a basic configuration where 4 audio codecs
* are supported.
* <BR>When starting your application, you simply configure the global
* osip_negotiation_t element: you'll set you username, ip address and some
* general informations about you that every SDP packet must contain.
* As a second action, you will register all the codec you support.
* (audio, video and 'other' codecs).
* <BR>After that, you will also register a set of method used to
* accept the codec. The return code of those method will accept or
* refused the supported codec for this specific session.
* <pre><code>
* osip_negotiation_set_fcn_accept_audio_codec(&application_accept_audio_c
odec);
* osip_negotiation_set_fcn_accept_video_codec(&application_accept_video_c
odec);
* osip_negotiation_set_fcn_accept_other_codec(&application_accept_other_c
odec);
* osip_negotiation_set_fcn_get_audio_port(&application_get_audio_port);
* </pre></code>
* <BR>When you need to create an answer, the following code will create
* the SDP packet:
* <pre><code>
* osip_negotiation_ctx_t *context;
*
* sdp_message_t *dest;
* i = osip_negotiation_ctx_init(&context);
* i = osip_negotiation_ctx_set_mycontext(context, (void *)ua_context);
* i = osip_negotiation_ctx_set_remote_sdp(context, sdp);
* if (i!=0) {
* fprintf(stdout, "Initialisation of context failed. Could not negociat
e");
* } else {
* fprintf(stdout, "Trying to execute a SIP negotiation:");
* i = osip_negotiation_ctx_execute_negotiation(context);
* fprintf(stdout, "return code: %i",i);
* if (i==200)
* {
* dest = osip_negotiation_ctx_get_local_sdp(context);
* fprintf(stdout, "SDP answer:");
* i = sdp_message_to_str(dest, &result);
* if (i!=0)
* fprintf(stdout, "Error found in SDP answer while printing");
* else
* fprintf(stdout, "%s", result);
* osip_free(result);
* }
* osip_negotiation_ctx_free(context);
* osip_free(context);
* return 0;
* }
* </pre></code>
* <BR>Notice the presence of osip_negotiation_ctx_set_mycontext() which ca
n add
* a store the address of your own context (probably related to your call).
* This is very useful if you need to know inside the callback which call
* this negotiation belongs to.
*/ */
/** /**
* @internal
* @defgroup oSIP_OAM oSIP and SDP offer/answer model Handling * @defgroup oSIP_OAM oSIP and SDP offer/answer model Handling
* @ingroup oSIP
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Structure for applying the SDP offer/answer negotiation. * Structure for applying the SDP offer/answer negotiation.
* The goal is simply to give: * The goal is simply to give:
* 1. A configuration (osip_negotiation_t) * 1. A configuration (osip_negotiation_t)
* 2. A remote SDP packet (generally from the INVITE) * 2. A remote SDP packet (generally from the INVITE)
* The result is the creation of a local answer to * The result is the creation of a local answer to
* the remote SDP packet. * the remote SDP packet.
* @defvar osip_negotiation_ctx_t * @var osip_negotiation_ctx_t
*/ */
typedef struct osip_negotiation_ctx osip_negotiation_ctx_t; typedef struct osip_negotiation_ctx osip_negotiation_ctx_t;
/**
* Structure for applying the SDP offer/answer negotiation.
* @struct osip_negotiation_ctx
*/
struct osip_negotiation_ctx struct osip_negotiation_ctx
{ {
void *mycontext; /* add the pointer to your personal context void *mycontext; /**< User Defined Pointer */
*/ sdp_message_t *remote; /**< Remote SDP offer */
sdp_message_t *remote; sdp_message_t *local; /**< generated SDP answer */
sdp_message_t *local;
}; };
/** /**
* Allocate a negotiation context. * Allocate a negotiation context.
* @param ctx The element to work on. * @param ctx The element to work on.
*/ */
int osip_negotiation_ctx_init (osip_negotiation_ctx_t ** ctx); int osip_negotiation_ctx_init (osip_negotiation_ctx_t ** ctx);
/** /**
* Free a negotiation context. * Free a negotiation context.
* @param ctx The element to work on. * @param ctx The element to work on.
skipping to change at line 206 skipping to change at line 130
* The information you store here is used when computing a * The information you store here is used when computing a
* remote SDP packet to build a compliant answer. * remote SDP packet to build a compliant answer.
* The main objectives is to: * The main objectives is to:
* * automaticly refuse unknown media. * * automaticly refuse unknown media.
* * accept some of the known media. * * accept some of the known media.
* * make sure the SDP answer match the SDP offer. * * make sure the SDP answer match the SDP offer.
* * simplify the SDP offer/answer model, as all unknown media * * simplify the SDP offer/answer model, as all unknown media
* are refused without any indication to the application layer. * are refused without any indication to the application layer.
* * In any case, you can still modify the entire SDP packet after * * In any case, you can still modify the entire SDP packet after
* a negotiation if you are not satisfied by the negotiation result. * a negotiation if you are not satisfied by the negotiation result.
* @defvar osip_negotiation_t * @var osip_negotiation_t
*/ */
typedef struct osip_negotiation osip_negotiation_t; typedef struct osip_negotiation osip_negotiation_t;
/**
* Structure for storing the global configuration management.
* @struct osip_negotiation
*/
struct osip_negotiation struct osip_negotiation
{ {
char *o_username; char *o_username; /**< username */
char *o_session_id; char *o_session_id; /**< session identifier */
char *o_session_version; char *o_session_version; /**< session version */
char *o_nettype; char *o_nettype; /**< Network Type */
char *o_addrtype; char *o_addrtype; /**< Address type */
char *o_addr; char *o_addr; /**< Address */
char *c_nettype; char *c_nettype; /**< Network Type */
char *c_addrtype; char *c_addrtype; /**< Address Type */
char *c_addr; char *c_addr; /**< Address */
char *c_addr_multicast_ttl; char *c_addr_multicast_ttl; /**< TTL value for multicast address *
char *c_addr_multicast_int; /
char *c_addr_multicast_int; /**< Nb of address for multicast */
osip_list_t *audio_codec; osip_list_t *audio_codec; /**< supported audio codec */
osip_list_t *video_codec; osip_list_t *video_codec; /**< supported video codec */
osip_list_t *other_codec; osip_list_t *other_codec; /**< supported application */
int (*fcn_set_info) (void *, sdp_message_t *); int (*fcn_set_info) (void *, sdp_message_t *); /**< callback for info
int (*fcn_set_uri) (void *, sdp_message_t *); */
int (*fcn_set_uri) (void *, sdp_message_t *); /**< callback for uri
*/
int (*fcn_set_emails) (void *, sdp_message_t *); int (*fcn_set_emails) (void *, sdp_message_t *); /**< callback for emai
int (*fcn_set_phones) (void *, sdp_message_t *); l */
int (*fcn_set_attributes) (void *, sdp_message_t *, int); int (*fcn_set_phones) (void *, sdp_message_t *); /**< callback for phon
int (*fcn_accept_audio_codec) (void *, char *, char *, int, char *); es */
int (*fcn_accept_video_codec) (void *, char *, char *, int, char *); int (*fcn_set_attributes) (void *, sdp_message_t *, int); /**< callback
int (*fcn_accept_other_codec) (void *, char *, char *, char *, char *); for attr */
char *(*fcn_get_audio_port) (void *, int); int (*fcn_accept_audio_codec) (void *, char *, char *, int, char *); /*
char *(*fcn_get_video_port) (void *, int); *< callback to accept audio codec during negotiation */
char *(*fcn_get_other_port) (void *, int); int (*fcn_accept_video_codec) (void *, char *, char *, int, char *); /*
*< callback to accept video codec during negotiation */
int (*fcn_accept_other_codec) (void *, char *, char *, char *, char *);
/**< callback to accept application during negotiation */
char *(*fcn_get_audio_port) (void *, int); /**< get port for audio st
ream */
char *(*fcn_get_video_port) (void *, int); /**< get port for video st
ream */
char *(*fcn_get_other_port) (void *, int); /**< get port for app stre
am */
}; };
/** /**
* Initialise (and Allocate) a sdp_config element (this element is global). * Initialise (and Allocate) a sdp_config element (this element is global).
* Stores the initialized structure to conf_out. * Stores the initialized structure to conf_out.
*/ */
int osip_negotiation_init (osip_negotiation_t ** conf_out); int osip_negotiation_init (osip_negotiation_t ** conf_out);
/** /**
* Free resource stored by a sdp_config element. * Free resource stored by a sdp_config element.
skipping to change at line 531 skipping to change at line 459
* callbacks will be called. You can modify, add, remove SDP fields, * callbacks will be called. You can modify, add, remove SDP fields,
* and accept and refuse the codec from your preferred list by using * and accept and refuse the codec from your preferred list by using
* those callbacks. * those callbacks.
* Of course, after the negotiation happen, you can modify the * Of course, after the negotiation happen, you can modify the
* SDP packet if you wish to improve it or just refine some attributes. * SDP packet if you wish to improve it or just refine some attributes.
* @param ctx The context holding the remote SDP offer. * @param ctx The context holding the remote SDP offer.
*/ */
int osip_negotiation_ctx_execute_negotiation (osip_negotiation_t *, int osip_negotiation_ctx_execute_negotiation (osip_negotiation_t *,
osip_negotiation_ctx_t * ctx ); osip_negotiation_ctx_t * ctx );
/** Put the SDP message on hold in outgoing invite
* @param ctx The element to work on.
* @param sdp The sdp message to build.
* @param audio_port The port for audio stream.
* @param video_port The port for video stream.
*/
int osip_negotiation_sdp_build_offer (osip_negotiation_t *, int osip_negotiation_sdp_build_offer (osip_negotiation_t *,
osip_negotiation_ctx_t * con, osip_negotiation_ctx_t * ctx,
sdp_message_t ** sdp, sdp_message_t ** sdp,
char *audio_port, char *video_port); char *audio_port, char *video_port);
/**
*@internal
*/
int __osip_negotiation_sdp_build_offer (osip_negotiation_t *, int __osip_negotiation_sdp_build_offer (osip_negotiation_t *,
osip_negotiation_ctx_t * con, osip_negotiation_ctx_t * ctx,
sdp_message_t ** sdp, sdp_message_t ** sdp,
char *audio_port, char *video_port , char *audio_port, char *video_port ,
char *audio_codec, char *audio_codec,
char *video_codec); char *video_codec);
/* for non "on-hold sdp" in outgoing invite */ /** Put the SDP message on hold in outgoing invite
* @param sdp The sdp message to modify.
*/
int osip_negotiation_sdp_message_put_on_hold (sdp_message_t * sdp); int osip_negotiation_sdp_message_put_on_hold (sdp_message_t * sdp);
/* for an "on hold sdp" in outgoing invite */
/** Put the SDP message off hold in outgoing invite
* @param sdp The sdp message to modify.
*/
int osip_negotiation_sdp_message_put_off_hold (sdp_message_t * sdp); int osip_negotiation_sdp_message_put_off_hold (sdp_message_t * sdp);
/** @} */ /**
* @internal
* @}
*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /*_SDP_NEGOC_H_ */ #endif /*_SDP_NEGOC_H_ */
 End of changes. 22 change blocks. 
126 lines changed or deleted 77 lines changed or added


 osip_parser.h   osip_parser.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 33 skipping to change at line 33
#include <osipparser2/osip_message.h> #include <osipparser2/osip_message.h>
/** /**
* @file osip_parser.h * @file osip_parser.h
* @brief oSIP SIP Parser additionnal Routines * @brief oSIP SIP Parser additionnal Routines
* *
*/ */
/** /**
* @defgroup oSIP_PARSER oSIP parser Handling * @defgroup oSIP_PARSER oSIP parser Handling
* @ingroup oSIP * @ingroup osip2_parser
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Initialise the oSIP parser. * Initialise the oSIP parser.
skipping to change at line 151 skipping to change at line 151
int osip_message_set_allow (osip_message_t * sip, const char *hvalue); int osip_message_set_allow (osip_message_t * sip, const char *hvalue);
/** /**
* Get one Allow header. * Get one Allow header.
* @param sip The element to work on. * @param sip The element to work on.
* @param pos The index of the element to get. * @param pos The index of the element to get.
* @param dest A pointer on the header found. * @param dest A pointer on the header found.
*/ */
int osip_message_get_allow (const osip_message_t * sip, int pos, int osip_message_get_allow (const osip_message_t * sip, int pos,
osip_allow_t ** dest); osip_allow_t ** dest);
/** /**
* Set the Authentication-info header.
* @param sip The element to work on.
* @param hvalue The string describing the element.
*/
int osip_message_set_authentication_info (osip_message_t * sip, const cha
r *hvalue);
/**
* Get one Authentication-info header.
* @param sip The element to work on.
* @param pos The index of the element to get.
* @param dest A pointer on the header found.
*/
int osip_message_get_authentication_info (const osip_message_t * sip, int
pos,
osip_authentication_info_t ** dest);
/**
* Set the Authorization header. * Set the Authorization header.
* @param sip The element to work on. * @param sip The element to work on.
* @param hvalue The string describing the element. * @param hvalue The string describing the element.
*/ */
int osip_message_set_authorization (osip_message_t * sip, int osip_message_set_authorization (osip_message_t * sip,
const char *hvalue); const char *hvalue);
/** /**
* Get one Authorization header. * Get one Authorization header.
* @param sip The element to work on. * @param sip The element to work on.
* @param pos The index of the element to get. * @param pos The index of the element to get.
skipping to change at line 345 skipping to change at line 359
* Get one Proxy-authorization header. * Get one Proxy-authorization header.
* @param sip The element to work on. * @param sip The element to work on.
* @param pos The index of the element to get. * @param pos The index of the element to get.
* @param dest A pointer on the header found. * @param dest A pointer on the header found.
*/ */
int osip_message_get_proxy_authorization (const osip_message_t * sip, int osip_message_get_proxy_authorization (const osip_message_t * sip,
int pos, int pos,
osip_proxy_authorization_t ** osip_proxy_authorization_t **
dest); dest);
/** /**
* Set the Proxy-authentication-info header.
* @param sip The element to work on.
* @param hvalue The string describing the element.
*/
int osip_message_set_proxy_authentication_info (osip_message_t * sip,
const char *hvalue);
/**
* Get the Proxy-authentication-info header.
* @param sip The element to work on.
* @param pos The index of the element to get.
* @param dest A pointer on the header found.
*/
int osip_message_get_proxy_authentication_info (const osip_message_t * si
p,
int pos,
osip_proxy_authentication_info_t ** de
st);
/**
* Set the Record-Route header. * Set the Record-Route header.
* @param sip The element to work on. * @param sip The element to work on.
* @param hvalue The string describing the element. * @param hvalue The string describing the element.
*/ */
int osip_message_set_record_route (osip_message_t * sip, int osip_message_set_record_route (osip_message_t * sip,
const char *hvalue); const char *hvalue);
/** /**
* Get one Record-route header. * Get one Record-route header.
* @param sip The element to work on. * @param sip The element to work on.
* @param pos The index of the element to get. * @param pos The index of the element to get.
skipping to change at line 459 skipping to change at line 489
* @param sip The element to work on. * @param sip The element to work on.
* @param pos The index of the element to get. * @param pos The index of the element to get.
* @param dest A pointer on the header found. * @param dest A pointer on the header found.
*/ */
int osip_message_get_header (const osip_message_t * sip, int pos, int osip_message_get_header (const osip_message_t * sip, int pos,
osip_header_t ** dest); osip_header_t ** dest);
/** /**
* Set the Body of the SIP message. * Set the Body of the SIP message.
* @param sip The element to work on. * @param sip The element to work on.
* @param buf The string containing the body. * @param buf The buffer containing the body.
* @param length The length of the buffer.
*/ */
int osip_message_set_body (osip_message_t * sip, const char *buf); int osip_message_set_body (osip_message_t * sip, const char *buf, size_t length);
/** /**
* Set a type for a body. (NOT TESTED! use with care) * Set the Body of the SIP message. (please report bugs)
* @param sip The element to work on. * @param sip The element to work on.
* @param buf the mime type of body. * @param buf the buffer containing the body.
* @param length The length of the buffer.
*/ */
int osip_message_set_body_mime (osip_message_t * sip, const char *buf); int osip_message_set_body_mime (osip_message_t * sip, const char *buf, si ze_t length);
/** /**
* Get one body header. * Get one body header.
* @param sip The element to work on. * @param sip The element to work on.
* @param pos The index of the element to get. * @param pos The index of the element to get.
* @param dest A pointer on the body found. * @param dest A pointer on the body found.
*/ */
int osip_message_get_body (const osip_message_t * sip, int pos, int osip_message_get_body (const osip_message_t * sip, int pos,
osip_body_t ** dest); osip_body_t ** dest);
/* trace facilities */ /* trace facilities */
 End of changes. 9 change blocks. 
9 lines changed or deleted 45 lines changed or added


 osip_port.h   osip_port.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 149 skipping to change at line 149
extern "C" extern "C"
{ {
#endif #endif
/**************************/ /**************************/
/* MALLOC redirections */ /* MALLOC redirections */
/**************************/ /**************************/
#ifndef WIN32 #ifndef WIN32
typedef void *osip_malloc_func_t(size_t size);
typedef void osip_free_func_t(void *ptr);
typedef void *osip_realloc_func_t(void *ptr, size_t size);
extern osip_malloc_func_t *osip_malloc_func;
extern osip_realloc_func_t *osip_realloc_func;
extern osip_free_func_t *osip_free_func;
void osip_set_allocators(osip_malloc_func_t *malloc_func,
osip_realloc_func_t *realloc_func,
osip_free_func_t *free_func);
#ifndef osip_malloc #ifndef osip_malloc
#define osip_malloc(S) malloc(S) #define osip_malloc(S) (osip_malloc_func?osip_malloc_func(S):malloc(S))
#endif
#ifndef osip_realloc
#define osip_realloc(P,S) (osip_realloc_func?osip_realloc_func(P,S):realloc
(P,S))
#endif #endif
#ifndef osip_free #ifndef osip_free
#define osip_free(P) { if (P!=NULL) free(P); } #define osip_free(P) { if (P!=NULL) { if (osip_free_func) osip_free_func(P) ; else free(P);} }
#endif #endif
#else #else
void *osip_malloc(size_t size); void *osip_malloc(size_t size);
void *osip_realloc(void *, size_t size);
void osip_free(void *); void osip_free(void *);
#endif #endif
#ifdef WIN32 #ifdef WIN32
#define alloca _alloca #define alloca _alloca
#endif #endif
/**************************/ /**************************/
/* RANDOM number support */ /* RANDOM number support */
/**************************/ /**************************/
skipping to change at line 230 skipping to change at line 246
TRACE_LEVEL5 = 5, TRACE_LEVEL5 = 5,
#define OSIP_INFO2 5 #define OSIP_INFO2 5
TRACE_LEVEL6 = 6, TRACE_LEVEL6 = 6,
#define OSIP_INFO3 6 #define OSIP_INFO3 6
TRACE_LEVEL7 = 7, TRACE_LEVEL7 = 7,
#define OSIP_INFO4 7 #define OSIP_INFO4 7
END_TRACE_LEVEL = 8 END_TRACE_LEVEL = 8
} }
osip_trace_level_t; osip_trace_level_t;
typedef void osip_trace_func_t(char *fi, int li, osip_trace_level_t level,
char *chfr, va_list ap);
/* these are defined in all cases, but are empty when oSIP is compiled /* these are defined in all cases, but are empty when oSIP is compiled
without trace */ without trace */
void osip_trace_initialize_func (osip_trace_level_t level, osip_trace_fun c_t *func);
void osip_trace_initialize_syslog (osip_trace_level_t level, char *ident) ; void osip_trace_initialize_syslog (osip_trace_level_t level, char *ident) ;
void osip_trace_initialize (osip_trace_level_t level, FILE * file); void osip_trace_initialize (osip_trace_level_t level, FILE * file);
void osip_trace_enable_until_level (osip_trace_level_t level);
void osip_trace_enable_level (osip_trace_level_t level); void osip_trace_enable_level (osip_trace_level_t level);
void osip_trace_disable_level (osip_trace_level_t level); void osip_trace_disable_level (osip_trace_level_t level);
int osip_is_trace_level_activate (osip_trace_level_t level); int osip_is_trace_level_activate (osip_trace_level_t level);
#ifndef ENABLE_TRACE #ifndef ENABLE_TRACE
#define TRACE_INITIALIZE(level, file) do { } while (0) #define TRACE_INITIALIZE(level, file) do { } while (0)
#define TRACE_ENABLE_LEVEL(level) do { } while (0) #define TRACE_ENABLE_LEVEL(level) do { } while (0)
#define TRACE_DISABLE_LEVEL(level) do { } while (0) #define TRACE_DISABLE_LEVEL(level) do { } while (0)
#define IS_TRACE_LEVEL_ACTIVATE(level) (-1) #define IS_TRACE_LEVEL_ACTIVATE(level) (-1)
 End of changes. 8 change blocks. 
5 lines changed or deleted 27 lines changed or added


 osip_proxy_authenticate.h   osip_proxy_authenticate.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_PROXY_AUTHENTICATE oSIP proxy-authenticate header definit ion. * @defgroup oSIP_PROXY_AUTHENTICATE oSIP proxy-authenticate header definit ion.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Proxy-Authenticate headers. * Structure for Proxy-Authenticate headers.
* @defvar osip_proxy_authenticate_t * @var osip_proxy_authenticate_t
*/ */
typedef osip_www_authenticate_t osip_proxy_authenticate_t; typedef osip_www_authenticate_t osip_proxy_authenticate_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Proxy-Authenticate element. * Allocate a Proxy-Authenticate element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_proxy_authorization.h   osip_proxy_authorization.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_PROXY_AUTHORIZATION oSIP proxy-authorization header defin ition. * @defgroup oSIP_PROXY_AUTHORIZATION oSIP proxy-authorization header defin ition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Proxy-Authorization headers. * Structure for Proxy-Authorization headers.
* @defvar osip_proxy_authorization_t * @var osip_proxy_authorization_t
*/ */
typedef osip_authorization_t osip_proxy_authorization_t; typedef osip_authorization_t osip_proxy_authorization_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Proxy-Authorization element. * Allocate a Proxy-Authorization element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_record_route.h   osip_record_route.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 37 skipping to change at line 37
* @brief oSIP osip_record_route header definition. * @brief oSIP osip_record_route header definition.
*/ */
/** /**
* @defgroup oSIP_RECORD_ROUTE oSIP record-route header definition. * @defgroup oSIP_RECORD_ROUTE oSIP record-route header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Route headers. * Structure for Record-Route headers.
* @defvar osip_route_t * @var osip_record_route_t
*/ */
typedef osip_from_t osip_record_route_t; typedef osip_from_t osip_record_route_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Record-Route element. * Allocate a Record-Route element.
 End of changes. 2 change blocks. 
5 lines changed or deleted 5 lines changed or added


 osip_rfc3264.h   osip_rfc3264.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc3261 -) The oSIP library implements the Session Initiation Protocol (SIP -rfc3261 -)
Copyright (C) 2001,2002,2003 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 32 skipping to change at line 32
#include <osipparser2/osip_list.h> #include <osipparser2/osip_list.h>
#include <osipparser2/sdp_message.h> #include <osipparser2/sdp_message.h>
/** /**
* @file osip_rfc3264.h * @file osip_rfc3264.h
* @brief oSIP sdp negotiation facility. * @brief oSIP sdp negotiation facility.
*/ */
/** /**
* @defgroup oSIP_SDP oSIP sdp negotiation facility. * @defgroup oSIP_rfc3264 oSIP sdp negotiation facility.
* @ingroup oSIP * @ingroup osip2_sdp
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Structure to hold support for codecs. * Structure to hold support for codecs.
* @defvar osip_rfc3264 * @struct osip_rfc3264
*/ */
struct osip_rfc3264; struct osip_rfc3264;
/**
* Maximum number of supported audio payload.
* @def MAX_AUDIO_CODECS
*/
#define MAX_AUDIO_CODECS 100 #define MAX_AUDIO_CODECS 100
/**
* Maximum number of supported video payload.
* @def MAX_VIDEO_CODECS
*/
#define MAX_VIDEO_CODECS 100 #define MAX_VIDEO_CODECS 100
/**
* Maximum number of supported t38 config.
* @def MAX_T38_CODECS
*/
#define MAX_T38_CODECS 2 #define MAX_T38_CODECS 2
/**
* Maximum number of supported application config.
* @def MAX_APP_CODECS
*/
#define MAX_APP_CODECS 100 #define MAX_APP_CODECS 100
/** /**
* Initialize negotiation facility.. * Initialize negotiation facility..
* @param config The element to work on. * @param config The element to work on.
*/ */
int osip_rfc3264_init (struct osip_rfc3264 **config); int osip_rfc3264_init (struct osip_rfc3264 **config);
/** /**
* Free negotiation facility. * Free negotiation facility.
skipping to change at line 95 skipping to change at line 111
/** /**
* Remove all medias from the configuration. * Remove all medias from the configuration.
* @param config The element to work on. * @param config The element to work on.
*/ */
int osip_rfc3264_reset_media (struct osip_rfc3264 *config); int osip_rfc3264_reset_media (struct osip_rfc3264 *config);
/** /**
* Add a media in the configuration. * Add a media in the configuration.
* @param config The element to work on. * @param config The element to work on.
* @param med The media element to add.
* @param pos The index of the media element to add. * @param pos The index of the media element to add.
*/ */
int osip_rfc3264_add_audio_media (struct osip_rfc3264 *config, sdp_media_ t *med, int pos); int osip_rfc3264_add_audio_media (struct osip_rfc3264 *config, sdp_media_ t *med, int pos);
/** /**
* Remove a media in the configuration. * Remove a media in the configuration.
* @param config The element to work on. * @param config The element to work on.
* @param pos The index of the media element to remove. * @param pos The index of the media element to remove.
*/ */
int osip_rfc3264_del_audio_media (struct osip_rfc3264 *config, int pos); int osip_rfc3264_del_audio_media (struct osip_rfc3264 *config, int pos);
/** /**
* Add a media (for T.38) in the configuration. * Add a media (for T.38) in the configuration.
* @param config The element to work on. * @param config The element to work on.
* @param med The media element to add.
* @param pos The index of the media element to add. * @param pos The index of the media element to add.
*/ */
int osip_rfc3264_add_t38_media (struct osip_rfc3264 *config, sdp_media_t *med, int pos); int osip_rfc3264_add_t38_media (struct osip_rfc3264 *config, sdp_media_t *med, int pos);
/** /**
* Remove a media (for T.38) in the configuration. * Remove a media (for T.38) in the configuration.
* @param config The element to work on. * @param config The element to work on.
* @param pos The index of the media element to remove. * @param pos The index of the media element to remove.
*/ */
int osip_rfc3264_del_t38_media (struct osip_rfc3264 *config, int pos); int osip_rfc3264_del_t38_media (struct osip_rfc3264 *config, int pos);
/** /**
* Add a media (for video) in the configuration. * Add a media (for video) in the configuration.
* @param config The element to work on. * @param config The element to work on.
* @param med The media element to add.
* @param pos The index of the media element to add. * @param pos The index of the media element to add.
*/ */
int osip_rfc3264_add_video_media (struct osip_rfc3264 *config, sdp_media_ t *med, int pos); int osip_rfc3264_add_video_media (struct osip_rfc3264 *config, sdp_media_ t *med, int pos);
/** /**
* Remove a media in the configuration. * Remove a media in the configuration.
* @param config The element to work on. * @param config The element to work on.
* @param pos The index of the media element to remove. * @param pos The index of the media element to remove.
*/ */
int osip_rfc3264_del_video_media (struct osip_rfc3264 *config, int pos); int osip_rfc3264_del_video_media (struct osip_rfc3264 *config, int pos);
skipping to change at line 144 skipping to change at line 163
/** /**
* Search for support of a special codec. * Search for support of a special codec.
* @param config The element to work on. * @param config The element to work on.
*/ */
sdp_media_t *osip_rfc3264_find_audio (struct osip_rfc3264 *config, char * payload, sdp_media_t *osip_rfc3264_find_audio (struct osip_rfc3264 *config, char * payload,
char *rtpmap); char *rtpmap);
/** /**
* Search for support of a special codec. * Search for support of a special codec.
* @param config The element to work on. * @param config The element to work on.
* @param payload The payload to find.
* @param rtpmap The rtpmap for the payload.
*/ */
sdp_media_t *osip_rfc3264_find_video (struct osip_rfc3264 *config, char * payload, sdp_media_t *osip_rfc3264_find_video (struct osip_rfc3264 *config, char * payload,
char *rtpmap); char *rtpmap);
/** /**
* Search for support of a special codec. * Search for support of a special codec.
* @param config The element to work on. * @param config The element to work on.
* @param payload The payload to find.
*/ */
sdp_media_t *osip_rfc3264_find_t38 (struct osip_rfc3264 *config, char *pa yload); sdp_media_t *osip_rfc3264_find_t38 (struct osip_rfc3264 *config, char *pa yload);
/** /**
* Search for support of a special codec. * Search for support of a special codec.
* @param config The element to work on. * @param config The element to work on.
* @param payload The payload to find.
*/ */
sdp_media_t *osip_rfc3264_find_app (struct osip_rfc3264 *config, char *pa yload); sdp_media_t *osip_rfc3264_find_app (struct osip_rfc3264 *config, char *pa yload);
/** /**
* Compare remote sdp packet against local supported media. * Compare remote sdp packet against local supported media.
* Only one media line is checked. * Only one media line is checked.
* *
* @param config The element to work on. * @param config The element to work on.
* @param remote_sdp The remote SDP packet. * @param remote_sdp The remote SDP packet.
* @param audio_tab The local list of media supported by both side. * @param audio_tab The local list of media supported by both side.
 End of changes. 13 change blocks. 
4 lines changed or deleted 27 lines changed or added


 osip_route.h   osip_route.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_ROUTE oSIP route header definition. * @defgroup oSIP_ROUTE oSIP route header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Route headers. * Structure for Route headers.
* @defvar osip_route_t * @var osip_route_t
*/ */
typedef osip_from_t osip_route_t; typedef osip_from_t osip_route_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifdef __VXWORKS_OS__ #ifdef __VXWORKS_OS__
/* osip_route_init is already defined somewhere on VXWORKS.. */ /* osip_route_init is already defined somewhere on VXWORKS.. */
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_to.h   osip_to.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_TO oSIP to header definition. * @defgroup oSIP_TO oSIP to header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for To headers. * Structure for To headers.
* @defvar osip_to_t * @var osip_to_t
*/ */
typedef osip_from_t osip_to_t; typedef osip_from_t osip_to_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a To element. * Allocate a To element.
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 osip_uri.h   osip_uri.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 37 skipping to change at line 37
* @file osip_uri.h * @file osip_uri.h
* @brief oSIP url parser Routines * @brief oSIP url parser Routines
* *
* This is the implementation of sip url scheme. It also partially support * This is the implementation of sip url scheme. It also partially support
* any unrecognised scheme (not starting with 'sip:' or 'sips:'). Unrecogni sed * any unrecognised scheme (not starting with 'sip:' or 'sips:'). Unrecogni sed
* scheme are stored in url->string. * scheme are stored in url->string.
*/ */
/** /**
* @defgroup oSIP_URLS oSIP url parser Handling * @defgroup oSIP_URLS oSIP url parser Handling
* @ingroup oSIP * @ingroup osip2_parser
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Structure for referencing url parameters. * Structure for referencing url parameters.
* @defvar osip_uri_param_t * @var osip_uri_param_t
*/ */
typedef struct osip_uri_param osip_uri_param_t; typedef struct osip_uri_param osip_uri_param_t;
/**
* Structure for referencing url parameters.
* @struct osip_uri_param
*/
struct osip_uri_param struct osip_uri_param
{ {
char *gname; char *gname; /**< uri parameter name */
char *gvalue; char *gvalue; /**< uri parameter value */
}; };
/** /**
* Structure for referencing url headers. * Structure for referencing url headers.
* @defvar osip_uri_header_t * @var osip_uri_header_t
*/ */
typedef osip_uri_param_t osip_uri_header_t; typedef osip_uri_param_t osip_uri_header_t;
/** /**
* Allocate a url parameter element. * Allocate a url parameter element.
* @param url_param The element to work on. * @param url_param The element to work on.
*/ */
int osip_uri_param_init (osip_uri_param_t ** url_param); int osip_uri_param_init (osip_uri_param_t ** url_param);
/** /**
* Free a url parameter element. * Free a url parameter element.
skipping to change at line 159 skipping to change at line 163
/** /**
* Find in a generic parameter element in a list. * Find in a generic parameter element in a list.
* @param url_headers The list of generic parameter element to work on. * @param url_headers The list of generic parameter element to work on.
* @param name The name of the parameter element to find. * @param name The name of the parameter element to find.
* @param dest A pointer on the element found. * @param dest A pointer on the element found.
*/ */
#define osip_uri_header_get_byname(url_headers,name,dest) osip_uri_param_ge t_byname(url_headers,name,dest) #define osip_uri_header_get_byname(url_headers,name,dest) osip_uri_param_ge t_byname(url_headers,name,dest)
/** /**
* Structure for referencing SIP urls. * Structure for referencing SIP urls.
* @defvar osip_uri_t * @var osip_uri_t
*/ */
typedef struct osip_uri osip_uri_t; typedef struct osip_uri osip_uri_t;
/**
* Structure for referencing SIP urls.
* @struct osip_uri
*/
struct osip_uri struct osip_uri
{ {
char *scheme; char *scheme; /**< Uri Scheme (sip or sips) */
char *username; char *username; /**< Username */
char *password; char *password; /**< Password */
char *host; char *host; /**< Domain */
char *port; char *port; /**< Port number */
osip_list_t *url_params; osip_list_t *url_params; /**< Uri parameters */
osip_list_t *url_headers; osip_list_t *url_headers; /**< Uri headers */
char *string; char *string; /**< Space for other url schemes. (http, mailto...) */
/** other url schemes are strings. (http, mailto...) */
}; };
/** /**
* Allocate a url element. * Allocate a url element.
* @param url The element to work on. * @param url The element to work on.
*/ */
int osip_uri_init (osip_uri_t ** url); int osip_uri_init (osip_uri_t ** url);
/** /**
* Free a url element. * Free a url element.
* @param url The element to work on. * @param url The element to work on.
skipping to change at line 272 skipping to change at line 279
* @param url The element to work on. * @param url The element to work on.
* @param value The token value. * @param value The token value.
*/ */
void osip_uri_set_password (osip_uri_t * url, char *value); void osip_uri_set_password (osip_uri_t * url, char *value);
/** /**
* Get the password of a url element. * Get the password of a url element.
* @param url The element to work on. * @param url The element to work on.
*/ */
char *osip_uri_get_password (osip_uri_t * url); char *osip_uri_get_password (osip_uri_t * url);
/** /**
* Set the host of a url element.
* @param url The element to work on.
* @param value The token value.
*/
void osip_uri_set_host (osip_uri_t * url, char *value);
/**
* Get the host of a url element.
* @param url The element to work on.
*/
char *osip_uri_get_host (osip_uri_t * url);
/**
* Set the port of a url element. * Set the port of a url element.
* @param url The element to work on. * @param url The element to work on.
* @param value The token value. * @param value The token value.
*/ */
void osip_uri_set_port (osip_uri_t * url, char *value); void osip_uri_set_port (osip_uri_t * url, char *value);
/** /**
* Get the port of a url element. * Get the port of a url element.
* @param url The element to work on. * @param url The element to work on.
*/ */
char *osip_uri_get_port (osip_uri_t * url); char *osip_uri_get_port (osip_uri_t * url);
 End of changes. 11 change blocks. 
29 lines changed or deleted 25 lines changed or added


 osip_via.h   osip_via.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
*/ */
/** /**
* @defgroup oSIP_VIA oSIP via header definition. * @defgroup oSIP_VIA oSIP via header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Via headers. * Structure for Via headers.
* @defvar osip_via_t * @var osip_via_t
*/ */
typedef struct osip_via osip_via_t; typedef struct osip_via osip_via_t;
/**
* Definition of the Via header.
* @struct osip_via
*/
struct osip_via struct osip_via
{ {
char *version; char *version; /**< SIP Version */
char *protocol; char *protocol; /**< Protocol used by SIP Agent */
char *host; char *host; /**< Host where to send answers */
char *port; char *port; /**< Port where to send answers */
char *comment; char *comment; /**< Comments about SIP Agent */
osip_list_t *via_params; osip_list_t *via_params; /**< Via parameters */
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Via element. * Allocate a Via element.
* @param header The element to work on. * @param header The element to work on.
skipping to change at line 90 skipping to change at line 94
* Clone a Via element. * Clone a Via element.
* @param header The element to work on. * @param header The element to work on.
* @param dest A pointer on the copy of the element. * @param dest A pointer on the copy of the element.
*/ */
int osip_via_clone (const osip_via_t * header, osip_via_t ** dest); int osip_via_clone (const osip_via_t * header, osip_via_t ** dest);
/** /**
* Set the SIP version in the Via element. * Set the SIP version in the Via element.
* @param header The element to work on. * @param header The element to work on.
* @param value The value of the element. * @param value The value of the element.
*/ */
#define osip_via_set_version via_set_version
void via_set_version (osip_via_t * header, char *value); void via_set_version (osip_via_t * header, char *value);
/** /**
* Get the SIP version from a Via header. * Get the SIP version from a Via header.
* @param header The element to work on. * @param header The element to work on.
*/ */
#define osip_via_get_version via_get_version
char *via_get_version (osip_via_t * header); char *via_get_version (osip_via_t * header);
/** /**
* Set the protocol in the Via element. * Set the protocol in the Via element.
* @param header The element to work on. * @param header The element to work on.
* @param value The value of the element. * @param value The value of the element.
*/ */
#define osip_via_set_protocol via_set_protocol
void via_set_protocol (osip_via_t * header, char *value); void via_set_protocol (osip_via_t * header, char *value);
/** /**
* Get the protocol from a Via header. * Get the protocol from a Via header.
* @param header The element to work on. * @param header The element to work on.
*/ */
#define osip_via_get_protocol via_get_protocol
char *via_get_protocol (osip_via_t * header); char *via_get_protocol (osip_via_t * header);
/** /**
* Set the host in the Via element. * Set the host in the Via element.
* @param header The element to work on. * @param header The element to work on.
* @param value The value of the element. * @param value The value of the element.
*/ */
#define osip_via_set_host via_set_host
void via_set_host (osip_via_t * header, char *value); void via_set_host (osip_via_t * header, char *value);
/** /**
* Get the host from a Via header. * Get the host from a Via header.
* @param header The element to work on. * @param header The element to work on.
*/ */
#define osip_via_get_host via_get_host
char *via_get_host (osip_via_t * header); char *via_get_host (osip_via_t * header);
/** /**
* Set the port in the Via element. * Set the port in the Via element.
* @param header The element to work on. * @param header The element to work on.
* @param value The value of the element. * @param value The value of the element.
*/ */
#define osip_via_set_port via_set_port
void via_set_port (osip_via_t * header, char *value); void via_set_port (osip_via_t * header, char *value);
/** /**
* Get the port from a Via header. * Get the port from a Via header.
* @param header The element to work on. * @param header The element to work on.
*/ */
#define osip_via_get_port via_get_port
char *via_get_port (osip_via_t * header); char *via_get_port (osip_via_t * header);
/** /**
* Set the comment in the Via element. * Set the comment in the Via element.
* @param header The element to work on. * @param header The element to work on.
* @param value The value of the element. * @param value The value of the element.
*/ */
#define osip_via_set_comment via_set_comment
void via_set_comment (osip_via_t * header, char *value); void via_set_comment (osip_via_t * header, char *value);
/** /**
* Get the comment from a Via header. * Get the comment from a Via header.
* @param header The element to work on. * @param header The element to work on.
*/ */
#define osip_via_get_comment via_get_comment
char *via_get_comment (osip_via_t * header); char *via_get_comment (osip_via_t * header);
/** /**
* Allocate and add a hidden parameter element in a list. * Allocate and add a hidden parameter element in a list.
* @param header The element to work on. * @param header The element to work on.
*/ */
#define osip_via_set_hidden(header) osip_generic_param_add((header)->via _params,osip_strdup("hidden"),NULL) #define osip_via_set_hidden(header) osip_generic_param_add((header)->via _params,osip_strdup("hidden"),NULL)
/** /**
* Allocate and add a ttl parameter element in a list. * Allocate and add a ttl parameter element in a list.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 14 change blocks. 
10 lines changed or deleted 24 lines changed or added


 osip_www_authenticate.h   osip_www_authenticate.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004,2005 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 36 skipping to change at line 36
*/ */
/** /**
* @defgroup oSIP_WWW_AUTHENTICATE oSIP www-authenticate header definition. * @defgroup oSIP_WWW_AUTHENTICATE oSIP www-authenticate header definition.
* @ingroup oSIP_HEADERS * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for WWW-Authenticate headers. * Structure for WWW-Authenticate headers.
* @defvar osip_www_authenticate_t * @var osip_www_authenticate_t
*/ */
typedef struct osip_www_authenticate osip_www_authenticate_t; typedef struct osip_www_authenticate osip_www_authenticate_t;
/**
* Definition of the WWW-Authenticate header.
* @struct osip_www_authenticate
*/
struct osip_www_authenticate struct osip_www_authenticate
{ {
char *auth_type; /* ( "Basic" | "Digest" ) */ char *auth_type; /**< Authentication Type (Basic or Digest */
char *realm; /* mandatory ( quoted-string ) */ char *realm; /**< realm (as a quoted-string) */
char *domain; /* optional <"> 1#URI <"> */ char *domain; /**< domain (optional) */
char *nonce; /* mandatory */ char *nonce; /**< nonce (optional)*/
char *opaque; /* optional */ char *opaque; /**< opaque (optional) */
char *stale; /* optional ( "true" | "false" ) */ char *stale; /**< stale (optional) */
char *algorithm; /* optional ( "MD5" | token ) */ char *algorithm; /**< algorythm (optional) */
char *qop_options; /* optional */ char *qop_options; /**< qop option (optional) */
char *auth_param; /* optional */ char *auth_param; /**< other parameters (optional) */
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Allocate a Www-Authenticate element. * Allocate a Www-Authenticate element.
* @param header The element to work on. * @param header The element to work on.
 End of changes. 4 change blocks. 
13 lines changed or deleted 17 lines changed or added


 sdp_message.h   sdp_message.h 
/* /*
The oSIP library implements the Session Initiation Protocol (SIP -rfc2543 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261
-) -)
Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
skipping to change at line 38 skipping to change at line 38
/** /**
* @file sdp_message.h * @file sdp_message.h
* @brief oSIP SDP parser Routines * @brief oSIP SDP parser Routines
* *
* This is the SDP accessor and parser related API. * This is the SDP accessor and parser related API.
*/ */
/** /**
* @defgroup oSIP_SDP oSIP SDP parser Handling * @defgroup oSIP_SDP oSIP SDP parser Handling
* @ingroup oSIP * @ingroup osip2_sdp
* @{ * @{
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Structure for referencing bandwidth header. * Structure for referencing bandwidth header.
* @defvar sdp_bandwidth_t * @var sdp_bandwidth_t
*/ */
typedef struct sdp_bandwidth sdp_bandwidth_t; typedef struct sdp_bandwidth sdp_bandwidth_t;
/**
* SDP bandwidth definition.
* @struct sdp_bandwidth
*/
struct sdp_bandwidth struct sdp_bandwidth
{ {
char *b_bwtype; char *b_bwtype; /**< bandwidth type */
char *b_bandwidth; char *b_bandwidth; /**< bandwidth value */
}; };
/** /**
* Allocate a bandwidth element. * Allocate a bandwidth element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
int sdp_bandwidth_init (sdp_bandwidth_t ** elem); int sdp_bandwidth_init (sdp_bandwidth_t ** elem);
/** /**
* Free a bandwidth element. * Free a bandwidth element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
void sdp_bandwidth_free (sdp_bandwidth_t * elem); void sdp_bandwidth_free (sdp_bandwidth_t * elem);
/** /**
* Structure for referencing time description header. * Structure for referencing time description header.
* @defvar sdp_time_descr_t * @var sdp_time_descr_t
*/ */
typedef struct sdp_time_descr sdp_time_descr_t; typedef struct sdp_time_descr sdp_time_descr_t;
/**
* SDP Time description definition.
* @struct sdp_time_descr
*/
struct sdp_time_descr struct sdp_time_descr
{ {
char *t_start_time; char *t_start_time; /**< start time */
char *t_stop_time; char *t_stop_time; /**< stop time */
osip_list_t *r_repeats; /* list of char * */ osip_list_t *r_repeats; /**< repeat headers */
}; };
/** /**
* Allocate a time description element. * Allocate a time description element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
int sdp_time_descr_init (sdp_time_descr_t ** elem); int sdp_time_descr_init (sdp_time_descr_t ** elem);
/** /**
* Free a time description element. * Free a time description element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
void sdp_time_descr_free (sdp_time_descr_t * elem); void sdp_time_descr_free (sdp_time_descr_t * elem);
/** /**
* Structure for referencing key header. * Structure for referencing key header.
* @defvar sdp_key_t * @var sdp_key_t
*/ */
typedef struct sdp_key sdp_key_t; typedef struct sdp_key sdp_key_t;
/**
* SDP key definition.
* @struct sdp_key
*/
struct sdp_key struct sdp_key
{ {
char *k_keytype; /* "prompt", "clear", "base64", "uri" */ char *k_keytype; /**< Key Type (prompt, clear, base64, uri) */
char *k_keydata; /* key data for "clear" and "base64", uri fo char *k_keydata; /**< key data */
r "uri" */
}; };
/** /**
* Allocate a key element. * Allocate a key element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
int sdp_key_init (sdp_key_t ** elem); int sdp_key_init (sdp_key_t ** elem);
/** /**
* Free a key element. * Free a key element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
void sdp_key_free (sdp_key_t * elem); void sdp_key_free (sdp_key_t * elem);
/** /**
* Structure for referencing an attribute header. * Structure for referencing an attribute header.
* @defvar sdp_attribute_t * @var sdp_attribute_t
*/ */
typedef struct sdp_attribute sdp_attribute_t; typedef struct sdp_attribute sdp_attribute_t;
/**
* SDP attribute definition.
* @struct sdp_attribute
*/
struct sdp_attribute struct sdp_attribute
{ {
char *a_att_field; char *a_att_field; /**< attribute field */
char *a_att_value; /* optional */ char *a_att_value; /**< attribute value (optional) */
}; };
/** /**
* Allocate an attribute element. * Allocate an attribute element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
int sdp_attribute_init (sdp_attribute_t ** elem); int sdp_attribute_init (sdp_attribute_t ** elem);
/** /**
* Free a attribute element. * Free a attribute element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
void sdp_attribute_free (sdp_attribute_t * elem); void sdp_attribute_free (sdp_attribute_t * elem);
/** /**
* Structure for referencing a connection header. * Structure for referencing a connection header.
* @defvar sdp_connection_t * @var sdp_connection_t
*/ */
typedef struct sdp_connection sdp_connection_t; typedef struct sdp_connection sdp_connection_t;
/**
* SDP connection definition.
* @struct sdp_connection
*/
struct sdp_connection struct sdp_connection
{ {
char *c_nettype; char *c_nettype; /**< Network Type */
char *c_addrtype; char *c_addrtype; /**< Network Address Type */
char *c_addr; char *c_addr; /**< Address */
char *c_addr_multicast_ttl; char *c_addr_multicast_ttl; /**< TTL value for multicast addres
char *c_addr_multicast_int; s */
char *c_addr_multicast_int; /**< Number of multicast address */
}; };
/** /**
* Allocate a connection element. * Allocate a connection element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
int sdp_connection_init (sdp_connection_t ** elem); int sdp_connection_init (sdp_connection_t ** elem);
/** /**
* Free a connection element. * Free a connection element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
void sdp_connection_free (sdp_connection_t * elem); void sdp_connection_free (sdp_connection_t * elem);
/** /**
* Structure for referencing a media header. * Structure for referencing a media header.
* @defvar sdp_media_t * @var sdp_media_t
*/ */
typedef struct sdp_media sdp_media_t; typedef struct sdp_media sdp_media_t;
/**
* SDP media definition.
* @struct sdp_media
*/
struct sdp_media struct sdp_media
{ {
char *m_media; char *m_media; /**< media type */
char *m_port; char *m_port; /**< port number */
char *m_number_of_port; char *m_number_of_port; /**< number of port */
char *m_proto; char *m_proto; /**< protocol to be used */
osip_list_t *m_payloads; osip_list_t *m_payloads; /**< list of payloads (as strings) */
char *i_info; char *i_info; /**< information header */
osip_list_t *c_connections; /* list of sdp_connection_t * */ osip_list_t *c_connections; /**< list of sdp_connection_t * */
osip_list_t *b_bandwidths; /* list of sdp_bandwidth_t * */ osip_list_t *b_bandwidths; /**< list of sdp_bandwidth_t * */
osip_list_t *a_attributes; /* list of sdp_attribute_t * */ osip_list_t *a_attributes; /**< list of sdp_attribute_t * */
sdp_key_t *k_key; sdp_key_t *k_key; /**< key informations */
}; };
/** /**
* Allocate a media element. * Allocate a media element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
int sdp_media_init (sdp_media_t ** elem); int sdp_media_init (sdp_media_t ** elem);
/** /**
* Free a media element. * Free a media element.
* @param elem The element to work on. * @param elem The element to work on.
*/ */
void sdp_media_free (sdp_media_t * elem); void sdp_media_free (sdp_media_t * elem);
/** /**
* Structure for referencing a SDP packet. * Structure for referencing a SDP packet.
* @defvar sdp_message_t * @var sdp_message_t
*/ */
typedef struct sdp_message sdp_message_t; typedef struct sdp_message sdp_message_t;
/**
* SDP message definition.
* @struct sdp_message
*/
struct sdp_message struct sdp_message
{ {
char *v_version; char *v_version; /**< version header */
char *o_username; char *o_username; /**< Username */
char *o_sess_id; char *o_sess_id; /**< Identifier for session */
char *o_sess_version; char *o_sess_version; /**< Version of session */
char *o_nettype; char *o_nettype; /**< Network type */
char *o_addrtype; char *o_addrtype; /**< Address type */
char *o_addr; char *o_addr; /**< Address */
char *s_name; char *s_name; /**< Subject header */
char *i_info; char *i_info; /**< Information header */
char *u_uri; char *u_uri; /**< Uri header */
osip_list_t *e_emails; /* list of char * */ osip_list_t *e_emails; /**< list of mail address */
osip_list_t *p_phones; /* list of char * */ osip_list_t *p_phones; /**< list of phone numbers * */
sdp_connection_t *c_connection; sdp_connection_t *c_connection; /**< Connection information */
osip_list_t *b_bandwidths; /* list of sdp_bandwidth_t * */ osip_list_t *b_bandwidths; /**< list of bandwidth info (sdp_bandwidth_t
osip_list_t *t_descrs; /* list of sdp_time_descr_t * */ ) */
char *z_adjustments; osip_list_t *t_descrs; /**< list of time description (sdp_time_desc
sdp_key_t *k_key; r_t) */
osip_list_t *a_attributes; /* list of sdp_attribute_t * */ char *z_adjustments; /**< Time adjustment header */
osip_list_t *m_medias; /* list of sdp_media_t * */ sdp_key_t *k_key; /**< Key information header */
osip_list_t *a_attributes; /**< list of global attributes (sdp_attribut
e_t) */
osip_list_t *m_medias; /**< list of supported media (sdp_media_t) *
/
}; };
/** /**
* Allocate a SDP packet. * Allocate a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
*/ */
int sdp_message_init (sdp_message_t ** sdp); int sdp_message_init (sdp_message_t ** sdp);
/** /**
* Parse a SDP packet. * Parse a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
skipping to change at line 353 skipping to change at line 381
* @param sdp The element to work on. * @param sdp The element to work on.
*/ */
char *sdp_message_u_uri_get (sdp_message_t * sdp); char *sdp_message_u_uri_get (sdp_message_t * sdp);
/** /**
* Set the version in a SDP packet. * Set the version in a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param value The token value. * @param value The token value.
*/ */
int sdp_message_e_email_add (sdp_message_t * sdp, char *value); int sdp_message_e_email_add (sdp_message_t * sdp, char *value);
/** /**
* OBSOLETE: see sdp_message_e_email_get
* @def sdp_e_email_get
*/
#define sdp_e_email_get sdp_message_e_email_get
/**
* Get one of the email ('e' field) of a SDP packet. * Get one of the email ('e' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos the index of the email line. * @param pos the index of the email line.
*/ */
#define sdp_e_email_get sdp_message_e_email_get
char *sdp_message_e_email_get (sdp_message_t * sdp, int pos); char *sdp_message_e_email_get (sdp_message_t * sdp, int pos);
/** /**
* Set the version in a SDP packet. * Set the version in a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param value The token value. * @param value The token value.
*/ */
int sdp_message_p_phone_add (sdp_message_t * sdp, char *value); int sdp_message_p_phone_add (sdp_message_t * sdp, char *value);
/** /**
* Get one of the phone ('p' field) of a SDP packet. * Get one of the phone ('p' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
skipping to change at line 547 skipping to change at line 579
int sdp_message_a_attribute_add (sdp_message_t * sdp, int pos_media, int sdp_message_a_attribute_add (sdp_message_t * sdp, int pos_media,
char *att_field, char *att_value); char *att_field, char *att_value);
/** /**
* delete all attribute fields specified by att_field. * delete all attribute fields specified by att_field.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_media The line number. * @param pos_media The line number.
* @param att_field The value to remove. * @param att_field The value to remove.
*/ */
int sdp_message_a_attribute_del (sdp_message_t * sdp, int pos_media, int sdp_message_a_attribute_del (sdp_message_t * sdp, int pos_media,
char *att_field); char *att_field);
/**
* delete one specific attribute fields specified by att_field.
* @param sdp The element to work on.
* @param pos_media The line number.
* @param att_field The value to remove.
* @param att_field The index of attribute to remove.
*/
int sdp_message_a_attribute_del_at_index (sdp_message_t * sdp, int pos_me
dia,
char *att_field, int pos_attr);
/** /**
* Get one of the attribute ('a' field) of a SDP packet. * Get one of the attribute ('a' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_media The media line number. * @param pos_media The media line number.
* @param pos The attribute line number. * @param pos The attribute line number.
*/ */
sdp_attribute_t *sdp_message_attribute_get (sdp_message_t * sdp, sdp_attribute_t *sdp_message_attribute_get (sdp_message_t * sdp,
int pos_media, int pos); int pos_media, int pos);
/** /**
* Get the attribute name ('a' field) of a SDP packet. * Get the attribute name ('a' field) of a SDP packet.
skipping to change at line 600 skipping to change at line 641
* @param pos_media The line number. * @param pos_media The line number.
*/ */
char *sdp_message_m_media_get (sdp_message_t * sdp, int pos_media); char *sdp_message_m_media_get (sdp_message_t * sdp, int pos_media);
/** /**
* Get the port number ('m' field) of a SDP packet. * Get the port number ('m' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_media The line number. * @param pos_media The line number.
*/ */
char *sdp_message_m_port_get (sdp_message_t * sdp, int pos_media); char *sdp_message_m_port_get (sdp_message_t * sdp, int pos_media);
/** /**
* Set the port number ('m' field) of a SDP packet.
* @param sdp The element to work on.
* @param pos_media The line number.
* @param port The new port to set (must be allocated with osip_malloc)
*/
int sdp_message_m_port_set (sdp_message_t * sdp, int pos_media, char *por
t);
/**
* Get the number of port ('m' field) of a SDP packet. * Get the number of port ('m' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_media The line number. * @param pos_media The line number.
*/ */
char *sdp_message_m_number_of_port_get (sdp_message_t * sdp, int pos_medi a); char *sdp_message_m_number_of_port_get (sdp_message_t * sdp, int pos_medi a);
/** /**
* Get the protocol ('m' field) of a SDP packet. * Get the protocol ('m' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_media The line number. * @param pos_media The line number.
*/ */
skipping to change at line 627 skipping to change at line 675
int sdp_message_m_payload_add (sdp_message_t * sdp, int pos_media, int sdp_message_m_payload_add (sdp_message_t * sdp, int pos_media,
char *payload); char *payload);
/** /**
* Get one of the payload number ('m' field) of a SDP packet. * Get one of the payload number ('m' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_media The line number. * @param pos_media The line number.
* @param pos The i th payload element. * @param pos The i th payload element.
*/ */
char *sdp_message_m_payload_get (sdp_message_t * sdp, int pos_media, char *sdp_message_m_payload_get (sdp_message_t * sdp, int pos_media,
int pos); int pos);
/**
* Remove a payload in a SDP packet.
* @param sdp The element to work on.
* @param pos_media The line number.
* @param pos The position of the payload in the media line.
*/
int sdp_message_m_payload_del (sdp_message_t * sdp, int pos_media,
int pos);
/** @} */ /** @} */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 29 change blocks. 
56 lines changed or deleted 118 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/