osip.h   osip.h 
skipping to change at line 27 skipping to change at line 27
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_H_ #ifndef _OSIP_H_
#define _OSIP_H_ #define _OSIP_H_
#include <osipparser2/osip_const.h> #include <osipparser2/osip_const.h>
#include <time.h> #include <time.h>
#ifdef WIN32
#include <Winsock.h>
#endif
#ifdef __sun #ifdef __sun
#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
skipping to change at line 389 skipping to change at line 393
SND_REQUEST, /**< Event is an outgoing NON-INVITE and NON-ACK requ est */ SND_REQUEST, /**< Event is an outgoing NON-INVITE and NON-ACK requ est */
SND_STATUS_1XX, /**< Event is an outgoing informational response */ SND_STATUS_1XX, /**< Event is an outgoing informational response */
SND_STATUS_2XX, /**< Event is an outgoing 2XX response */ SND_STATUS_2XX, /**< Event is an outgoing 2XX response */
SND_STATUS_3456XX,/**< Event is an outgoing final response (not 2XX) */ SND_STATUS_3456XX,/**< Event is an outgoing final response (not 2XX) */
KILL_TRANSACTION, /**< Event to 'kill' the transaction before terminati on */ KILL_TRANSACTION, /**< Event to 'kill' the transaction before terminati on */
UNKNOWN_EVT UNKNOWN_EVT
} }
type_t; type_t;
#if 0
typedef struct osip_statemachine osip_statemachine_t;
struct osip_statemachine
{
osip_list_t *transitions;
};
#endif
/** /**
* Enumeration for transaction type. * Enumeration for transaction type.
* A transaction can be either of: * A transaction can be either of:
* ICT, * ICT,
* IST, * IST,
* NICT, * NICT,
* NIST, * NIST,
*/ */
typedef enum osip_fsm_type_t typedef enum osip_fsm_type_t
{ {
skipping to change at line 446 skipping to change at line 441
/** /**
* Structure for INVITE CLIENT TRANSACTION (outgoing INVITE transaction). * Structure for INVITE CLIENT TRANSACTION (outgoing INVITE transaction).
* @defvar osip_ict_t * @defvar osip_ict_t
*/ */
typedef struct osip_ict osip_ict_t; typedef struct osip_ict osip_ict_t;
struct osip_ict struct osip_ict
{ {
/* state machine is implied... */ /* state machine is implied... */
#ifdef NEW_TIMER int timer_a_length; /* A=T1, A=2xT1... (unreliable tr on
int timer_a_length; /* A=T1, A=2xT1... (unreliable tr only) ly) */
*/
struct timeval timer_a_start; struct timeval timer_a_start;
int timer_b_length; /* B = 64* T1 int timer_b_length; /* B = 64* T1
*/ */
struct timeval timer_b_start; /* fire when transaction timeouts struct timeval timer_b_start; /* fire when transaction timeouts
*/ */
int timer_d_length; /* D >= 32s for unreliable tr (or 0) int timer_d_length; /* D >= 32s for unreliable tr (or 0)
*/ */
struct timeval timer_d_start; /* should be equal to timer H struct timeval timer_d_start; /* should be equal to timer H
*/ */
#else char *destination; /* url used to send requests */
int timer_a_length; /* A=T1, A=2xT1... (unreliable transport int port; /* port of next hop */
only) */
time_t timer_a_start;
int timer_b_length; /* B = 64* T1
*/
time_t timer_b_start; /* fire when transaction timeouts
*/
int timer_d_length; /* D >= 32s for unreliable transport (else = 0)
*/
time_t timer_d_start; /* should be equal to timer H
*/
#endif
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 * @defvar osip_nict_t
*/ */
typedef struct osip_nict osip_nict_t; typedef struct osip_nict osip_nict_t;
struct osip_nict struct osip_nict
{ {
/* state machine is implied... */ /* state machine is implied... */
#ifdef NEW_TIMER int timer_e_length; /* A=T1, A=2xT1... (unreliable tr. o
int timer_e_length; /* A=T1, A=2xT1... (unreliable tr. only) nly) */
*/ struct timeval timer_e_start; /* (else = -1) not active
struct timeval timer_e_start; /* (else = -1) not active */
*/ int timer_f_length; /* B = 64* T1
int timer_f_length; /* B = 64* T1 */
*/ struct timeval timer_f_start; /* fire when transaction timeouts
struct timeval timer_f_start; /* fire when transaction timeouts */
*/ int timer_k_length; /* K = T4 (else = 0)
int timer_k_length; /* K = T4 (else = 0) */
*/
struct timeval timer_k_start; struct timeval timer_k_start;
#else char *destination; /* url used to send requests */
int timer_e_length; /* A=T1, A=2xT1... (unreliable transport only) int port; /* port of next hop */
*/
time_t timer_e_start; /* (else = -1) not active
*/
int timer_f_length; /* B = 64* T1
*/
time_t timer_f_start; /* fire when transaction timeouts
*/
int timer_k_length; /* K = T4 (else = 0)
*/
time_t timer_k_start;
#endif
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 * @defvar osip_ist_t
*/ */
typedef struct osip_ist osip_ist_t; typedef struct osip_ist osip_ist_t;
struct osip_ist struct osip_ist
{ {
#ifdef NEW_TIMER int timer_g_length; /* G=MIN(T1*2,T2) for unreliable tra
int timer_g_length; /* G=MIN(T1*2,T2) for unreliable trans. ns. */
*/ struct timeval timer_g_start; /* 0 when reliable transport is used
struct timeval timer_g_start; /* 0 when reliable transport is used! ! */
*/ int timer_h_length; /* H = 64* T1
int timer_h_length; /* H = 64* T1 */
*/ struct timeval timer_h_start; /* fire when if no ACK is received
struct timeval timer_h_start; /* fire when if no ACK is received */
*/ int timer_i_length; /* I = T4 for unreliable transport (
int timer_i_length; /* I = T4 for unreliable transport (or 0 or 0) */
)*/ struct timeval timer_i_start; /* absorb all ACK
struct timeval timer_i_start; /* absorb all ACK */
*/
#else
int timer_g_length; /* G=MIN(T1*2,T2) for unreliable transport */
time_t timer_g_start; /* else = 0 when reliable transport is used! */
int timer_h_length; /* H = 64* T1
*/
time_t timer_h_start; /* fire when if no ACK is received */
int timer_i_length; /* I = T4 for unreliable transport (else =
0) */
time_t timer_i_start; /* absorb all ACK */
#endif
}; };
/** /**
* Structure for NON-INVITE SERVER TRANSACTION (incoming SERVER transaction ). * Structure for NON-INVITE SERVER TRANSACTION (incoming SERVER transaction ).
* @defvar osip_nist_t * @defvar osip_nist_t
*/ */
typedef struct osip_nist osip_nist_t; typedef struct osip_nist osip_nist_t;
struct osip_nist struct osip_nist
{ {
#ifdef NEW_TIMER
int timer_j_length; /* J = 64*T1 (else 0) */
struct timeval timer_j_start;
#else
int timer_j_length; /* J = 64*T1 (else 0) */ int timer_j_length; /* J = 64*T1 (else 0) */
time_t timer_j_start; struct timeval timer_j_start;
#endif
}; };
/** /**
* Structure for transaction handling. * Structure for transaction handling.
* @defvar osip_transaction_t * @defvar osip_transaction_t
*/ */
typedef struct osip_transaction osip_transaction_t; typedef struct osip_transaction osip_transaction_t;
struct osip_transaction struct osip_transaction
{ {
skipping to change at line 559 skipping to change at line 522
osip_fifo_t *transactionff; /* events must be added in this fifo */ osip_fifo_t *transactionff; /* events must be added in this fifo */
osip_via_t *topvia; /* CALL-LEG definition */ osip_via_t *topvia; /* CALL-LEG definition */
osip_from_t *from; /* CALL-LEG definition */ osip_from_t *from; /* CALL-LEG definition */
osip_to_t *to; osip_to_t *to;
osip_call_id_t *callid; osip_call_id_t *callid;
osip_cseq_t *cseq; osip_cseq_t *cseq;
osip_message_t *orig_request; /* last request sent */ osip_message_t *orig_request; /* last request sent */
osip_message_t *last_response; /* last response received */ 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; /* state of 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 */ /* RESPONSE are received on this socket */
int in_socket; int in_socket;
/* REQUESTS are sent on this socket */ /* REQUESTS are sent on this socket */
int out_socket; int out_socket;
void *config; /* transaction is managed by config */ void *config; /* transaction is managed by config */
osip_fsm_type_t ctx_type; osip_fsm_type_t ctx_type;
osip_ict_t *ict_context; osip_ict_t *ict_context;
osip_ist_t *ist_context; osip_ist_t *ist_context;
osip_nict_t *nict_context; osip_nict_t *nict_context;
osip_nist_t *nist_context; osip_nist_t *nist_context;
}; };
typedef enum osip_message_callback_type { /**
OSIP_ICT_INVITE_SENT = 0, * Enumeration for callback type.
OSIP_ICT_INVITE_SENT_AGAIN, */
OSIP_ICT_ACK_SENT, typedef enum osip_message_callback_type
OSIP_ICT_ACK_SENT_AGAIN, {
OSIP_ICT_STATUS_1XX_RECEIVED, OSIP_ICT_INVITE_SENT = 0, /**< INVITE MESSAGE SENT */
OSIP_ICT_STATUS_2XX_RECEIVED, OSIP_ICT_INVITE_SENT_AGAIN, /**< INVITE MESSAGE RETRANSMITT
OSIP_ICT_STATUS_2XX_RECEIVED_AGAIN, ED */
OSIP_ICT_STATUS_3XX_RECEIVED, OSIP_ICT_ACK_SENT, /**< ACK MESSAGE SENT */
OSIP_ICT_STATUS_4XX_RECEIVED, OSIP_ICT_ACK_SENT_AGAIN, /**< ACK MESSAGE RETRANSMITTED
OSIP_ICT_STATUS_5XX_RECEIVED, */
OSIP_ICT_STATUS_6XX_RECEIVED, OSIP_ICT_STATUS_1XX_RECEIVED, /**< 1XX FOR INVITE RECEIVED */
OSIP_ICT_STATUS_3456XX_RECEIVED_AGAIN, OSIP_ICT_STATUS_2XX_RECEIVED, /**< 2XX FOR INVITE RECEIVED */
OSIP_ICT_STATUS_2XX_RECEIVED_AGAIN, /**< 2XX FOR INVITE RECEIVED AG
AIN */
OSIP_ICT_STATUS_3XX_RECEIVED, /**< 3XX FOR INVITE RECEIVED */
OSIP_ICT_STATUS_4XX_RECEIVED, /**< 4XX FOR INVITE RECEIVED */
OSIP_ICT_STATUS_5XX_RECEIVED, /**< 5XX FOR INVITE RECEIVED */
OSIP_ICT_STATUS_6XX_RECEIVED, /**< 6XX FOR INVITE RECEIVED */
OSIP_ICT_STATUS_3456XX_RECEIVED_AGAIN, /**< RESPONSE RECEIVED AGAIN */
OSIP_IST_INVITE_RECEIVED, OSIP_IST_INVITE_RECEIVED, /**< INVITE MESSAGE RECEIVED */
OSIP_IST_INVITE_RECEIVED_AGAIN, OSIP_IST_INVITE_RECEIVED_AGAIN, /**< INVITE MESSAGE RECEIVED AG
OSIP_IST_ACK_RECEIVED, AN */
OSIP_IST_ACK_RECEIVED_AGAIN, OSIP_IST_ACK_RECEIVED, /**< ACK MESSAGE RECEIVED */
OSIP_IST_STATUS_1XX_SENT, OSIP_IST_ACK_RECEIVED_AGAIN, /**< ACK MESSAGE RECEIVED AGAIN
OSIP_IST_STATUS_2XX_SENT, */
OSIP_IST_STATUS_2XX_SENT_AGAIN, OSIP_IST_STATUS_1XX_SENT, /**< 1XX FOR INVITE SENT */
OSIP_IST_STATUS_3XX_SENT, OSIP_IST_STATUS_2XX_SENT, /**< 2XX FOR INVITE SENT */
OSIP_IST_STATUS_4XX_SENT, OSIP_IST_STATUS_2XX_SENT_AGAIN, /**< 2XX FOR INVITE RETRANSMITT
OSIP_IST_STATUS_5XX_SENT, ED */
OSIP_IST_STATUS_6XX_SENT, OSIP_IST_STATUS_3XX_SENT, /**< 3XX FOR INVITE SENT */
OSIP_IST_STATUS_3456XX_SENT_AGAIN, OSIP_IST_STATUS_4XX_SENT, /**< 4XX FOR INVITE SENT */
OSIP_IST_STATUS_5XX_SENT, /**< 5XX FOR INVITE SENT */
OSIP_IST_STATUS_6XX_SENT, /**< 6XX FOR INVITE SENT */
OSIP_IST_STATUS_3456XX_SENT_AGAIN, /**< RESPONSE RETRANSMITTED */
OSIP_NICT_REGISTER_SENT, OSIP_NICT_REGISTER_SENT, /**< REGISTER MESSAGE SENT */
OSIP_NICT_BYE_SENT, OSIP_NICT_BYE_SENT, /**< BYE MESSAGE SENT */
OSIP_NICT_OPTIONS_SENT, OSIP_NICT_OPTIONS_SENT, /**< OPTIONS MESSAGE SENT */
OSIP_NICT_INFO_SENT, OSIP_NICT_INFO_SENT, /**< INFO MESSAGE SENT */
OSIP_NICT_CANCEL_SENT, OSIP_NICT_CANCEL_SENT, /**< CANCEL MESSAGE SENT */
OSIP_NICT_NOTIFY_SENT, OSIP_NICT_NOTIFY_SENT, /**< NOTIFY MESSAGE SENT */
OSIP_NICT_SUBSCRIBE_SENT, OSIP_NICT_SUBSCRIBE_SENT, /**< SUBSCRIBE MESSAGE SENT */
OSIP_NICT_UNKNOWN_REQUEST_SENT, OSIP_NICT_UNKNOWN_REQUEST_SENT, /**< UNKNOWN REQUEST MESSAGE SE
OSIP_NICT_REQUEST_SENT_AGAIN, NT */
OSIP_NICT_STATUS_1XX_RECEIVED, OSIP_NICT_REQUEST_SENT_AGAIN, /**< REQUEST MESSAGE RETRANMITT
OSIP_NICT_STATUS_2XX_RECEIVED, ED */
OSIP_NICT_STATUS_2XX_RECEIVED_AGAIN, OSIP_NICT_STATUS_1XX_RECEIVED, /**< 1XX FOR MESSAGE RECEIVED *
OSIP_NICT_STATUS_3XX_RECEIVED, /
OSIP_NICT_STATUS_4XX_RECEIVED, OSIP_NICT_STATUS_2XX_RECEIVED, /**< 2XX FOR MESSAGE RECEIVED *
OSIP_NICT_STATUS_5XX_RECEIVED, /
OSIP_NICT_STATUS_6XX_RECEIVED, OSIP_NICT_STATUS_2XX_RECEIVED_AGAIN, /**< 2XX FOR MESSAGE RECEIVED A
OSIP_NICT_STATUS_3456XX_RECEIVED_AGAIN, GAIN */
OSIP_NICT_STATUS_3XX_RECEIVED, /**< 3XX FOR MESSAGE RECEIVED *
/
OSIP_NICT_STATUS_4XX_RECEIVED, /**< 4XX FOR MESSAGE RECEIVED *
/
OSIP_NICT_STATUS_5XX_RECEIVED, /**< 5XX FOR MESSAGE RECEIVED *
/
OSIP_NICT_STATUS_6XX_RECEIVED, /**< 6XX FOR MESSAGE RECEIVED *
/
OSIP_NICT_STATUS_3456XX_RECEIVED_AGAIN, /**< RESPONSE RECEIVED AGAIN */
OSIP_NIST_REGISTER_RECEIVED, OSIP_NIST_REGISTER_RECEIVED, /**< REGISTER RECEIVED */
OSIP_NIST_BYE_RECEIVED, OSIP_NIST_BYE_RECEIVED, /**< BYE RECEIVED */
OSIP_NIST_OPTIONS_RECEIVED, OSIP_NIST_OPTIONS_RECEIVED, /**< OPTIONS RECEIVED */
OSIP_NIST_INFO_RECEIVED, OSIP_NIST_INFO_RECEIVED, /**< INFO RECEIVED */
OSIP_NIST_CANCEL_RECEIVED, OSIP_NIST_CANCEL_RECEIVED, /**< CANCEL RECEIVED */
OSIP_NIST_NOTIFY_RECEIVED, OSIP_NIST_NOTIFY_RECEIVED, /**< NOTIFY RECEIVED */
OSIP_NIST_SUBSCRIBE_RECEIVED, OSIP_NIST_SUBSCRIBE_RECEIVED, /**< SUBSCRIBE RECEIVED */
/* ... TO BE ADDED: All known and used method extensions */
OSIP_NIST_UNKNOWN_REQUEST_RECEIVED,
OSIP_NIST_REQUEST_RECEIVED_AGAIN,
OSIP_NIST_STATUS_1XX_SENT,
OSIP_NIST_STATUS_2XX_SENT,
OSIP_NIST_STATUS_2XX_SENT_AGAIN,
OSIP_NIST_STATUS_3XX_SENT,
OSIP_NIST_STATUS_4XX_SENT,
OSIP_NIST_STATUS_5XX_SENT,
OSIP_NIST_STATUS_6XX_SENT,
OSIP_NIST_STATUS_3456XX_SENT_AGAIN,
OSIP_MESSAGE_CALLBACK_COUNT OSIP_NIST_UNKNOWN_REQUEST_RECEIVED, /**< UNKNWON REQUEST RECEIVED *
/
OSIP_NIST_REQUEST_RECEIVED_AGAIN, /**< UNKNWON REQUEST RECEIVED A
GAIN */
OSIP_NIST_STATUS_1XX_SENT, /**< 1XX FOR MESSAGE SENT */
OSIP_NIST_STATUS_2XX_SENT, /**< 2XX FOR MESSAGE SENT */
OSIP_NIST_STATUS_2XX_SENT_AGAIN, /**< 2XX FOR MESSAGE RETRANSMIT
TED */
OSIP_NIST_STATUS_3XX_SENT, /**< 3XX FOR MESSAGE SENT */
OSIP_NIST_STATUS_4XX_SENT, /**< 4XX FOR MESSAGE SENT */
OSIP_NIST_STATUS_5XX_SENT, /**< 5XX FOR MESSAGE SENT */
OSIP_NIST_STATUS_6XX_SENT, /**< 6XX FOR MESSAGE SENT */
OSIP_NIST_STATUS_3456XX_SENT_AGAIN, /**< RESPONSE RETRANSMITTED */
OSIP_MESSAGE_CALLBACK_COUNT /**< END OF ENUM */
} osip_message_callback_type_t; } osip_message_callback_type_t;
typedef enum osip_kill_callback_type { /**
OSIP_ICT_KILL_TRANSACTION, * Enumeration for callback type used when transaction is over.
OSIP_IST_KILL_TRANSACTION, */
OSIP_NICT_KILL_TRANSACTION, typedef enum osip_kill_callback_type
OSIP_NIST_KILL_TRANSACTION, {
OSIP_ICT_KILL_TRANSACTION, /**< end of Client INVITE transaction *
/
OSIP_IST_KILL_TRANSACTION, /**< end of Server INVITE transaction *
/
OSIP_NICT_KILL_TRANSACTION, /**< end of Client Non-INVITE transacti
on */
OSIP_NIST_KILL_TRANSACTION, /**< end of Server Non-INVITE transacti
on */
OSIP_KILL_CALLBACK_COUNT OSIP_KILL_CALLBACK_COUNT /**< END OF ENUM */
} osip_kill_callback_type_t; } osip_kill_callback_type_t;
typedef enum osip_transport_error_callback_type { /**
OSIP_ICT_TRANSPORT_ERROR, * Enumeration for callback type used when a transport error is detected.
OSIP_IST_TRANSPORT_ERROR, */
OSIP_NICT_TRANSPORT_ERROR, typedef enum osip_transport_error_callback_type
OSIP_NIST_TRANSPORT_ERROR, {
OSIP_ICT_TRANSPORT_ERROR, /**< transport error for ICT */
OSIP_IST_TRANSPORT_ERROR, /**< transport error for IST */
OSIP_NICT_TRANSPORT_ERROR, /**< transport error for NICT */
OSIP_NIST_TRANSPORT_ERROR, /**< transport error for NIST */
OSIP_TRANSPORT_ERROR_CALLBACK_COUNT OSIP_TRANSPORT_ERROR_CALLBACK_COUNT /**< END OF ENUM */
} osip_transport_error_callback_type_t; } osip_transport_error_callback_type_t;
typedef void (* osip_message_cb_t) (int type, osip_transaction_t *, osip_ typedef void (*osip_message_cb_t) (int type, osip_transaction_t *,
message_t *); osip_message_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
*); *);
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 #ifdef OSIP_RETRANSMIT_2XX
struct osip_dialog; struct osip_dialog;
typedef struct ixt_t ixt_t; typedef struct ixt_t ixt_t;
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;
osip_message_t *msg2xx; /* copy of string to retransmit */ osip_message_t *msg2xx; /* copy of string to retransmit */
osip_message_t *ack; /* useless for ist */ osip_message_t *ack; /* useless for ist */
time_t start; time_t start;
int interval; /* between each retransmission, in ms */ int interval; /* between each retransmission, in ms */
char *dest; char *dest;
int port; int port;
int sock; int sock;
int counter; /* start at 7 */ int counter; /* start at 7 */
}; };
#endif #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 * @defvar osip_t
skipping to change at line 711 skipping to change at line 687
{ {
void *application_context; /* a pointer for your personnal usage */ void *application_context; /* a pointer for your personnal usage */
/* 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;
osip_list_t *osip_ist_transactions; osip_list_t *osip_ist_transactions;
osip_list_t *osip_nict_transactions; osip_list_t *osip_nict_transactions;
osip_list_t *osip_nist_transactions; osip_list_t *osip_nist_transactions;
osip_list_t *ixt_retransmissions; /* for retransmission of 2xx & ACK fo r INVITE */ osip_list_t *ixt_retransmissions; /* for retransmission of 2xx & ACK f or INVITE */
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]; osip_kill_transaction_cb_t kill_callbacks[OSIP_KILL_CALLBACK_COUNT];
osip_transport_error_cb_t tp_error_callbacks[OSIP_TRANSPORT_ERROR_CALLB osip_transport_error_cb_t
ACK_COUNT]; tp_error_callbacks[OSIP_TRANSPORT_ERROR_CALLBACK_COUNT];
/* callbacks for sending messages */ /* 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);
}; };
int osip_set_message_callback (osip_t *, int type, osip_message_cb_t cb); /**
int osip_set_kill_transaction_callback (osip_t *, int type, * Set a callback for each transaction operation.
* @param osip The element to work on.
* @param type The event type to hook on.
* @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);
/**
* Set a callback for transaction operation related to the end of transacti
ons.
* @param osip The element to work on.
* @param type The event type to hook on.
* @param cb The method to be called upon the event.
*/
int osip_set_kill_transaction_callback (osip_t *osip, int type,
osip_kill_transaction_cb_t cb); osip_kill_transaction_cb_t cb);
int osip_set_transport_error_callback (osip_t *, int type,
/**
* Set a callback for each transaction operation related to network error.
* @param osip The element to work on.
* @param type The event type to hook on.
* @param cb The method to be called upon the event.
*/
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 sipevent 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 * @defvar osip_event_t
*/ */
skipping to change at line 751 skipping to change at line 749
osip_message_t *sip; osip_message_t *sip;
}; };
/** /**
* 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, osip_fsm_ty int osip_transaction_init (osip_transaction_t ** transaction,
pe_t ctx_type, osip_fsm_type_t ctx_type, osip_t * osip,
osip_t * osip, osip_message_t * request); osip_message_t * request);
/** /**
* Free all resource in a osip_transaction_t element. * Free all resource in a osip_transaction_t element.
* @param transaction The element to free. * @param transaction The element to free.
*/ */
int osip_transaction_free (osip_transaction_t * transaction); int osip_transaction_free (osip_transaction_t * transaction);
/** /**
* 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) ;
skipping to change at line 776 skipping to change at line 775
/** /**
* 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 po int osip_ict_set_destination (osip_ict_t * ict, char *destination,
rt); int port);
/** /**
* 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 nict The element to work on. * @param nict 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_nict_set_destination (osip_nict_t * nict, char *destination, int int osip_nict_set_destination (osip_nict_t * nict, char *destination,
port); int port);
/** /**
* Add a SIP event in the fifo of a osip_transaction_t element. * Add a SIP event in the fifo of a osip_transaction_t element.
* @param transaction The element to work on. * @param transaction The element to work on.
* @param evt The event to add. * @param evt The event to add.
*/ */
int osip_transaction_add_event (osip_transaction_t * transaction, osip_ev int osip_transaction_add_event (osip_transaction_t * transaction,
ent_t * evt); osip_event_t * evt);
/** /**
* Consume one osip_event_t element previously added in the fifo. * Consume one osip_event_t element previously added in the fifo.
* NOTE: This method MUST NEVER be called within another call * NOTE: This method MUST NEVER be called within another call
* of this method. (For example, you can't call osip_transaction_execute() * of this method. (For example, you can't call osip_transaction_execute()
* in a callback registered in the osip_t element.) * in a callback registered in the osip_t element.)
* @param transaction The element to free. * @param transaction The element to free.
* @param evt The element to consume. * @param evt The element to consume.
*/ */
int osip_transaction_execute (osip_transaction_t * transaction, osip_even int osip_transaction_execute (osip_transaction_t * transaction,
t_t * evt); osip_event_t * evt);
/** /**
* Set a pointer to your personal context associated with this transaction. * Set a pointer to your personal context associated with this transaction.
* NOTE: this is a very useful method that allow you to avoid searching * NOTE: this is a very useful method that allow you to avoid searching
* for your personal context inside the registered callbacks. * for your personal context inside the registered callbacks.
* You can initialise this pointer to your context right after * You can initialise this pointer to your context right after
* the creation of the osip_transaction_t element. Then, you'll be * the creation of the osip_transaction_t element. Then, you'll be
* able to get the address of your context by calling * able to get the address of your context by calling
* osip_transaction_get_your_instance(). * osip_transaction_get_your_instance().
* @param transaction The element to work on. * @param transaction The element to work on.
* @param instance The address of your context. * @param instance The address of your context.
*/ */
int osip_transaction_set_your_instance (osip_transaction_t * transaction, int osip_transaction_set_your_instance (osip_transaction_t * transaction,
void *instance); void *instance);
/** /**
* Get a pointer to your personal context associated with this transaction. * Get a pointer to your personal context associated with this transaction.
* @param transaction The element to work on. * @param transaction The element to work on.
*/ */
void *osip_transaction_get_your_instance (osip_transaction_t * transactio n); void *osip_transaction_get_your_instance (osip_transaction_t * transactio n);
/** /**
* Get target ip and port for this request. * Get target ip and port for this request.
* (automaticly set by osip_transaction_init() for ict and nict) * (automaticly set by osip_transaction_init() for ict and nict)
* @param transaction The element to work on. * @param transaction The element to work on.
* @param ip The ip of host where to send initial request. * @param ip The ip of host where to send initial request.
* @param port The port where to send initial request. * @param port The port where to send initial request.
*/ */
int osip_transaction_get_destination(osip_transaction_t * transaction, ch int osip_transaction_get_destination (osip_transaction_t * transaction,
ar **ip, int *port); char **ip, int *port);
#ifndef DOXYGEN #ifndef DOXYGEN
/** /**
* Set the socket for incoming message. * Set the socket for incoming message.
* NOTE: THIS HAS NEVER TESTED! Please send feedback. * NOTE: THIS HAS NEVER TESTED! Please send feedback.
* @param transaction The element to work on. * @param transaction The element to work on.
* @param sock The socket for incoming message. * @param sock The socket for incoming message.
*/ */
int osip_transaction_set_in_socket (osip_transaction_t * transaction, int int osip_transaction_set_in_socket (osip_transaction_t * transaction,
sock); int sock);
/** /**
* Set the socket for outgoing message. * Set the socket for outgoing message.
* NOTE: THIS HAS NEVER TESTED! Please send feedback. * NOTE: THIS HAS NEVER TESTED! Please send feedback.
* @param transaction The element to work on. * @param transaction The element to work on.
* @param sock The socket for outgoing message. * @param sock The socket for outgoing message.
*/ */
int osip_transaction_set_out_socket (osip_transaction_t * transaction, in int osip_transaction_set_out_socket (osip_transaction_t * transaction,
t sock); int sock);
#if 0 #if 0
/** /**
* Check if the first 2 parameters match the other ones. * Check if the first 2 parameters match the other ones.
* NOTE: THIS IS AN INTERNAL METHOD ONLY * NOTE: THIS IS AN INTERNAL METHOD ONLY
* @param to1 The initial to header. * @param to1 The initial to header.
* @param from1 The initial from header. * @param from1 The initial from header.
* @param to2 The new to header. * @param to2 The new to header.
* @param from2 The new from header. * @param from2 The new from header.
*/ */
int callleg_match (osip_to_t * to1, osip_from_t * from1, osip_to_t * to2, int callleg_match (osip_to_t * to1, osip_from_t * from1, osip_to_t * to2,
osip_from_t * from2); osip_from_t * from2);
#endif #endif
#endif /* endif DOXYGEN */ #endif /* endif DOXYGEN */
/** /**
* Allocate an osip_t element. * Allocate an osip_t element.
* @param osip the element to allocate. * @param osip the element to allocate.
*/ */
int osip_init (osip_t ** osip); int osip_init (osip_t ** osip);
skipping to change at line 919 skipping to change at line 926
* Consume ALL pending osip_event_t previously added in the fifos of nict t ransactions. * Consume ALL pending osip_event_t previously added in the fifos of nict t ransactions.
* @param osip The element to work on. * @param osip The element to work on.
*/ */
int osip_nict_execute (osip_t * osip); int osip_nict_execute (osip_t * osip);
/** /**
* Consume ALL pending osip_event_t previously added in the fifos of nist t ransactions. * Consume ALL pending osip_event_t previously added in the fifos of nist t ransactions.
* @param osip The element to work on. * @param osip The element to work on.
*/ */
int osip_nist_execute (osip_t * osip); int osip_nist_execute (osip_t * osip);
#ifdef NEW_TIMER
/** /**
* Retreive the minimum timer value to be used by an application * Retreive the minimum timer value to be used by an application
* so that the osip_timer_*_execute method don't have to be called * so that the osip_timer_*_execute method don't have to be called
* often. * often.
* *
* @param osip The element to work on. * @param osip The element to work on.
* @param lower_tv The minimum timer when the application should wake up. * @param lower_tv The minimum timer when the application should wake up.
*/ */
void osip_timers_gettimeout(osip_t * osip, struct timeval *lower_tv); void osip_timers_gettimeout (osip_t * osip, struct timeval *lower_tv);
#endif
/** /**
* Check if an ict transactions needs a timer event. * Check if an ict transactions needs a timer event.
* @param osip The element to work on. * @param osip The element to work on.
*/ */
void osip_timers_ict_execute (osip_t * osip); void osip_timers_ict_execute (osip_t * osip);
/** /**
* Check if an ist transactions needs a timer event. * Check if an ist transactions needs a timer event.
* @param osip The element to work on. * @param osip The element to work on.
*/ */
void osip_timers_ist_execute (osip_t * osip); void osip_timers_ist_execute (osip_t * osip);
skipping to change at line 969 skipping to change at line 975
#ifndef DOXYGEN #ifndef DOXYGEN
/** /**
* Some race conditions can happen in multi threaded applications. * Some race conditions can happen in multi threaded applications.
* Use this method carefully. * Use this method carefully.
* <BR>Search for a transaction that match this event (MUST be a MESSAGE ev ent). * <BR>Search for a transaction that match this event (MUST be a MESSAGE ev ent).
* @param osip The element to work on. * @param osip The element to work on.
* @param evt The element representing the SIP MESSAGE. * @param evt The element representing the SIP MESSAGE.
*/ */
#ifndef OSIP_MT #ifndef OSIP_MT
osip_transaction_t *osip_find_transaction (osip_t * osip, osip_event_t * osip_transaction_t *osip_find_transaction (osip_t * osip,
evt); osip_event_t * evt);
#endif #endif
osip_transaction_t *__osip_find_transaction (osip_t * osip, osip_transaction_t *__osip_find_transaction (osip_t * osip,
osip_event_t * evt, osip_event_t * evt,
int consume); int consume);
#endif #endif
/** /**
* Search for a transaction that match this event (MUST be a MESSAGE event) * Search for a transaction that match this event (MUST be a MESSAGE event)
* and add this event if a transaction is found.. * and add this event if a transaction is found..
* @param osip The element to work on. * @param osip The element to work on.
* @param evt The element representing the SIP MESSAGE. * @param evt The element representing the SIP MESSAGE.
*/ */
int osip_find_transaction_and_add_event (osip_t * osip, osip_event_t * ev t); int osip_find_transaction_and_add_event (osip_t * osip, osip_event_t * ev t);
/** /**
* 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_event_t osip_transaction_t *osip_create_transaction (osip_t * osip,
* 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.
*/ */
osip_event_t *osip_parse (char *buf); osip_event_t *osip_parse (char *buf);
#ifdef OSIP_RETRANSMIT_2XX #ifdef OSIP_RETRANSMIT_2XX
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, struct osip_dialog *d void osip_start_200ok_retransmissions (osip_t * osip,
ialog, osip_message_t *msg200ok, int sock); struct osip_dialog *dialog,
osip_message_t * msg200ok, int sock
);
/** /**
* Start out of fsm ACK retransmissions. This is usefull for user-agents. * Start out of fsm ACK retransmissions. This is usefull for user-agents.
* @param osip The osip_t structure. * @param osip The osip_t structure.
* @param dialog The dialog the ACK is part of. * @param dialog The dialog the ACK is part of.
* @param ack The ACK that has just been sent in response to a 200 Ok. * @param ack The ACK that has just been sent in response to a 200 Ok.
* @param dest The destination host. * @param dest The destination host.
* @param sock The destination port. * @param sock The destination port.
* @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_ack_retransmissions(osip_t *osip, struct osip_dialog *dia void osip_start_ack_retransmissions (osip_t * osip,
log, osip_message_t *ack, char *dest, int port, int sock); struct osip_dialog *dialog,
osip_message_t * ack, char *dest,
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); void 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, struct osip_dial void osip_stop_retransmissions_from_dialog (osip_t * osip,
og *dialog); struct osip_dialog *dialog);
#endif #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.
*/ */
void osip_event_free( osip_event_t *event ); void osip_event_free (osip_event_t * event);
/** /**
* Register the callback used to send SIP message. * Register the callback used to send SIP message.
* @param cf The osip element attached to the transaction. * @param cf The osip element attached to the transaction.
* @param cb The method we want to register. * @param cb The method we want to register.
*/ */
void osip_set_cb_send_message (osip_t * cf, void osip_set_cb_send_message (osip_t * cf,
int (*cb) (osip_transaction_t *, int (*cb) (osip_transaction_t *,
osip_message_t *, char *, osip_message_t *, char *,
int, int)); int, int));
 End of changes. 49 change blocks. 
220 lines changed or deleted 230 lines changed or added


 osip_accept.h   osip_accept.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_ACCEPT_H_ #define _OSIP_ACCEPT_H_
#include <osipparser2/headers/osip_content_type.h> #include <osipparser2/headers/osip_content_type.h>
/** /**
* @file osip_accept.h * @file osip_accept.h
* @brief oSIP osip_accept header definition. * @brief oSIP osip_accept header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_ACCEPT oSIP accept header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for accept headers. * Structure for accept headers.
* @defvar osip_accept_t * @defvar osip_accept_t
*/ */
typedef osip_content_type_t osip_accept_t; typedef osip_content_type_t osip_accept_t;
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_accept_encoding.h   osip_accept_encoding.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_ACCEPT_ENCONDING_H_ #define _OSIP_ACCEPT_ENCONDING_H_
#include <osipparser2/osip_list.h> #include <osipparser2/osip_list.h>
/** /**
* @file osip_accept_encoding.h * @file osip_accept_encoding.h
* @brief oSIP osip_accept_encoding header definition. * @brief oSIP osip_accept_encoding header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_ACCEPT_ENCODING oSIP accept-encoding header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Accept-Encoding header. * Structure for Accept-Encoding header.
* @defvar osip_accept_encoding_t * @defvar osip_accept_encoding_t
*/ */
typedef struct osip_accept_encoding osip_accept_encoding_t; typedef struct osip_accept_encoding osip_accept_encoding_t;
struct osip_accept_encoding struct osip_accept_encoding
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_accept_language.h   osip_accept_language.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_ACCEPT_LANGUAGE_H_ #define _OSIP_ACCEPT_LANGUAGE_H_
#include <osipparser2/headers/osip_accept_encoding.h> #include <osipparser2/headers/osip_accept_encoding.h>
/** /**
* @file osip_accept_language.h * @file osip_accept_language.h
* @brief oSIP osip_accept_language header definition. * @brief oSIP osip_accept_language header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_ACCEPT_LANGUAGE oSIP accept-language header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Accept-Language headers. * Structure for Accept-Language headers.
* @defvar osip_accept_language_t * @defvar 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
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_alert_info.h   osip_alert_info.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_ALERT_INFO_H_ #define _OSIP_ALERT_INFO_H_
#include <osipparser2/headers/osip_call_info.h> #include <osipparser2/headers/osip_call_info.h>
/** /**
* @file osip_alert_info.h * @file osip_alert_info.h
* @brief oSIP osip_alert_info header definition. * @brief oSIP osip_alert_info header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_ALERT_INFO oSIP alert-info definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Alert-Info headers. * Structure for Alert-Info headers.
* @defvar osip_alert_info_t * @defvar 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
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_allow.h   osip_allow.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_ALLOW_H_ #define _OSIP_ALLOW_H_
#include <osipparser2/headers/osip_content_length.h> #include <osipparser2/headers/osip_content_length.h>
/** /**
* @file osip_allow.h * @file osip_allow.h
* @brief oSIP osip_allow header definition. * @brief oSIP osip_allow header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_ALLOW oSIP allow header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Allow headers. * Structure for Allow headers.
* @defvar osip_allow_t * @defvar osip_allow_t
*/ */
typedef osip_content_length_t osip_allow_t; typedef osip_content_length_t osip_allow_t;
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_authorization.h   osip_authorization.h 
skipping to change at line 29 skipping to change at line 29
#ifndef _OSIP_AUTHORIZATION_H_ #ifndef _OSIP_AUTHORIZATION_H_
#define _OSIP_AUTHORIZATION_H_ #define _OSIP_AUTHORIZATION_H_
/** /**
* @file osip_authorization.h * @file osip_authorization.h
* @brief oSIP osip_authorization header definition. * @brief oSIP osip_authorization header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_AUTHORIZATION oSIP authorization header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Authorization headers. * Structure for Authorization headers.
* @defvar osip_authorization_t * @defvar osip_authorization_t
*/ */
typedef struct osip_authorization osip_authorization_t; typedef struct osip_authorization osip_authorization_t;
struct osip_authorization struct osip_authorization
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_body.h   osip_body.h 
skipping to change at line 41 skipping to change at line 41
/** /**
* @defgroup oSIP_BODY oSIP body API * @defgroup oSIP_BODY oSIP body API
* @ingroup oSIP * @ingroup oSIP
* @{ * @{
*/ */
/** /**
* Structure for Body * Structure for Body
* @defvar osip_body_t * @defvar osip_body_t
*/ */
typedef struct osip_body osip_body_t; typedef struct osip_body osip_body_t;
struct osip_body struct osip_body
{ {
char *body; char *body;
osip_list_t *headers; osip_list_t *headers;
osip_content_type_t *content_type; osip_content_type_t *content_type;
}; };
#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 90 skipping to change at line 90
* @param buf The buffer to parse. * @param buf 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);
/** /**
* 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.
*/ */
int osip_body_to_str (const osip_body_t * body, char **dest); int osip_body_to_str (const osip_body_t * body, char **dest);
/**
* Set the Content-Type header in the osip_body_t element.
* @param body The element to work on.
* @param hvalue The content type string value.
*/
int osip_body_set_contenttype (osip_body_t * body, const char *hvalue);
/**
* Add a header in the osip_body_t element.
* @param body The element to work on.
* @param hvalue The header string value.
*/
int osip_body_set_header (osip_body_t * body, const char *hname,
const char *hvalue);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/** @} */ /** @} */
#endif #endif
 End of changes. 3 change blocks. 
7 lines changed or deleted 22 lines changed or added


 osip_call_id.h   osip_call_id.h 
skipping to change at line 29 skipping to change at line 29
#ifndef _OSIP_CALL_ID_H_ #ifndef _OSIP_CALL_ID_H_
#define _OSIP_CALL_ID_H_ #define _OSIP_CALL_ID_H_
/** /**
* @file osip_call_id.h * @file osip_call_id.h
* @brief oSIP osip_call_id header definition. * @brief oSIP osip_call_id header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_CALL_ID oSIP call-id header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Call-Id headers. * Structure for Call-Id headers.
* @defvar osip_call_id_t * @defvar osip_call_id_t
*/ */
typedef struct osip_call_id osip_call_id_t; typedef struct osip_call_id osip_call_id_t;
struct osip_call_id struct osip_call_id
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_call_info.h   osip_call_info.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_CALL_INFO_H_ #define _OSIP_CALL_INFO_H_
#include <osipparser2/osip_list.h> #include <osipparser2/osip_list.h>
/** /**
* @file osip_call_info.h * @file osip_call_info.h
* @brief oSIP osip_call_info header definition. * @brief oSIP osip_call_info header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_CALL_INFO oSIP call-info header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Call-Info headers. * Structure for Call-Info headers.
* @defvar osip_call_info_t * @defvar osip_call_info_t
*/ */
typedef struct osip_call_info osip_call_info_t; typedef struct osip_call_info osip_call_info_t;
struct osip_call_info struct osip_call_info
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_condv.h   osip_condv.h 
skipping to change at line 64 skipping to change at line 64
#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 * @defvar 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 (); 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
*/ */
int osip_cond_wait (struct osip_cond * cond, struct osip_mutex * mut); int osip_cond_wait (struct osip_cond *cond, struct osip_mutex *mut);
/** /**
* Timed wait on the condition variable. * Timed 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
* @param abstime time to wait until * @param abstime time to wait until
*/ */
int osip_cond_timedwait (struct osip_cond * cond, struct osip_mutex * mut , int osip_cond_timedwait (struct osip_cond *cond, struct osip_mutex *mut,
const struct timespec *abstime); const struct timespec *abstime);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
/** @} */ /** @} */
 End of changes. 6 change blocks. 
7 lines changed or deleted 7 lines changed or added


 osip_contact.h   osip_contact.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_CONTACT_H_ #define _OSIP_CONTACT_H_
#include <osipparser2/headers/osip_from.h> #include <osipparser2/headers/osip_from.h>
/** /**
* @file osip_contact.h * @file osip_contact.h
* @brief oSIP osip_contact header definition. * @brief oSIP osip_contact header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_CONTACT oSIP contact header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Contact headers. * Structure for Contact headers.
* @defvar osip_contact_t * @defvar osip_contact_t
*/ */
typedef osip_from_t osip_contact_t; typedef osip_from_t osip_contact_t;
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_content_disposition.h   osip_content_disposition.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_CONTENT_DISPOSITION_H_ #define _OSIP_CONTENT_DISPOSITION_H_
#include <osipparser2/headers/osip_call_info.h> #include <osipparser2/headers/osip_call_info.h>
/** /**
* @file osip_content_disposition.h * @file osip_content_disposition.h
* @brief oSIP osip_content_disposition header definition. * @brief oSIP osip_content_disposition header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_CONTENT_DISPOSITION oSIP content-disposition definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Content-Disposition headers. * Structure for Content-Disposition headers.
* @defvar osip_content_disposition_t * @defvar 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
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_content_encoding.h   osip_content_encoding.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_CONTENT_ENCODING_H_ #define _OSIP_CONTENT_ENCODING_H_
#include <osipparser2/headers/osip_content_length.h> #include <osipparser2/headers/osip_content_length.h>
/** /**
* @file osip_content_encoding.h * @file osip_content_encoding.h
* @brief oSIP osip_content_encoding header definition. * @brief oSIP osip_content_encoding header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_CONTENT_ENCODING oSIP content-encoding header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Content-Encoding headers. * Structure for Content-Encoding headers.
* @defvar osip_content_encoding_t * @defvar 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
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_content_length.h   osip_content_length.h 
skipping to change at line 29 skipping to change at line 29
#ifndef _OSIP_CONTENT_LENGTH_H_ #ifndef _OSIP_CONTENT_LENGTH_H_
#define _OSIP_CONTENT_LENGTH_H_ #define _OSIP_CONTENT_LENGTH_H_
/** /**
* @file osip_content_length.h * @file osip_content_length.h
* @brief oSIP osip_content_length header definition. * @brief oSIP osip_content_length header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_CONTENT_LENGTH oSIP content-length definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Content-Length headers. * Structure for Content-Length headers.
* @defvar osip_content_length_t * @defvar osip_content_length_t
*/ */
typedef struct osip_content_length osip_content_length_t; typedef struct osip_content_length osip_content_length_t;
struct osip_content_length struct osip_content_length
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_content_type.h   osip_content_type.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_CONTENT_TYPE_H_ #define _OSIP_CONTENT_TYPE_H_
#include <osipparser2/osip_list.h> #include <osipparser2/osip_list.h>
/** /**
* @file osip_content_type.h * @file osip_content_type.h
* @brief oSIP osip_content_type header definition. * @brief oSIP osip_content_type header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_CONTENT_TYPE oSIP content-type header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Content-Type headers. * Structure for Content-Type headers.
* @defvar osip_content_type_t * @defvar osip_content_type_t
*/ */
typedef struct osip_content_type osip_content_type_t; typedef struct osip_content_type osip_content_type_t;
struct osip_content_type struct osip_content_type
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_cseq.h   osip_cseq.h 
skipping to change at line 29 skipping to change at line 29
#ifndef _OSIP_CSEQ_H_ #ifndef _OSIP_CSEQ_H_
#define _OSIP_CSEQ_H_ #define _OSIP_CSEQ_H_
/** /**
* @file osip_cseq.h * @file osip_cseq.h
* @brief oSIP osip_cseq header definition. * @brief oSIP osip_cseq header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_CSEQ oSIP cseq header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for CSeq headers. * Structure for CSeq headers.
* @defvar osip_cseq_t * @defvar osip_cseq_t
*/ */
typedef struct osip_cseq osip_cseq_t; typedef struct osip_cseq osip_cseq_t;
struct osip_cseq struct osip_cseq
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_dialog.h   osip_dialog.h 
skipping to change at line 146 skipping to change at line 146
* <UL><LI>NOTE1: Only INVITE transactions can create a dialog.</LI> * <UL><LI>NOTE1: Only INVITE transactions can create a dialog.</LI>
* <LI>NOTE2: The dialog should be created when the first response is recei ved. * <LI>NOTE2: The dialog should be created when the first response is recei ved.
* (except for a 100 Trying)</LI> * (except for a 100 Trying)</LI>
* <LI>NOTE3: Remote UA should be compliant! If not (not tag in the to head er?) * <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.</LI></UL>
* @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, osip_message_t * re int osip_dialog_init_as_uac (osip_dialog_t ** dialog,
sponse); 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>
* @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 *next_request, int local_cseq); osip_message_t *
next_request,
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: Only INVITE transactions can create a dialog.
* NOTE2: 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, osip_message_t * in int osip_dialog_init_as_uas (osip_dialog_t ** dialog,
vite, 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.
* @param dialog The element to free. * @param dialog The element to free.
*/ */
void osip_dialog_free (osip_dialog_t * dialog); void osip_dialog_free (osip_dialog_t * dialog);
/** /**
* Set the state of the dialog. * Set the state of the dialog.
* 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).
skipping to change at line 190 skipping to change at line 195
/** /**
* 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 (except 100 Trying)
* 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, osip_mes int osip_dialog_update_route_set_as_uas (osip_dialog_t * dialog,
sage_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.
* @param request The request received. * @param request The request received.
*/ */
int osip_dialog_update_osip_cseq_as_uas (osip_dialog_t * dialog, osip_mes int osip_dialog_update_osip_cseq_as_uas (osip_dialog_t * dialog,
sage_t * request); osip_message_t * request);
/** /**
* Match a response received with a dialog. * Match a response received with a dialog.
* @param dialog The element to work on. * @param dialog The element to work on.
* @param response The response received. * @param response The response received.
*/ */
int osip_dialog_match_as_uac (osip_dialog_t * dialog, osip_message_t * re int osip_dialog_match_as_uac (osip_dialog_t * dialog,
sponse); osip_message_t * response);
/** /**
* Update the tag as UAC of a dialog?. (this could be needed if the 180 * Update the tag as UAC of a dialog?. (this could be needed if the 180
* does not contains any tag, but the 200 contains one. * does not contains any tag, but the 200 contains one.
* @param dialog The element to work on. * @param dialog The element to work on.
* @param response The response received. * @param response The response received.
*/ */
int osip_dialog_update_tag_as_uac (osip_dialog_t * dialog, osip_message_t int osip_dialog_update_tag_as_uac (osip_dialog_t * dialog,
* response); osip_message_t * response);
/** /**
* Update the Route-Set as UAC of a dialog. * Update the Route-Set as UAC 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 (except 100 Trying)
* received for a dialog. * received for a dialog.
* @param dialog The element to work on. * @param dialog The element to work on.
* @param response The response received. * @param response The response received.
*/ */
int osip_dialog_update_route_set_as_uac (osip_dialog_t * dialog, osip_mes int osip_dialog_update_route_set_as_uac (osip_dialog_t * dialog,
sage_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, osip_message_t * re int osip_dialog_match_as_uas (osip_dialog_t * dialog,
quest); osip_message_t * request);
#ifndef DOXYGEN #ifndef DOXYGEN
int osip_dialog_is_originator (osip_dialog_t * dialog); int osip_dialog_is_originator (osip_dialog_t * dialog);
int osip_dialog_is_callee (osip_dialog_t * dialog); int osip_dialog_is_callee (osip_dialog_t * dialog);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 9 change blocks. 
19 lines changed or deleted 21 lines changed or added


 osip_error_info.h   osip_error_info.h 
skipping to change at line 27 skipping to change at line 27
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_ERROR_INFO_H_ #ifndef _OSIP_ERROR_INFO_H_
#define _OSIP_ERROR_INFO_H_ #define _OSIP_ERROR_INFO_H_
#include <osipparser2/headers/osip_call_info.h> #include <osipparser2/headers/osip_call_info.h>
/** /**
* @file osip_error_info.h * @file osip_error_info.h
* @brief oSIP error info header definition. * @brief oSIP osip_error_info header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_ERROR_INFO oSIP error-info definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Error-Info headers. * Structure for Error-Info headers.
* @defvar osip_error_info_t * @defvar 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
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 osip_from.h   osip_from.h 
skipping to change at line 32 skipping to change at line 32
#include <osipparser2/osip_list.h> #include <osipparser2/osip_list.h>
#include <osipparser2/osip_uri.h> #include <osipparser2/osip_uri.h>
/** /**
* @file osip_from.h * @file osip_from.h
* @brief oSIP osip_from header definition. * @brief oSIP osip_from header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_FROM oSIP from header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for From headers. * Structure for From headers.
* @defvar osip_from_t * @defvar osip_from_t
*/ */
typedef struct osip_from osip_from_t; typedef struct osip_from osip_from_t;
struct osip_from struct osip_from
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_header.h   osip_header.h 
skipping to change at line 27 skipping to change at line 27
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_HEADER_H_ #ifndef _OSIP_HEADER_H_
#define _OSIP_HEADER_H_ #define _OSIP_HEADER_H_
#include <osipparser2/osip_uri.h> #include <osipparser2/osip_uri.h>
/** /**
* @file osip_header.h * @file osip_header.h
* @brief oSIP SIP Headers Routines * @brief oSIP osip_header definition.
* *
*/ */
/** /**
* @defgroup oSIP_HEADER oSIP header API * @defgroup oSIP_HEADER oSIP header definition.
* @ingroup oSIP_HEADER * @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 * @defvar osip_header_t
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 osip_headers.h   osip_headers.h 
skipping to change at line 53 skipping to change at line 53
#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_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
* @brief oSIP osip_headers definition.
*/
/**
* @defgroup oSIP_HEADERS oSIP headers definitions
* @ingroup oSIP
* @{
*/
/** @} */
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 13 lines changed or added


 osip_message.h   osip_message.h 
skipping to change at line 84 skipping to change at line 84
/** /**
* Structure for SIP Message (REQUEST and RESPONSE). * Structure for SIP Message (REQUEST and RESPONSE).
* @defvar osip_message_t * @defvar osip_message_t
*/ */
typedef struct osip_message osip_message_t; typedef struct osip_message osip_message_t;
struct osip_message struct osip_message
{ {
/* Start-Line definition */ /* Start-Line definition */
char *sip_version; char *sip_version;
/* req */ /* req */
osip_uri_t *req_uri; osip_uri_t *req_uri;
char *sip_method; char *sip_method;
/* resp */ /* resp */
int status_code; int status_code;
char *reason_phrase; char *reason_phrase;
/* End of Start-Line definition */ /* End of Start-Line definition */
osip_list_t *accepts; osip_list_t *accepts;
osip_list_t *accept_encodings; osip_list_t *accept_encodings;
osip_list_t *accept_languages; osip_list_t *accept_languages;
osip_list_t *alert_infos; osip_list_t *alert_infos;
osip_list_t *allows; osip_list_t *allows;
osip_list_t *authorizations; osip_list_t *authorizations;
osip_call_id_t *call_id; osip_call_id_t *call_id;
osip_list_t *call_infos; osip_list_t *call_infos;
skipping to change at line 417 skipping to change at line 417
* @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_generic_param_get_byname(LIST,NAME,DEST) osip_uri_param_get_by name(LIST,NAME,DEST) #define osip_generic_param_get_byname(LIST,NAME,DEST) osip_uri_param_get_by name(LIST,NAME,DEST)
/** /**
* Set the name of a generic parameter element. * Set the name of a generic parameter element.
* @param generic_param The element to work on. * @param generic_param The element to work on.
* @param name the token name to set. * @param name the token name to set.
*/ */
void osip_generic_param_set_name (osip_generic_param_t * generic_param, c void osip_generic_param_set_name (osip_generic_param_t * generic_param,
har *name); char *name);
/** /**
* Get the name of a generic parameter element. * Get the name of a generic parameter element.
* @param generic_param The element to work on. * @param generic_param The element to work on.
*/ */
char *osip_generic_param_get_name (const osip_generic_param_t * generic_p char *osip_generic_param_get_name (const osip_generic_param_t *
aram); generic_param);
/** /**
* Set the value of a generic parameter element. * Set the value of a generic parameter element.
* @param generic_param The element to work on. * @param generic_param The element to work on.
* @param value the token name to set. * @param value the token name to set.
*/ */
void osip_generic_param_set_value (osip_generic_param_t * generic_param, void osip_generic_param_set_value (osip_generic_param_t * generic_param,
char *value); char *value);
/** /**
* Get the value of a generic parameter element. * Get the value of a generic parameter element.
* @param generic_param The element to work on. * @param generic_param The element to work on.
*/ */
char *osip_generic_param_get_value (const osip_generic_param_t * generic_ char *osip_generic_param_get_value (const osip_generic_param_t *
param); generic_param);
/** @} */ /** @} */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 7 change blocks. 
13 lines changed or deleted 13 lines changed or added


 osip_mime_version.h   osip_mime_version.h 
skipping to change at line 32 skipping to change at line 32
#include <osipparser2/osip_list.h> #include <osipparser2/osip_list.h>
#include <osipparser2/osip_uri.h> #include <osipparser2/osip_uri.h>
/** /**
* @file osip_mime_version.h * @file osip_mime_version.h
* @brief oSIP osip_mime_version header definition. * @brief oSIP osip_mime_version header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_MIME_VERSION oSIP mime-version header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Mime-Version headers. * Structure for Mime-Version headers.
* @defvar osip_mime_version_t * @defvar 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
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_mt.h   osip_mt.h 
skipping to change at line 63 skipping to change at line 63
* @var osip_thread_t * @var osip_thread_t
*/ */
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, void *(*func) (voi struct osip_thread *osip_thread_create (int stacksize,
d *), void *arg); void *(*func) (void *), void *arg)
;
/** /**
* Join a thread. * Join a thread.
* @param thread The thread to join. * @param thread The thread to join.
*/ */
int osip_thread_join (struct osip_thread * thread); int osip_thread_join (struct osip_thread *thread);
/** /**
* Set the priority of a thread. (NOT IMPLEMENTED ON ALL SYSTEMS) * Set the priority of a thread. (NOT IMPLEMENTED ON ALL SYSTEMS)
* @param thread The thread to work on. * @param thread The thread to work on.
* @param priority The priority value to set. * @param priority The priority value to set.
*/ */
int osip_thread_set_priority (struct osip_thread * thread, int priority); int osip_thread_set_priority (struct osip_thread *thread, int priority);
/** /**
* Exit from a thread. * Exit from a thread.
*/ */
void osip_thread_exit (); 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 oSIP
skipping to change at line 114 skipping to change at line 115
/** /**
* 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.
* @param sem The semaphore to destroy. * @param sem The semaphore to destroy.
*/ */
int osip_sem_destroy (struct osip_sem * sem); int osip_sem_destroy (struct osip_sem *sem);
/** /**
* Post operation on a semaphore. * Post operation on a semaphore.
* @param sem The semaphore to destroy. * @param sem The semaphore to destroy.
*/ */
int osip_sem_post (struct osip_sem * sem); int osip_sem_post (struct osip_sem *sem);
/** /**
* Wait operation on a semaphore. * Wait operation on a semaphore.
* NOTE: this call will block if the semaphore is at 0. * NOTE: this call will block if the semaphore is at 0.
* @param sem The semaphore to destroy. * @param sem The semaphore to destroy.
*/ */
int osip_sem_wait (struct osip_sem * sem); int osip_sem_wait (struct osip_sem *sem);
/** /**
* Wait operation on a semaphore. * Wait operation on a semaphore.
* NOTE: if the semaphore is at 0, this call won't block. * NOTE: if the semaphore is at 0, this call won't block.
* @param sem The semaphore to destroy. * @param sem The semaphore to destroy.
*/ */
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 oSIP
skipping to change at line 159 skipping to change at line 160
/** /**
* Structure for referencing a semaphore element. * Structure for referencing a semaphore element.
* @defvar struct osip_mutex * @defvar 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 (); 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.
*/ */
void osip_mutex_destroy (struct osip_mutex * mut); void osip_mutex_destroy (struct osip_mutex *mut);
/** /**
* Lock the mutex. * Lock the mutex.
* @param mut The mutex to lock. * @param mut The mutex to lock.
*/ */
int osip_mutex_lock (struct osip_mutex * mut); int osip_mutex_lock (struct osip_mutex *mut);
/** /**
* Unlock the mutex. * Unlock the mutex.
* @param mut The mutex to unlock. * @param mut The mutex to unlock.
*/ */
int osip_mutex_unlock (struct osip_mutex * mut); int osip_mutex_unlock (struct osip_mutex *mut);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/** @} */ /** @} */
#endif /* OSIP_MT */ #endif /* OSIP_MT */
#endif /* end of _THREAD_H_ */ #endif /* end of _THREAD_H_ */
 End of changes. 12 change blocks. 
13 lines changed or deleted 14 lines changed or added


 osip_negotiation.h   osip_negotiation.h 
skipping to change at line 157 skipping to change at line 157
* Free a negotiation context. * Free a negotiation context.
* @param ctx The element to work on. * @param ctx The element to work on.
*/ */
void osip_negotiation_ctx_free (osip_negotiation_ctx_t * ctx); void osip_negotiation_ctx_free (osip_negotiation_ctx_t * ctx);
/** /**
* Set the context associated to this negotiation. * Set the context associated to this negotiation.
* @param ctx The element to work on. * @param ctx The element to work on.
* @param value A pointer to your personal context. * @param value A pointer to your personal context.
*/ */
int osip_negotiation_ctx_set_mycontext (osip_negotiation_ctx_t * ctx, voi int osip_negotiation_ctx_set_mycontext (osip_negotiation_ctx_t * ctx,
d *value); void *value);
/** /**
* Get the context associated to this negotiation. * Get the context associated to this negotiation.
* @param ctx The element to work on. * @param ctx The element to work on.
*/ */
void *osip_negotiation_ctx_get_mycontext (osip_negotiation_ctx_t * ctx); void *osip_negotiation_ctx_get_mycontext (osip_negotiation_ctx_t * ctx);
/** /**
* Set the local SDP packet associated to this negotiation. * Set the local SDP packet associated to this negotiation.
* NOTE: This is done by the 'negotiator'. (You only need to give * NOTE: This is done by the 'negotiator'. (You only need to give
* the remote SDP packet) * the remote SDP packet)
* @param ctx The element to work on. * @param ctx The element to work on.
* @param sdp The local SDP packet. * @param sdp The local SDP packet.
*/ */
int osip_negotiation_ctx_set_local_sdp (osip_negotiation_ctx_t * ctx, sdp int osip_negotiation_ctx_set_local_sdp (osip_negotiation_ctx_t * ctx,
_message_t * sdp); sdp_message_t * sdp);
/** /**
* Get the local SDP packet associated to this negotiation. * Get the local SDP packet associated to this negotiation.
* @param ctx The element to work on. * @param ctx The element to work on.
*/ */
sdp_message_t *osip_negotiation_ctx_get_local_sdp (osip_negotiation_ctx_t sdp_message_t *osip_negotiation_ctx_get_local_sdp (osip_negotiation_ctx_t
* ctx); *
ctx);
/** /**
* Set the remote SDP packet associated to this negotiation. * Set the remote SDP packet associated to this negotiation.
* @param ctx The element to work on. * @param ctx The element to work on.
* @param sdp The remote SDP packet. * @param sdp The remote SDP packet.
*/ */
int osip_negotiation_ctx_set_remote_sdp (osip_negotiation_ctx_t * ctx, sd int osip_negotiation_ctx_set_remote_sdp (osip_negotiation_ctx_t * ctx,
p_message_t * sdp); sdp_message_t * sdp);
/** /**
* Get the remote SDP packet associated to this negotiation. * Get the remote SDP packet associated to this negotiation.
* @param ctx The element to work on. * @param ctx The element to work on.
*/ */
sdp_message_t *osip_negotiation_ctx_get_remote_sdp (osip_negotiation_ctx_ sdp_message_t *osip_negotiation_ctx_get_remote_sdp (osip_negotiation_ctx_
t * ctx); t *
ctx);
/** /**
* Structure for storing the global configuration management. * Structure for storing the global configuration management.
* 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
skipping to change at line 244 skipping to change at line 249
char *(*fcn_get_audio_port) (void *, int); char *(*fcn_get_audio_port) (void *, int);
char *(*fcn_get_video_port) (void *, int); char *(*fcn_get_video_port) (void *, int);
char *(*fcn_get_other_port) (void *, int); char *(*fcn_get_other_port) (void *, int);
}; };
/** /**
* 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.
* This method must be called once when the application is stopped. * This method must be called once when the application is stopped.
*/ */
void osip_negotiation_free (osip_negotiation_t *conf); void osip_negotiation_free (osip_negotiation_t * conf);
/** /**
* Set the local username ('o' field) of all local SDP packet. * Set the local username ('o' field) of all local SDP packet.
* @param tmp The username. * @param tmp The username.
*/ */
int osip_negotiation_set_o_username (osip_negotiation_t *, char *tmp); int osip_negotiation_set_o_username (osip_negotiation_t *, char *tmp);
/** /**
* Set the local session id ('o' field) of all local SDP packet. * Set the local session id ('o' field) of all local SDP packet.
* WARNING: this field should be updated for each new SDP packet? * WARNING: this field should be updated for each new SDP packet?
* @param tmp The session id. * @param tmp The session id.
*/ */
int osip_negotiation_set_o_session_id (osip_negotiation_t *, char *tmp); int osip_negotiation_set_o_session_id (osip_negotiation_t *, char *tmp);
/** /**
* Set the local session version ('o' field) of all local SDP packet. * Set the local session version ('o' field) of all local SDP packet.
* WARNING: this field should be updated for each new SDP packet? * WARNING: this field should be updated for each new SDP packet?
* @param tmp The session version. * @param tmp The session version.
*/ */
int osip_negotiation_set_o_session_version (osip_negotiation_t *, char *t int osip_negotiation_set_o_session_version (osip_negotiation_t *,
mp); char *tmp);
/** /**
* Set the local network type ('o' field) of all local SDP packet. * Set the local network type ('o' field) of all local SDP packet.
* @param tmp The network type. * @param tmp The network type.
*/ */
int osip_negotiation_set_o_nettype (osip_negotiation_t *, char *tmp); int osip_negotiation_set_o_nettype (osip_negotiation_t *, char *tmp);
/** /**
* Set the local address type ('o' field) of all local SDP packet. * Set the local address type ('o' field) of all local SDP packet.
* @param tmp The address type. * @param tmp The address type.
*/ */
int osip_negotiation_set_o_addrtype (osip_negotiation_t *, char *tmp); int osip_negotiation_set_o_addrtype (osip_negotiation_t *, char *tmp);
skipping to change at line 303 skipping to change at line 309
int osip_negotiation_set_c_addrtype (osip_negotiation_t *, char *tmp); int osip_negotiation_set_c_addrtype (osip_negotiation_t *, char *tmp);
/** /**
* Set the local IP address ('c' field) of all local SDP packet. * Set the local IP address ('c' field) of all local SDP packet.
* @param tmp The IP address. * @param tmp The IP address.
*/ */
int osip_negotiation_set_c_addr (osip_negotiation_t *, char *tmp); int osip_negotiation_set_c_addr (osip_negotiation_t *, char *tmp);
/** /**
* Set the local ttl for multicast address ('c' field) of all local SDP pac ket. * Set the local ttl for multicast address ('c' field) of all local SDP pac ket.
* @param tmp The ttl for multicast address. * @param tmp The ttl for multicast address.
*/ */
int osip_negotiation_set_c_addr_multicast_ttl (osip_negotiation_t *, char int osip_negotiation_set_c_addr_multicast_ttl (osip_negotiation_t *,
*tmp); char *tmp);
/** /**
* Set the local int for multicast address ('c' field) of all local SDP pac ket. * Set the local int for multicast address ('c' field) of all local SDP pac ket.
* @param tmp The int for multicast address. * @param tmp The int for multicast address.
*/ */
int osip_negotiation_set_c_addr_multicast_int (osip_negotiation_t *, char int osip_negotiation_set_c_addr_multicast_int (osip_negotiation_t *,
*tmp); char *tmp);
/** /**
* Add a supported audio codec. * Add a supported audio codec.
* Those codecs will be accepted as long as you return 0 when * Those codecs will be accepted as long as you return 0 when
* the callback 'fcn_accept_audio_codec' is called with the specific payloa d. * the callback 'fcn_accept_audio_codec' is called with the specific payloa d.
* @param payload The payload. * @param payload The payload.
* @param number_of_port The number of port (channel) for this codec. * @param number_of_port The number of port (channel) for this codec.
* @param proto The protocol. * @param proto The protocol.
* @param c_nettype The network type in the 'c' field. * @param c_nettype The network type in the 'c' field.
* @param c_addrtype The address type in the 'c' field. * @param c_addrtype The address type in the 'c' field.
* @param c_addr The address in the 'c' field. * @param c_addr The address in the 'c' field.
* @param c_addr_multicast_ttl The ttl for multicast address in the 'c' fie ld. * @param c_addr_multicast_ttl The ttl for multicast address in the 'c' fie ld.
* @param c_addr_multicast_int The int for multicast address in the 'c' fie ld. * @param c_addr_multicast_int The int for multicast address in the 'c' fie ld.
* @param a_rtpmap The rtpmap attribute in the 'a' field. * @param a_rtpmap The rtpmap attribute in the 'a' field.
*/ */
int osip_negotiation_add_support_for_audio_codec (osip_negotiation_t *, c int osip_negotiation_add_support_for_audio_codec (osip_negotiation_t *,
har *payload, char *payload,
char *number_of_port, char *number_of_port,
char *proto, char *c_nettype, char *proto,
char *c_addrtype, char *c_addr char *c_nettype,
, char *c_addrtype,
char *c_addr_multicast_ttl, char *c_addr,
char *c_addr_multicast_int, char
char *a_rtpmap); *c_addr_multicast_ttl,
char
*c_addr_multicast_int,
char *a_rtpmap);
/** /**
* Add a supported video codec. * Add a supported video codec.
* Those codecs will be accepted as long as you return 0 when * Those codecs will be accepted as long as you return 0 when
* the callback 'fcn_accept_video_codec' is called with the specific payloa d. * the callback 'fcn_accept_video_codec' is called with the specific payloa d.
* @param payload The payload. * @param payload The payload.
* @param number_of_port The number of port (channel) for this codec. * @param number_of_port The number of port (channel) for this codec.
* @param proto The protocol. * @param proto The protocol.
* @param c_nettype The network type in the 'c' field. * @param c_nettype The network type in the 'c' field.
* @param c_addrtype The address type in the 'c' field. * @param c_addrtype The address type in the 'c' field.
* @param c_addr The address in the 'c' field. * @param c_addr The address in the 'c' field.
* @param c_addr_multicast_ttl The ttl for multicast address in the 'c' fie ld. * @param c_addr_multicast_ttl The ttl for multicast address in the 'c' fie ld.
* @param c_addr_multicast_int The int for multicast address in the 'c' fie ld. * @param c_addr_multicast_int The int for multicast address in the 'c' fie ld.
* @param a_rtpmap The rtpmap attribute in the 'a' field. * @param a_rtpmap The rtpmap attribute in the 'a' field.
*/ */
int osip_negotiation_add_support_for_video_codec (osip_negotiation_t *, c int osip_negotiation_add_support_for_video_codec (osip_negotiation_t *,
har *payload, char *payload,
char *number_of_port, char *number_of_port,
char *proto, char *c_nettype, char *proto,
char *c_addrtype, char *c_addr char *c_nettype,
, char *c_addrtype,
char *c_addr_multicast_ttl, char *c_addr,
char *c_addr_multicast_int, char
char *a_rtpmap); *c_addr_multicast_ttl,
char
*c_addr_multicast_int,
char *a_rtpmap);
/** /**
* Add a supported (non-audio and non-video) codec. * Add a supported (non-audio and non-video) codec.
* Those codecs will be accepted as long as you return 0 when * Those codecs will be accepted as long as you return 0 when
* the callback 'fcn_accept_other_codec' is called with the specific payloa d. * the callback 'fcn_accept_other_codec' is called with the specific payloa d.
* @param payload The payload. * @param payload The payload.
* @param number_of_port The number of port (channel) for this codec. * @param number_of_port The number of port (channel) for this codec.
* @param proto The protocol. * @param proto The protocol.
* @param c_nettype The network type in the 'c' field. * @param c_nettype The network type in the 'c' field.
* @param c_addrtype The address type in the 'c' field. * @param c_addrtype The address type in the 'c' field.
* @param c_addr The address in the 'c' field. * @param c_addr The address in the 'c' field.
* @param c_addr_multicast_ttl The ttl for multicast address in the 'c' fie ld. * @param c_addr_multicast_ttl The ttl for multicast address in the 'c' fie ld.
* @param c_addr_multicast_int The int for multicast address in the 'c' fie ld. * @param c_addr_multicast_int The int for multicast address in the 'c' fie ld.
* @param a_rtpmap The rtpmap attribute in the 'a' field. * @param a_rtpmap The rtpmap attribute in the 'a' field.
*/ */
int osip_negotiation_add_support_for_other_codec (osip_negotiation_t *, c int osip_negotiation_add_support_for_other_codec (osip_negotiation_t *,
har *payload, char *payload,
char *number_of_port, char *number_of_port,
char *proto, char *c_nettype, char *proto,
char *c_addrtype, char *c_addr char *c_nettype,
, char *c_addrtype,
char *c_addr_multicast_ttl, char *c_addr,
char *c_addr_multicast_int, char
char *a_rtpmap); *c_addr_multicast_ttl,
char
*c_addr_multicast_int,
char *a_rtpmap);
#ifndef DOXYGEN #ifndef DOXYGEN
/** /**
* Free resource in the global sdp_config.. * Free resource in the global sdp_config..
*/ */
int osip_negotiation_remove_audio_payloads (); int osip_negotiation_remove_audio_payloads (osip_negotiation_t * config);
/** /**
* Free resource in the global sdp_config.. * Free resource in the global sdp_config..
*/ */
int osip_negotiation_remove_video_payloads (); int osip_negotiation_remove_video_payloads (osip_negotiation_t * config);
/** /**
* Free resource in the global sdp_config.. * Free resource in the global sdp_config..
*/ */
int osip_negotiation_remove_other_payloads (); int osip_negotiation_remove_other_payloads (osip_negotiation_t * config);
#endif #endif
/** /**
* Set the callback for setting info ('i' field) in a local SDP packet. * Set the callback for setting info ('i' field) in a local SDP packet.
* This callback is called once each time we need an 'i' field. * This callback is called once each time we need an 'i' field.
* @param fcn The callback. * @param fcn The callback.
*/ */
int osip_negotiation_set_fcn_set_info (osip_negotiation_t *, int osip_negotiation_set_fcn_set_info (osip_negotiation_t *,
int (*fcn) (osip_negotiation_ctx_t * int (*fcn) (osip_negotiation_ctx_t
, sdp_message_t *)); *,
sdp_message_t *));
/** /**
* Set the callback for setting a URI ('u' field) in a local SDP packet. * Set the callback for setting a URI ('u' field) in a local SDP packet.
* This callback is called once each time we need an 'u' field. * This callback is called once each time we need an 'u' field.
* @param fcn The callback. * @param fcn The callback.
*/ */
int osip_negotiation_set_fcn_set_uri (osip_negotiation_t *, int osip_negotiation_set_fcn_set_uri (osip_negotiation_t *,
int (*fcn) (osip_negotiation_ctx_t *, int (*fcn) (osip_negotiation_ctx_t *
sdp_message_t *)); ,
sdp_message_t *));
/** /**
* Set the callback for setting an email ('e' field) in a local SDP packet. * Set the callback for setting an email ('e' field) in a local SDP packet.
* This callback is called once each time we need an 'e' field. * This callback is called once each time we need an 'e' field.
* @param fcn The callback. * @param fcn The callback.
*/ */
int osip_negotiation_set_fcn_set_emails (osip_negotiation_t *, int osip_negotiation_set_fcn_set_emails (osip_negotiation_t *,
int (*fcn) (osip_negotiation_ctx_t int (*fcn) (osip_negotiation_ctx_
*, sdp_message_t *)); t
*, sdp_message_t *));
/** /**
* Set the callback for setting a phone ('p' field) in a local SDP packet. * Set the callback for setting a phone ('p' field) in a local SDP packet.
* This callback is called once each time we need an 'p' field. * This callback is called once each time we need an 'p' field.
* @param fcn The callback. * @param fcn The callback.
*/ */
int osip_negotiation_set_fcn_set_phones (osip_negotiation_t *, int osip_negotiation_set_fcn_set_phones (osip_negotiation_t *,
int (*fcn) (osip_negotiation_ctx_t int (*fcn) (osip_negotiation_ctx_
*, sdp_message_t *)); t
*, sdp_message_t *));
/** /**
* Set the callback for setting an attribute ('a' field) in a local SDP pac ket. * Set the callback for setting an attribute ('a' field) in a local SDP pac ket.
* This callback is called once each time we need an 'a' field. * This callback is called once each time we need an 'a' field.
* @param fcn The callback. * @param fcn The callback.
*/ */
int int
osip_negotiation_set_fcn_set_attributes (osip_negotiation_t *, osip_negotiation_set_fcn_set_attributes (osip_negotiation_t *,
int (*fcn) (osip_negotiation_ctx int (*fcn)
_t *, sdp_message_t *, int)); (osip_negotiation_ctx_t *,
sdp_message_t *, int));
/** /**
* Set the callback used to accept a codec during a negotiation. * Set the callback used to accept a codec during a negotiation.
* This callback is called once each time we need to accept a codec. * This callback is called once each time we need to accept a codec.
* @param fcn The callback. * @param fcn The callback.
*/ */
int int
osip_negotiation_set_fcn_accept_audio_codec (osip_negotiation_t *, osip_negotiation_set_fcn_accept_audio_codec (osip_negotiation_t *,
int (*fcn) (osip_negotiation int (*fcn)
_ctx_t *, char *, char *, int, char *)); (osip_negotiation_ctx_t *,
char *, char *, int,
char *));
/** /**
* Set the callback used to accept a codec during a negotiation. * Set the callback used to accept a codec during a negotiation.
* This callback is called once each time we need to accept a codec. * This callback is called once each time we need to accept a codec.
* @param fcn The callback. * @param fcn The callback.
*/ */
int int
osip_negotiation_set_fcn_accept_video_codec (osip_negotiation_t *, osip_negotiation_set_fcn_accept_video_codec (osip_negotiation_t *,
int (*fcn) (osip_negotiation int (*fcn)
_ctx_t *, char *, char *, int, char *)); (osip_negotiation_ctx_t *,
char *, char *, int,
char *));
/** /**
* Set the callback used to accept a codec during a negotiation. * Set the callback used to accept a codec during a negotiation.
* This callback is called once each time we need to accept a codec. * This callback is called once each time we need to accept a codec.
* @param fcn The callback. * @param fcn The callback.
*/ */
int int
osip_negotiation_set_fcn_accept_other_codec (osip_negotiation_t *, osip_negotiation_set_fcn_accept_other_codec (osip_negotiation_t *,
int (*fcn) (osip_negotiation int (*fcn)
_ctx_t *, char *, char *, char *, char *)); (osip_negotiation_ctx_t *,
char *, char *, char *,
char *));
/** /**
* Set the callback for setting the port number ('m' field) in a local SDP packet. * Set the callback for setting the port number ('m' field) in a local SDP packet.
* This callback is called once each time a 'm' line is accepted. * This callback is called once each time a 'm' line is accepted.
* @param fcn The callback. * @param fcn The callback.
*/ */
int osip_negotiation_set_fcn_get_audio_port (osip_negotiation_t *, char * int osip_negotiation_set_fcn_get_audio_port (osip_negotiation_t *,
(*fcn) (osip_negotiation_ctx_t *, int)); char
*(*fcn) (osip_negotiation_ctx
_t
*, int));
/** /**
* Set the callback for setting the port number ('m' field) in a local SDP packet. * Set the callback for setting the port number ('m' field) in a local SDP packet.
* This callback is called once each time a 'm' line is accepted. * This callback is called once each time a 'm' line is accepted.
* @param fcn The callback. * @param fcn The callback.
*/ */
int osip_negotiation_set_fcn_get_video_port (osip_negotiation_t *, char * int osip_negotiation_set_fcn_get_video_port (osip_negotiation_t *,
(*fcn) (osip_negotiation_ctx_t *, int)); char
*(*fcn) (osip_negotiation_ctx
_t
*, int));
/** /**
* Set the callback for setting the port number ('m' field) in a local SDP packet. * Set the callback for setting the port number ('m' field) in a local SDP packet.
* This callback is called once each time a 'm' line is accepted. * This callback is called once each time a 'm' line is accepted.
* @param fcn The callback. * @param fcn The callback.
*/ */
int osip_negotiation_set_fcn_get_other_port (osip_negotiation_t *, char * int osip_negotiation_set_fcn_get_other_port (osip_negotiation_t *,
(*fcn) (osip_negotiation_ctx_t *, int)); char
*(*fcn) (osip_negotiation_ctx
_t
*, int));
/** /**
* Start the automatic negotiation for a UA * Start the automatic negotiation for a UA
* NOTE: You can previously set context->mycontext to point to your * NOTE: You can previously set context->mycontext to point to your
* personal context. This way you'll get access to your personal context * personal context. This way you'll get access to your personal context
* in the callback and you can easily take the correct decisions. * in the callback and you can easily take the correct decisions.
* After this method is called, the negotiation will happen and * After this method is called, the negotiation will happen and
* 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 );
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 * con,
sdp_message_t ** sdp, sdp_message_t ** sdp,
char *audio_port, char *audio_port, char *video_port);
char *video_port);
int __osip_negotiation_sdp_build_offer (osip_negotiation_t *, int __osip_negotiation_sdp_build_offer (osip_negotiation_t *,
osip_negotiation_ctx_t * con, sdp_message_t ** sdp, osip_negotiation_ctx_t * con,
char *audio_port, sdp_message_t ** sdp,
char *video_port, char *audio_codec, char *video_co char *audio_port, char *video_port
dec); ,
char *audio_codec,
char *video_codec);
/* for non "on-hold sdp" in outgoing invite */ /* for non "on-hold sdp" in outgoing invite */
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 */ /* for an "on hold sdp" in outgoing invite */
int osip_negotiation_sdp_message_put_off_hold (sdp_message_t * sdp); int osip_negotiation_sdp_message_put_off_hold (sdp_message_t * sdp);
/** @} */ /** @} */
#ifdef __cplusplus #ifdef __cplusplus
} }
 End of changes. 29 change blocks. 
76 lines changed or deleted 108 lines changed or added


 osip_parser.h   osip_parser.h 
skipping to change at line 45 skipping to change at line 45
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
* Initialise the oSIP parser. * Initialise the oSIP parser.
*/ */
int parser_init (); int parser_init (void);
/** /**
* Fix the via header for INCOMING requests only. * Fix the via header for INCOMING requests only.
* a copy of ip_addr is done. * a copy of ip_addr is done.
*/ */
int osip_message_fix_last_via_header (osip_message_t * request, const cha int osip_message_fix_last_via_header (osip_message_t * request,
r *ip_addr, int port); const char *ip_addr, int port);
/** /**
* define this macro to avoid building several times * define this macro to avoid building several times
* the message on retransmissions. If you have changed * the message on retransmissions. If you have changed
* the osip_message_t element since last call of osip_message_to_str() you * the osip_message_t element since last call of osip_message_to_str() you
* can call osip_message_force_update() to force a rebuild. * can call osip_message_force_update() to force a rebuild.
*/ */
#ifdef USE_TMP_BUFFER
/** /**
* Check if the element is already built. (so osip_message_to_str won't bui ld it again) * Check if the element is already built. (so osip_message_to_str won't bui ld it again)
* @param sip The element to check. * @param sip The element to check.
*/ */
int osip_message_get__property (const osip_message_t * sip); int osip_message_get__property (const osip_message_t * sip);
#endif
/** /**
* Force a osip_message_t element to be rebuild on next osip_message_to_str () call. * Force a osip_message_t element to be rebuild on next osip_message_to_str () call.
* @param sip The element to work on. * @param sip The element to work on.
*/ */
int osip_message_force_update (osip_message_t * sip); int osip_message_force_update (osip_message_t * sip);
/** /**
* Get the usual reason phrase as defined in SIP for a specific status code . * Get the usual reason phrase as defined in SIP for a specific status code .
* @param status_code A status code. * @param status_code A status code.
skipping to change at line 91 skipping to change at line 90
* @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_accept (osip_message_t * sip, const char *hvalue); int osip_message_set_accept (osip_message_t * sip, const char *hvalue);
/** /**
* Get one Accept header. * Get one Accept 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_accept (const osip_message_t * sip, int pos, osip_ac int osip_message_get_accept (const osip_message_t * sip, int pos,
cept_t ** dest); osip_accept_t ** dest);
/** /**
* Set the Accept-encoding header. * Set the Accept-encoding 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_accept_encoding (osip_message_t * sip, const char *h int osip_message_set_accept_encoding (osip_message_t * sip,
value); const char *hvalue);
/** /**
* Get one Accept-encoding header. * Get one Accept-encoding 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_accept_encoding (const osip_message_t * sip, int pos , int osip_message_get_accept_encoding (const osip_message_t * sip, int pos ,
osip_accept_encoding_t ** dest); osip_accept_encoding_t ** dest);
/** /**
* Set the Accept-language header. * Set the Accept-language 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_accept_language (osip_message_t * sip, const char *h int osip_message_set_accept_language (osip_message_t * sip,
value); const char *hvalue);
/** /**
* Get one Accept header. * Get one Accept 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_accept_language (const osip_message_t * sip, int pos , int osip_message_get_accept_language (const osip_message_t * sip, int pos ,
osip_accept_language_t ** dest); osip_accept_language_t ** dest);
/** /**
* Set the Alert-info header. * Set the Alert-info 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_alert_info (osip_message_t * sip, const char *hvalue ); int osip_message_set_alert_info (osip_message_t * sip, const char *hvalue );
/** /**
* Get one Alert-info header. * Get one Alert-info 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_alert_info (const osip_message_t * sip, int pos, int osip_message_get_alert_info (const osip_message_t * sip, int pos,
osip_alert_info_t ** dest); osip_alert_info_t ** dest);
/** /**
* Set the Allow header. * Set the Allow 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_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, osip_all int osip_message_get_allow (const osip_message_t * sip, int pos,
ow_t ** dest); osip_allow_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, const char *hva int osip_message_set_authorization (osip_message_t * sip,
lue); 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.
* @param dest A pointer on the header found. * @param dest A pointer on the header found.
*/ */
int osip_message_get_authorization (const osip_message_t * sip, int pos, int osip_message_get_authorization (const osip_message_t * sip, int pos,
osip_authorization_t ** dest); osip_authorization_t ** dest);
/** /**
* Set the Call-id header. * Set the Call-id 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_call_id (osip_message_t * sip, const char *hvalue); int osip_message_set_call_id (osip_message_t * sip, const char *hvalue);
/** /**
* Get one Call-id header. * Get one Call-id header.
* @param sip The element to work on. * @param sip The element to work on.
*/ */
skipping to change at line 184 skipping to change at line 188
* @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_call_info (osip_message_t * sip, const char *hvalue) ; int osip_message_set_call_info (osip_message_t * sip, const char *hvalue) ;
/** /**
* Get one Call-info header. * Get one Call-info 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_call_info (const osip_message_t * sip, int pos, osip int osip_message_get_call_info (const osip_message_t * sip, int pos,
_call_info_t ** dest); osip_call_info_t ** dest);
/** /**
* Set the Contact header. * Set the Contact 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_contact (osip_message_t * sip, const char *hvalue); int osip_message_set_contact (osip_message_t * sip, const char *hvalue);
/** /**
* Get one Contact header. * Get one Contact 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_contact (const osip_message_t * sip, int pos, osip_c int osip_message_get_contact (const osip_message_t * sip, int pos,
ontact_t ** dest); osip_contact_t ** dest);
/** /**
* Set the Content-disposition header. * Set the Content-disposition 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_content_disposition (osip_message_t * sip, const cha int osip_message_set_content_disposition (osip_message_t * sip,
r *hvalue); const char *hvalue);
/** /**
* Get one Content-disposition header. * Get one Content-disposition 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_content_disposition (const osip_message_t * sip, int int osip_message_get_content_disposition (const osip_message_t * sip,
pos, int pos,
osip_content_disposition_t ** dest); osip_content_disposition_t **
dest);
/** /**
* Set the Content-encoding header. * Set the Content-encoding 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_content_encoding (osip_message_t * sip, const char * int osip_message_set_content_encoding (osip_message_t * sip,
hvalue); const char *hvalue);
/** /**
* Get one Content-encoding header. * Get one Content-encoding 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_content_encoding (const osip_message_t * sip, int po s, int osip_message_get_content_encoding (const osip_message_t * sip, int po s,
osip_content_encoding_t ** dest); osip_content_encoding_t ** dest);
/** /**
* Set the Content-length header. * Set the Content-length 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_content_length (osip_message_t * sip, const char *hv int osip_message_set_content_length (osip_message_t * sip,
alue); const char *hvalue);
/** /**
* Get one Content-length header. * Get one Content-length header.
* @param sip The element to work on. * @param sip The element to work on.
*/ */
osip_content_length_t *osip_message_get_content_length (const osip_messag osip_content_length_t *osip_message_get_content_length (const osip_messag
e_t * sip); e_t
* sip);
/** /**
* Set the Content-type header. * Set the Content-type 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_content_type (osip_message_t * sip, const char *hval int osip_message_set_content_type (osip_message_t * sip,
ue); const char *hvalue);
/** /**
* Get one Content-type header. * Get one Content-type header.
* @param sip The element to work on. * @param sip The element to work on.
*/ */
osip_content_type_t *osip_message_get_content_type (const osip_message_t osip_content_type_t *osip_message_get_content_type (const osip_message_t
* sip); *
sip);
/** /**
* Set the Cseq header. * Set the Cseq 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_cseq (osip_message_t * sip, const char *hvalue); int osip_message_set_cseq (osip_message_t * sip, const char *hvalue);
/** /**
* Get one Cseq header. * Get one Cseq header.
* @param sip The element to work on. * @param sip The element to work on.
*/ */
skipping to change at line 272 skipping to change at line 286
* @param hvalue The string describing the element. * @param hvalue The string describing the element.
*/ */
int osip_message_set_error_info (osip_message_t * sip, const char *hvalue ); int osip_message_set_error_info (osip_message_t * sip, const char *hvalue );
/** /**
* Get one Error-info header. * Get one Error-info 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_error_info (const osip_message_t * sip, int pos, int osip_message_get_error_info (const osip_message_t * sip, int pos,
osip_error_info_t ** dest); osip_error_info_t ** dest);
/** /**
* Set the From header. * Set the From 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_from (osip_message_t * sip, const char *hvalue); int osip_message_set_from (osip_message_t * sip, const char *hvalue);
/** /**
* Get the From header. * Get the From header.
* @param sip The element to work on. * @param sip The element to work on.
*/ */
osip_from_t *osip_message_get_from (const osip_message_t * sip); osip_from_t *osip_message_get_from (const osip_message_t * sip);
/** /**
* Set the mime-version header. * Set the mime-version 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_mime_version (osip_message_t * sip, const char *hval int osip_message_set_mime_version (osip_message_t * sip,
ue); const char *hvalue);
/** /**
* Get the Mime-version header. * Get the Mime-version header.
* @param sip The element to work on. * @param sip The element to work on.
*/ */
osip_mime_version_t *osip_message_get_mime_version (const osip_message_t osip_mime_version_t *osip_message_get_mime_version (const osip_message_t
* sip); *
sip);
/** /**
* Set the Proxy-authenticate header. * Set the Proxy-authenticate 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_proxy_authenticate (osip_message_t * sip, const char int osip_message_set_proxy_authenticate (osip_message_t * sip,
*hvalue); const char *hvalue);
/** /**
* Get the Proxy-authenticate header. * Get the Proxy-authenticate 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_authenticate (const osip_message_t * sip, int int osip_message_get_proxy_authenticate (const osip_message_t * sip,
pos, int pos,
osip_proxy_authenticate_t ** dest); osip_proxy_authenticate_t ** dest
);
/** /**
* Set the Proxy-authorization header. * Set the Proxy-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_proxy_authorization (osip_message_t * sip, const cha int osip_message_set_proxy_authorization (osip_message_t * sip,
r *hvalue); const char *hvalue);
/** /**
* 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 int osip_message_get_proxy_authorization (const osip_message_t * sip,
pos, int pos,
osip_proxy_authorization_t ** dest); osip_proxy_authorization_t **
dest);
/** /**
* 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, const char *hval int osip_message_set_record_route (osip_message_t * sip,
ue); 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.
* @param dest A pointer on the header found. * @param dest A pointer on the header found.
*/ */
int osip_message_get_record_route (const osip_message_t * sip, int pos, o int osip_message_get_record_route (const osip_message_t * sip, int pos,
sip_record_route_t ** dest); osip_record_route_t ** dest);
/** /**
* Set the Route header. * Set the 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_route (osip_message_t * sip, const char *hvalue); int osip_message_set_route (osip_message_t * sip, const char *hvalue);
/** /**
* Get one Route header. * Get one 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.
* @param dest A pointer on the header found. * @param dest A pointer on the header found.
*/ */
int osip_message_get_route (const osip_message_t * sip, int pos, osip_rou int osip_message_get_route (const osip_message_t * sip, int pos,
te_t ** dest); osip_route_t ** dest);
/** /**
* Set the To header. * Set the To 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_to (osip_message_t * sip, const char *hvalue); int osip_message_set_to (osip_message_t * sip, const char *hvalue);
/** /**
* Get the To header. * Get the To header.
* @param sip The element to work on. * @param sip The element to work on.
*/ */
osip_to_t *osip_message_get_to (const osip_message_t * sip); osip_to_t *osip_message_get_to (const osip_message_t * sip);
/** /**
* Set the Via header. * Set the Via 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_via (osip_message_t * sip, const char *hvalue); int osip_message_set_via (osip_message_t * sip, const char *hvalue);
/** /**
* Append a Via header.
* @param sip The element to work on.
* @param hvalue The string describing the element.
*/
int osip_message_append_via (osip_message_t * sip, const char *hvalue);
/**
* Get one Via header. * Get one Via 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_via (const osip_message_t * sip, int pos, osip_via_t int osip_message_get_via (const osip_message_t * sip, int pos,
** dest); osip_via_t ** dest);
/** /**
* Set the Www-authenticate header. * Set the Www-authenticate 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_www_authenticate (osip_message_t * sip, const char * int osip_message_set_www_authenticate (osip_message_t * sip,
hvalue); const char *hvalue);
/** /**
* Get one Www-authenticate header. * Get one Www-authenticate 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_www_authenticate (const osip_message_t * sip, int po s, int osip_message_get_www_authenticate (const osip_message_t * sip, int po s,
osip_www_authenticate_t ** dest); osip_www_authenticate_t ** dest);
/** /**
* Allocate and Add an "unknown" header (not defined in oSIP). * Allocate and Add an "unknown" header (not defined in oSIP).
* @param sip The element to work on. * @param sip The element to work on.
* @param hname The token name. * @param hname The token name.
* @param hvalue The token value. * @param hvalue The token value.
*/ */
int osip_message_set_header (osip_message_t * sip, const char *hname, int osip_message_set_header (osip_message_t * sip, const char *hname,
const char *hvalue); const char *hvalue);
/** /**
* Allocate and Add an "unknown" header (not defined in oSIP). * Allocate and Add an "unknown" header (not defined in oSIP).
* The element is add on the top of the unknown header list. * The element is add on the top of the unknown header list.
* @param sip The element to work on. * @param sip The element to work on.
* @param hname The token name. * @param hname The token name.
* @param hvalue The token value. * @param hvalue The token value.
*/ */
int osip_message_set_topheader (osip_message_t * sip, const char *hname, int osip_message_set_topheader (osip_message_t * sip, const char *hname,
const char *hvalue); const char *hvalue);
/** /**
* Find an "unknown" header. (not defined in oSIP) * Find an "unknown" header. (not defined in oSIP)
* @param sip The element to work on. * @param sip The element to work on.
* @param hname The name of the header to find. * @param hname The name of the header to find.
* @param pos The index where to start searching for the header. * @param pos The index where to start searching for the header.
* @param dest A pointer to the header found. * @param dest A pointer to the header found.
*/ */
int osip_message_header_get_byname (const osip_message_t * sip, const cha int osip_message_header_get_byname (const osip_message_t * sip,
r *hname, int pos, const char *hname, int pos,
osip_header_t ** dest); osip_header_t ** dest);
/** /**
* Get one "unknown" header. * Get one "unknown" 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_header (const osip_message_t * sip, int pos, osip_he int osip_message_get_header (const osip_message_t * sip, int pos,
ader_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 string containing the body.
*/ */
int osip_message_set_body (osip_message_t * sip, const char *buf); int osip_message_set_body (osip_message_t * sip, const char *buf);
/** /**
* Set a type for a body. (NOT TESTED! use with care) * Set a type for a body. (NOT TESTED! use with care)
* @param sip The element to work on. * @param sip The element to work on.
* @param buf the mime type of body. * @param buf the mime type of body.
*/ */
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);
/** /**
* 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, osip_body int osip_message_get_body (const osip_message_t * sip, int pos,
_t ** dest); osip_body_t ** dest);
/* trace facilities */ /* trace facilities */
#ifndef DOXYGEN /* avoid DOXYGEN warning */ #ifndef DOXYGEN /* avoid DOXYGEN warning */
#ifdef ENABLE_TRACE #ifdef ENABLE_TRACE
void msg_logrequest (osip_message_t * sip, char *fmt); void msg_logrequest (osip_message_t * sip, char *fmt);
void msg_logresponse (osip_message_t * sip, char *fmt); void msg_logresponse (osip_message_t * sip, char *fmt);
#else #else
#define msg_logrequest(P,Q) ; #define msg_logrequest(P,Q) ;
#define msg_logresponse(P,Q) ; #define msg_logresponse(P,Q) ;
#endif #endif
#endif #endif
/** /**
* Allocate and Add a new Date header. * Allocate and Add a new Date header.
* @param sip The element to work on. * @param sip The element to work on.
* @param value the value of the new header. * @param value the value of the new header.
*/ */
#define osip_message_set_date(sip,value) osip_message_set_header ((osip_message_t *)sip,(const char *)"Date",value) #define osip_message_set_date(sip,value) osip_message_set_header ((osip_message_t *)sip,(const char *)"Date",value)
/** /**
 End of changes. 43 change blocks. 
76 lines changed or deleted 86 lines changed or added


 osip_port.h   osip_port.h 
skipping to change at line 35 skipping to change at line 35
#include <stdio.h> #include <stdio.h>
#ifdef WIN32 #ifdef WIN32
#define STDC_HEADERS 1 #define STDC_HEADERS 1
#define HAVE_CTYPE_H 1 #define HAVE_CTYPE_H 1
#define HAVE_STRING_H 1 #define HAVE_STRING_H 1
#define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_TYPES_H 1
#define HAVE_TIME_H 1 #define HAVE_TIME_H 1
#define HAVE_STDARG_H 1 #define HAVE_STDARG_H 1
/* use win32 crypto routines for random number generation */
/* only use for vs .net (compiler v. 1300) or greater */
#if _MSC_VER >= 1300
#define WIN32_USE_CRYPTO 1
#endif
#elif defined _WIN32_WCE #elif defined _WIN32_WCE
#define STDC_HEADERS 1 #define STDC_HEADERS 1
#define HAVE_CTYPE_H 1 #define HAVE_CTYPE_H 1
#define HAVE_STRING_H 1 #define HAVE_STRING_H 1
#define HAVE_TIME_H 1 #define HAVE_TIME_H 1
#define HAVE_STDARG_H 1 #define HAVE_STDARG_H 1
#define strnicmp _strnicmp #define strnicmp _strnicmp
#define stricmp _stricmp #define stricmp _stricmp
skipping to change at line 141 skipping to change at line 147
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/**************************/ /**************************/
/* MALLOC redirections */ /* MALLOC redirections */
/**************************/ /**************************/
void *osip_malloc (int size); #ifndef WIN32
void osip_free (void *ptr);
#ifndef osip_malloc
#define osip_malloc(S) malloc(S)
#endif
#ifndef osip_free
#define osip_free(P) { if (P!=NULL) free(P); }
#endif
#else
void *osip_malloc(size_t size);
void osip_free(void *);
#endif
#ifdef WIN32 #ifdef WIN32
#define alloca _alloca #define alloca _alloca
#endif #endif
/**************************/ /**************************/
/* RANDOM number support */ /* RANDOM number support */
/**************************/ /**************************/
unsigned int osip_build_random_number (); unsigned int osip_build_random_number (void);
/**************************/ /**************************/
/* TIMER support */ /* TIMER support */
/**************************/ /**************************/
#define SP " \0" #define SP " \0"
void osip_usleep (int useconds); void osip_usleep (int useconds);
/**************************/ /**************************/
/* STRING support */ /* STRING support */
/**************************/ /**************************/
int osip_atoi (const char *number); int osip_atoi (const char *number);
char *osip_strncpy (char *dest, const char *src, int length); char *osip_strncpy (char *dest, const char *src, size_t length);
char *osip_strdup (const char *ch); char *osip_strdup (const char *ch);
char *osip_strdup_without_quote (const char *ch); char *osip_strdup_without_quote (const char *ch);
int osip_tolower (char *word); int osip_tolower (char *word);
int osip_clrspace (char *word); int osip_clrspace (char *word);
char *__osip_sdp_append_string (char *string, int size, char *__osip_sdp_append_string (char *string, size_t size,
char *cur, char *string_osip_to_append); char *cur, char *string_osip_to_append);
int __osip_set_next_token (char **dest, char *buf, int end_separator, c int __osip_set_next_token (char **dest, char *buf, int end_separator,
har **next); char **next);
/* find the next unescaped quote and return its index. */ /* find the next unescaped quote and return its index. */
char *__osip_quote_find (const char *qstring); char *__osip_quote_find (const char *qstring);
char *osip_enquote (const char *s);
void osip_dequote (char *s);
int osip_strcasecmp (const char *s1, const char *s2); int osip_strcasecmp (const char *s1, const char *s2);
int osip_strncasecmp (const char *s1, const char *s2, unsigned int len) int osip_strncasecmp (const char *s1, const char *s2, size_t len);
;
/**************************/ /**************************/
/* LOG&DEBUG support */ /* LOG&DEBUG support */
/**************************/ /**************************/
#define LOG_TRUE 1 #define LOG_TRUE 1
#define LOG_FALSE 0 #define LOG_FALSE 0
/* levels */ /* levels */
typedef enum _trace_level typedef enum _trace_level
{ {
skipping to change at line 211 skipping to change at line 232
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;
/* 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_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_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)
#else #else
skipping to change at line 238 skipping to change at line 259
#define TRACE_DISABLE_LEVEL(level) osip_trace_disable_level ( level ) #define TRACE_DISABLE_LEVEL(level) osip_trace_disable_level ( level )
#define IS_TRACE_LEVEL_ACTIVATE(level) osip_is_trace_level_activate( level ) #define IS_TRACE_LEVEL_ACTIVATE(level) osip_is_trace_level_activate( level )
#endif #endif
/* log facility. */ /* log facility. */
/* if f is NULL, current default log file is used. */ /* if f is NULL, current default log file is used. */
/* INPUT: level | level of the trace */ /* INPUT: level | level of the trace */
/* INPUT: f | use f instead of default log file */ /* INPUT: f | use f instead of default log file */
/* INPUT: chfr | format string for next args */ /* INPUT: chfr | format string for next args */
int osip_trace (char *fi, int li, osip_trace_level_t level, FILE * f, cha int osip_trace (char *fi, int li, osip_trace_level_t level, FILE * f,
r *chfr, ...); char *chfr, ...);
#ifdef ENABLE_TRACE #ifdef ENABLE_TRACE
#define OSIP_TRACE(P) P #define OSIP_TRACE(P) P
#else #else
#define OSIP_TRACE(P) do {} while (0) #define OSIP_TRACE(P) do {} while (0)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 10 change blocks. 
18 lines changed or deleted 37 lines changed or added


 osip_proxy_authenticate.h   osip_proxy_authenticate.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_PROXY_AUHTHENTICATE_H_ #define _OSIP_PROXY_AUHTHENTICATE_H_
#include <osipparser2/headers/osip_www_authenticate.h> #include <osipparser2/headers/osip_www_authenticate.h>
/** /**
* @file osip_proxy_authenticate.h * @file osip_proxy_authenticate.h
* @brief oSIP osip_proxy_authenticate header definition. * @brief oSIP osip_proxy_authenticate header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_PROXY_AUTHENTICATE oSIP proxy-authenticate header definit
* @ingroup oSIP ion.
* @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Proxy-Authenticate headers. * Structure for Proxy-Authenticate headers.
* @defvar osip_proxy_authenticate_t * @defvar 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
 End of changes. 1 change blocks. 
2 lines changed or deleted 3 lines changed or added


 osip_proxy_authorization.h   osip_proxy_authorization.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_PROXY_AUHTHORIZATION_H_ #define _OSIP_PROXY_AUHTHORIZATION_H_
#include <osipparser2/headers/osip_authorization.h> #include <osipparser2/headers/osip_authorization.h>
/** /**
* @file osip_proxy_authorization.h * @file osip_proxy_authorization.h
* @brief oSIP osip_proxy_authorization header definition. * @brief oSIP osip_proxy_authorization header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_PROXY_AUTHORIZATION oSIP proxy-authorization header defin
* @ingroup oSIP ition.
* @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Proxy-Authorization headers. * Structure for Proxy-Authorization headers.
* @defvar osip_proxy_authorization_t * @defvar osip_proxy_authorization_t
*/ */
typedef osip_authorization_t osip_proxy_authorization_t; typedef osip_authorization_t osip_proxy_authorization_t;
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 1 change blocks. 
2 lines changed or deleted 3 lines changed or added


 osip_record_route.h   osip_record_route.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_RECORD_ROUTE_H_ #define _OSIP_RECORD_ROUTE_H_
#include <osipparser2/headers/osip_from.h> #include <osipparser2/headers/osip_from.h>
/** /**
* @file osip_record_route.h * @file osip_record_route.h
* @brief oSIP osip_record_route header definition. * @brief oSIP osip_record_route header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_RECORD_ROUTE oSIP record-route header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Route headers. * Structure for Route headers.
* @defvar osip_route_t * @defvar osip_route_t
*/ */
typedef osip_from_t osip_record_route_t; typedef osip_from_t osip_record_route_t;
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_route.h   osip_route.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_RECORD_H_ #define _OSIP_RECORD_H_
#include <osipparser2/headers/osip_from.h> #include <osipparser2/headers/osip_from.h>
/** /**
* @file osip_route.h * @file osip_route.h
* @brief oSIP osip_route header definition. * @brief oSIP osip_route header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_ROUTE oSIP route header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Route headers. * Structure for Route headers.
* @defvar osip_route_t * @defvar osip_route_t
*/ */
typedef osip_from_t osip_route_t; typedef osip_from_t osip_route_t;
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_to.h   osip_to.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_TO_H_ #define _OSIP_TO_H_
#include <osipparser2/headers/osip_from.h> #include <osipparser2/headers/osip_from.h>
/** /**
* @file osip_to.h * @file osip_to.h
* @brief oSIP osip_to header definition. * @brief oSIP osip_to header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_TO oSIP to header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for To headers. * Structure for To headers.
* @defvar osip_to_t * @defvar osip_to_t
*/ */
typedef osip_from_t osip_to_t; typedef osip_from_t osip_to_t;
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_uri.h   osip_uri.h 
skipping to change at line 80 skipping to change at line 80
* Free a url parameter element. * Free a url parameter element.
* @param url_param The element to work on. * @param url_param The element to work on.
*/ */
void osip_uri_param_free (osip_uri_param_t * url_param); void osip_uri_param_free (osip_uri_param_t * url_param);
/** /**
* Set values of a url parameter element. * Set values of a url parameter element.
* @param url_param The element to work on. * @param url_param The element to work on.
* @param name The token name. * @param name The token name.
* @param value The token value. * @param value The token value.
*/ */
int osip_uri_param_set (osip_uri_param_t * url_param, char *name, char *v int osip_uri_param_set (osip_uri_param_t * url_param, char *name,
alue); char *value);
/** /**
* Clone a url parameter element. * Clone a url parameter element.
* @param url_param The element to work on. * @param url_param The element to work on.
* @param dest The resulting new allocated element. * @param dest The resulting new allocated element.
*/ */
int osip_uri_param_clone (const osip_uri_param_t * url_param, osip_uri_pa int osip_uri_param_clone (const osip_uri_param_t * url_param,
ram_t ** dest); osip_uri_param_t ** dest);
#ifndef DOXYGEN #ifndef DOXYGEN
/* /*
* Free a list of a url parameter element. * Free a list of a url parameter element.
* @param url_params The list of url parameter element to free. * @param url_params The list of url parameter element to free.
*/ */
void osip_uri_param_freelist (osip_list_t * url_params); void osip_uri_param_freelist (osip_list_t * url_params);
#endif #endif
/** /**
* Allocate and add a url parameter element in a list. * Allocate and add a url parameter element in a list.
* @param url_params The list of url parameter element to work on. * @param url_params The list of url parameter element to work on.
skipping to change at line 108 skipping to change at line 110
* @param value The token value. * @param value The token value.
*/ */
int osip_uri_param_add (osip_list_t * url_params, char *name, char *value ); int osip_uri_param_add (osip_list_t * url_params, char *name, char *value );
/** /**
* Find in a url parameter element in a list. * Find in a url parameter element in a list.
* @param url_params The list of url parameter element to work on. * @param url_params The list of url 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.
*/ */
int osip_uri_param_get_byname (osip_list_t * url_params, char *name, int osip_uri_param_get_byname (osip_list_t * url_params, char *name,
osip_uri_param_t ** dest); osip_uri_param_t ** dest);
/** /**
* Allocate a generic parameter element. * Allocate a generic parameter element.
* @param url_header The element to work on. * @param url_header The element to work on.
*/ */
#define osip_uri_header_init(url_header) osip_uri_param_init(url_header) #define osip_uri_header_init(url_header) osip_uri_param_init(url_header)
/** /**
* Free a generic parameter element. * Free a generic parameter element.
* @param url_header The element to work on. * @param url_header The element to work on.
*/ */
skipping to change at line 413 skipping to change at line 415
* @param name The name of the url header element to find. * @param name The name of the url header element to find.
* @param dest A pointer on the element found. * @param dest A pointer on the element found.
*/ */
#define osip_uri_uheader_get_byname(url,name,dest) osip_uri_header_get_byna me(url->url_headers,name,dest) #define osip_uri_uheader_get_byname(url,name,dest) osip_uri_header_get_byna me(url->url_headers,name,dest)
#ifndef DOXYGEN #ifndef DOXYGEN
/* internal method */ /* internal method */
char *next_separator (const char *ch, int separator_osip_to_find, char *next_separator (const char *ch, int separator_osip_to_find,
int before_separator); int before_separator);
char *__osip_uri_escape_nonascii_and_nondef (const char *string, const ch char *__osip_uri_escape_nonascii_and_nondef (const char *string,
ar *def); const char *def);
char *__osip_uri_escape_userinfo (const char *string); char *__osip_uri_escape_userinfo (const char *string);
char *__osip_uri_escape_password (const char *string); char *__osip_uri_escape_password (const char *string);
char *__osip_uri_escape_uri_param (char *string); char *__osip_uri_escape_uri_param (char *string);
char *__osip_uri_escape_header_param (char *string); char *__osip_uri_escape_header_param (char *string);
void __osip_uri_unescape (char *string); void __osip_uri_unescape (char *string);
#endif #endif
/** @} */ /** @} */
 End of changes. 4 change blocks. 
7 lines changed or deleted 7 lines changed or added


 osip_via.h   osip_via.h 
skipping to change at line 31 skipping to change at line 31
#define _OSIP_VIA_H_ #define _OSIP_VIA_H_
#include <osipparser2/osip_list.h> #include <osipparser2/osip_list.h>
/** /**
* @file osip_via.h * @file osip_via.h
* @brief oSIP osip_via header definition. * @brief oSIP osip_via header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_VIA oSIP via header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for Via headers. * Structure for Via headers.
* @defvar osip_via_t * @defvar osip_via_t
*/ */
typedef struct osip_via osip_via_t; typedef struct osip_via osip_via_t;
struct osip_via struct osip_via
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 osip_www_authenticate.h   osip_www_authenticate.h 
skipping to change at line 29 skipping to change at line 29
#ifndef _OSIP_WWW_AUTHENTICATE_H_ #ifndef _OSIP_WWW_AUTHENTICATE_H_
#define _OSIP_WWW_AUTHENTICATE_H_ #define _OSIP_WWW_AUTHENTICATE_H_
/** /**
* @file osip_www_authenticate.h * @file osip_www_authenticate.h
* @brief oSIP osip_www_authenticate header definition. * @brief oSIP osip_www_authenticate header definition.
*/ */
/** /**
* @defgroup oSIP_TYPES oSIP type definitions * @defgroup oSIP_WWW_AUTHENTICATE oSIP www-authenticate header definition.
* @ingroup oSIP * @ingroup oSIP_HEADERS
* @{ * @{
*/ */
/** /**
* Structure for WWW-Authenticate headers. * Structure for WWW-Authenticate headers.
* @defvar osip_www_authenticate_t * @defvar osip_www_authenticate_t
*/ */
typedef struct osip_www_authenticate osip_www_authenticate_t; typedef struct osip_www_authenticate osip_www_authenticate_t;
struct osip_www_authenticate struct osip_www_authenticate
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 sdp_message.h   sdp_message.h 
skipping to change at line 80 skipping to change at line 80
/** /**
* Structure for referencing time description header. * Structure for referencing time description header.
* @defvar sdp_time_descr_t * @defvar sdp_time_descr_t
*/ */
typedef struct sdp_time_descr sdp_time_descr_t; typedef struct sdp_time_descr sdp_time_descr_t;
struct sdp_time_descr struct sdp_time_descr
{ {
char *t_start_time; char *t_start_time;
char *t_stop_time; char *t_stop_time;
osip_list_t *r_repeats; /* list of char * */ osip_list_t *r_repeats; /* list of char * */
}; };
/** /**
* 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.
skipping to change at line 216 skipping to change at line 216
char *v_version; char *v_version;
char *o_username; char *o_username;
char *o_sess_id; char *o_sess_id;
char *o_sess_version; char *o_sess_version;
char *o_nettype; char *o_nettype;
char *o_addrtype; char *o_addrtype;
char *o_addr; char *o_addr;
char *s_name; char *s_name;
char *i_info; char *i_info;
char *u_uri; char *u_uri;
osip_list_t *e_emails; /* list of char * */ osip_list_t *e_emails; /* list of char * */
osip_list_t *p_phones; /* list of char * */ osip_list_t *p_phones; /* list of char * */
sdp_connection_t *c_connection; sdp_connection_t *c_connection;
osip_list_t *b_bandwidths; /* list of sdp_bandwidth_t * */ osip_list_t *b_bandwidths; /* list of sdp_bandwidth_t * */
osip_list_t *t_descrs; /* list of sdp_time_descr_t * */ osip_list_t *t_descrs; /* list of sdp_time_descr_t * */
char *z_adjustments; char *z_adjustments;
sdp_key_t *k_key; sdp_key_t *k_key;
osip_list_t *a_attributes; /* list of sdp_attribute_t * */ osip_list_t *a_attributes; /* list of sdp_attribute_t * */
osip_list_t *m_medias; /* list of sdp_media_t * */ osip_list_t *m_medias; /* list of 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 277 skipping to change at line 277
/** /**
* Set the origin field in a SDP packet. * Set the origin field in a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param username The token value. * @param username The token value.
* @param sess_id The token value. * @param sess_id The token value.
* @param sess_version The token value. * @param sess_version The token value.
* @param nettype The token value. * @param nettype The token value.
* @param addrtype The token value. * @param addrtype The token value.
* @param addr The token value. * @param addr The token value.
*/ */
int sdp_message_o_origin_set (sdp_message_t * sdp, char *username, char * int sdp_message_o_origin_set (sdp_message_t * sdp, char *username,
sess_id, char *sess_id, char *sess_version,
char *sess_version, char *nettype, char *nettype, char *addrtype, char *addr);
char *addrtype, char *addr);
/** /**
* Get the username ('o' field) of a SDP packet. * Get the username ('o' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
*/ */
char *sdp_message_o_username_get (sdp_message_t * sdp); char *sdp_message_o_username_get (sdp_message_t * sdp);
/** /**
* Get the session id ('o' field) of a SDP packet. * Get the session id ('o' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
*/ */
char *sdp_message_o_sess_id_get (sdp_message_t * sdp); char *sdp_message_o_sess_id_get (sdp_message_t * sdp);
skipping to change at line 327 skipping to change at line 327
* Get the session name ('s' field) of a SDP packet. * Get the session name ('s' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
*/ */
char *sdp_message_s_name_get (sdp_message_t * sdp); char *sdp_message_s_name_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 pos_media The media line number. * @param pos_media The media line number.
* @param value The token value. * @param value The token value.
*/ */
int sdp_message_i_info_set (sdp_message_t * sdp, int pos_media, char *val int sdp_message_i_info_set (sdp_message_t * sdp, int pos_media,
ue); char *value);
/** /**
* Get the session info ('i' field) of a SDP packet. * Get the session info ('i' 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.
*/ */
char *sdp_message_i_info_get (sdp_message_t * sdp, int pos_media); char *sdp_message_i_info_get (sdp_message_t * sdp, int pos_media);
/** /**
* Set the session info in a SDP packet. * Set the session info 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.
skipping to change at line 356 skipping to change at line 357
* 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);
/** /**
* 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.
*/ */
char *sdp_e_email_get (sdp_message_t * sdp, int pos); #define sdp_e_email_get sdp_message_e_email_get
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.
* @param pos the index of the phone line. * @param pos the index of the phone line.
skipping to change at line 380 skipping to change at line 382
* 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 pos_media The media line number. * @param pos_media The media line number.
* @param nettype The token value. * @param nettype The token value.
* @param addrtype The token value. * @param addrtype The token value.
* @param addr The token value. * @param addr The token value.
* @param addr_multicast_ttl The token value. * @param addr_multicast_ttl The token value.
* @param addr_multicast_int The token value. * @param addr_multicast_int The token value.
*/ */
int sdp_message_c_connection_add (sdp_message_t * sdp, int pos_media, int sdp_message_c_connection_add (sdp_message_t * sdp, int pos_media,
char *nettype, char *addrtype, char *nettype, char *addrtype,
char *addr, char *addr_multicast_ttl, char *addr, char *addr_multicast_ttl,
char *addr_multicast_int); char *addr_multicast_int);
#ifndef DOXYGEN #ifndef DOXYGEN
/* this method should be internal only... */ /* this method should be internal only... */
sdp_connection_t *sdp_message_connection_get (sdp_message_t * sdp, int po sdp_connection_t *sdp_message_connection_get (sdp_message_t * sdp,
s_media, int pos); int pos_media, int pos);
#endif #endif
/** /**
* Get the network type ('c' field) of a SDP packet. * Get the network type ('c' 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 index in the connection element list.. * @param pos The index in the connection element list..
*/ */
char *sdp_message_c_nettype_get (sdp_message_t * sdp, int pos_media, int char *sdp_message_c_nettype_get (sdp_message_t * sdp, int pos_media,
pos); int pos);
/** /**
* Get the address type ('c' field) of a SDP packet. * Get the address type ('c' 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 index in the connection element list.. * @param pos The index in the connection element list..
*/ */
char *sdp_message_c_addrtype_get (sdp_message_t * sdp, int pos_media, int char *sdp_message_c_addrtype_get (sdp_message_t * sdp, int pos_media,
pos); int pos);
/** /**
* Get the address ('c' field) of a SDP packet. * Get the address ('c' 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 index in the connection element list.. * @param pos The index in the connection element list..
*/ */
char *sdp_message_c_addr_get (sdp_message_t * sdp, int pos_media, int pos ); char *sdp_message_c_addr_get (sdp_message_t * sdp, int pos_media, int pos );
/** /**
* Get the multicast ttl ('c' field) of a SDP packet. * Get the multicast ttl ('c' 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 index in the connection element list.. * @param pos The index in the connection element list..
*/ */
char *sdp_message_c_addr_multicast_ttl_get (sdp_message_t * sdp, int pos_ char *sdp_message_c_addr_multicast_ttl_get (sdp_message_t * sdp,
media, int pos); int pos_media, int pos);
/** /**
* Get the multicast int info ('c' field) of a SDP packet. * Get the multicast int info ('c' 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 index in the connection element list.. * @param pos The index in the connection element list..
*/ */
char *sdp_message_c_addr_multicast_int_get (sdp_message_t * sdp, int pos_ char *sdp_message_c_addr_multicast_int_get (sdp_message_t * sdp,
media, int pos); int pos_media, 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 pos_media The media line number. * @param pos_media The media line number.
* @param bwtype The token value. * @param bwtype The token value.
* @param bandwidth The token value. * @param bandwidth The token value.
*/ */
int sdp_message_b_bandwidth_add (sdp_message_t * sdp, int pos_media, int sdp_message_b_bandwidth_add (sdp_message_t * sdp, int pos_media,
char *bwtype, char *bandwidth); char *bwtype, char *bandwidth);
/** /**
* Get the bandwidth ('b' field) of a SDP packet. * Get the bandwidth ('b' 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 index in the bandwidth element list.. * @param pos The index in the bandwidth element list..
*/ */
sdp_bandwidth_t *sdp_message_bandwidth_get (sdp_message_t * sdp, int pos_ sdp_bandwidth_t *sdp_message_bandwidth_get (sdp_message_t * sdp,
media, int pos); int pos_media, int pos);
/** /**
* Get the bandwidth type ('b' field) of a SDP packet. * Get the bandwidth type ('b' 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 index in the bandwidth element list.. * @param pos The index in the bandwidth element list..
*/ */
char *sdp_message_b_bwtype_get (sdp_message_t * sdp, int pos_media, int p char *sdp_message_b_bwtype_get (sdp_message_t * sdp, int pos_media,
os); int pos);
/** /**
* Get the bandwidth value ('b' field) of a SDP packet. * Get the bandwidth value ('b' 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 index in the bandwidth element list.. * @param pos The index in the bandwidth element list..
*/ */
char *sdp_message_b_bandwidth_get (sdp_message_t * sdp, int pos_media, in char *sdp_message_b_bandwidth_get (sdp_message_t * sdp, int pos_media,
t pos); 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 start The token value. * @param start The token value.
* @param stop The token value. * @param stop The token value.
*/ */
int sdp_message_t_time_descr_add (sdp_message_t * sdp, char *start, char int sdp_message_t_time_descr_add (sdp_message_t * sdp, char *start,
*stop); char *stop);
/** /**
* Get the start time value ('t' field) of a SDP packet. * Get the start time value ('t' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_td The time description line number. * @param pos_td The time description line number.
*/ */
char *sdp_message_t_start_time_get (sdp_message_t * sdp, int pos_td); char *sdp_message_t_start_time_get (sdp_message_t * sdp, int pos_td);
/** /**
* Get the stop time value ('t' field) of a SDP packet. * Get the stop time value ('t' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_td The time description line number. * @param pos_td The time description line number.
*/ */
char *sdp_message_t_stop_time_get (sdp_message_t * sdp, int pos_td); char *sdp_message_t_stop_time_get (sdp_message_t * sdp, int pos_td);
/** /**
* Set the repeat information ('r' field) in a SDP packet. * Set the repeat information ('r' field) in a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_time_descr index of t field. * @param pos_time_descr index of t field.
* @param value The token value. * @param value The token value.
*/ */
int sdp_message_r_repeat_add (sdp_message_t * sdp, int pos_time_descr, ch int sdp_message_r_repeat_add (sdp_message_t * sdp, int pos_time_descr,
ar *value); char *value);
/** /**
* Get the repeat information ('r' field) in a SDP packet. * Get the repeat information ('r' field) in a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_time_descr index of t field. * @param pos_time_descr index of t field.
* @param pos_repeat index of element in the 'r' field. * @param pos_repeat index of element in the 'r' field.
*/ */
char *sdp_message_r_repeat_get (sdp_message_t * sdp, int pos_time_descr, char *sdp_message_r_repeat_get (sdp_message_t * sdp, int pos_time_descr,
int pos_repeat); int pos_repeat);
/** /**
* Set the adjustments ('z' field) of a SDP packet. * Set the adjustments ('z' field) of 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_z_adjustments_set (sdp_message_t * sdp, char *value); int sdp_message_z_adjustments_set (sdp_message_t * sdp, char *value);
/** /**
* Get the adjustments ('z' field) of a SDP packet. * Get the adjustments ('z' field) of a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
*/ */
char *sdp_message_z_adjustments_get (sdp_message_t * sdp); char *sdp_message_z_adjustments_get (sdp_message_t * sdp);
/** /**
* Add a key in a SDP packet. * Add a key in a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos_media index of m field. * @param pos_media index of m field.
* @param keytype The token value. * @param keytype The token value.
* @param keydata The token value. * @param keydata The token value.
*/ */
int sdp_message_k_key_set (sdp_message_t * sdp, int pos_media, char *keyt int sdp_message_k_key_set (sdp_message_t * sdp, int pos_media,
ype, char *keytype, char *keydata);
char *keydata);
/** /**
* Get the key type ('k' field) of a SDP packet. * Get the key type ('k' 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.
*/ */
char *sdp_message_k_keytype_get (sdp_message_t * sdp, int pos_media); char *sdp_message_k_keytype_get (sdp_message_t * sdp, int pos_media);
/** /**
* Get the key value ('k' field) of a SDP packet. * Get the key value ('k' 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.
*/ */
char *sdp_message_k_keydata_get (sdp_message_t * sdp, int pos_media); char *sdp_message_k_keydata_get (sdp_message_t * sdp, int pos_media);
/** /**
* 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 pos_media The line number. * @param pos_media The line number.
* @param att_field The token value. * @param att_field The token value.
* @param att_value The token value. * @param att_value The token value.
*/ */
int sdp_message_a_attribute_add (sdp_message_t * sdp, int pos_media, char int sdp_message_a_attribute_add (sdp_message_t * sdp, int pos_media,
*att_field, char *att_field, char *att_value);
char *att_value);
/** /**
* 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, int pos_ sdp_attribute_t *sdp_message_attribute_get (sdp_message_t * sdp,
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.
* @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.
*/ */
char *sdp_message_a_att_field_get (sdp_message_t * sdp, int pos_media, in char *sdp_message_a_att_field_get (sdp_message_t * sdp, int pos_media,
t pos); int pos);
/** /**
* Get the attribute value ('a' field) of a SDP packet. * Get the attribute value ('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.
*/ */
char *sdp_message_a_att_value_get (sdp_message_t * sdp, int pos_media, in char *sdp_message_a_att_value_get (sdp_message_t * sdp, int pos_media,
t pos); int pos);
/** /**
* Check if there is more media lines a SDP packet. * Check if there is more media lines a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param pos The attribute line number. * @param pos The attribute line number.
*/ */
int sdp_message_endof_media (sdp_message_t * sdp, int pos); int sdp_message_endof_media (sdp_message_t * sdp, int pos);
/** /**
* Add a media line in a SDP packet. * Add a media line in a SDP packet.
* @param sdp The element to work on. * @param sdp The element to work on.
* @param media The token value. * @param media The token value.
* @param port The token value. * @param port The token value.
* @param number_of_port The token value. * @param number_of_port The token value.
* @param proto The token value. * @param proto The token value.
*/ */
int sdp_message_m_media_add (sdp_message_t * sdp, char *media, int sdp_message_m_media_add (sdp_message_t * sdp, char *media,
char *port, char *number_of_port, char *proto); char *port, char *number_of_port, char *proto );
/** /**
* Get the media type ('m' field) of a SDP packet. * Get the media type ('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_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.
skipping to change at line 593 skipping to change at line 609
* @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_proto_get (sdp_message_t * sdp, int pos_media); char *sdp_message_m_proto_get (sdp_message_t * sdp, int pos_media);
/** /**
* Set the payload in a SDP packet. * Set the payload in 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 payload The token value. * @param payload The token value.
*/ */
int sdp_message_m_payload_add (sdp_message_t * sdp, int pos_media, char * int sdp_message_m_payload_add (sdp_message_t * sdp, int pos_media,
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, int char *sdp_message_m_payload_get (sdp_message_t * sdp, int pos_media,
pos); int pos);
/** @} */ /** @} */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 28 change blocks. 
55 lines changed or deleted 53 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/