| osip.h | | osip.h | |
| | | | |
| skipping to change at line 25 | | skipping to change at line 25 | |
| You should have received a copy of the GNU Lesser General Public | | You should have received a copy of the GNU Lesser General Public | |
| License along with this library; if not, write to the Free Software | | License along with this library; if not, write to the Free Software | |
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| */ | | */ | |
| | | | |
| #ifndef _OSIP_H_ | | #ifndef _OSIP_H_ | |
| #define _OSIP_H_ | | #define _OSIP_H_ | |
| | | | |
| #include <osipparser2/osip_const.h> | | #include <osipparser2/osip_const.h> | |
| | | | |
|
| #include <time.h> | | /* Time-related functions and data types */ | |
| | | #include <osip2/osip_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 | |
| | | | |
| skipping to change at line 388 | | skipping to change at line 385 | |
| OSIP_NIST_REQUEST_RECEIVED_AGAIN, /**< UNKNWON REQUEST RECEIVED A
GAIN */ | | OSIP_NIST_REQUEST_RECEIVED_AGAIN, /**< UNKNWON REQUEST RECEIVED A
GAIN */ | |
| OSIP_NIST_STATUS_1XX_SENT, /**< 1XX FOR MESSAGE SENT */ | | OSIP_NIST_STATUS_1XX_SENT, /**< 1XX FOR MESSAGE SENT */ | |
| OSIP_NIST_STATUS_2XX_SENT, /**< 2XX 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_2XX_SENT_AGAIN, /**< 2XX FOR MESSAGE RETRANSMIT
TED */ | |
| OSIP_NIST_STATUS_3XX_SENT, /**< 3XX FOR MESSAGE SENT */ | | OSIP_NIST_STATUS_3XX_SENT, /**< 3XX FOR MESSAGE SENT */ | |
| OSIP_NIST_STATUS_4XX_SENT, /**< 4XX FOR MESSAGE SENT */ | | OSIP_NIST_STATUS_4XX_SENT, /**< 4XX FOR MESSAGE SENT */ | |
| OSIP_NIST_STATUS_5XX_SENT, /**< 5XX FOR MESSAGE SENT */ | | OSIP_NIST_STATUS_5XX_SENT, /**< 5XX FOR MESSAGE SENT */ | |
| OSIP_NIST_STATUS_6XX_SENT, /**< 6XX FOR MESSAGE SENT */ | | OSIP_NIST_STATUS_6XX_SENT, /**< 6XX FOR MESSAGE SENT */ | |
| OSIP_NIST_STATUS_3456XX_SENT_AGAIN, /**< RESPONSE RETRANSMITTED */ | | OSIP_NIST_STATUS_3456XX_SENT_AGAIN, /**< RESPONSE RETRANSMITTED */ | |
| | | | |
|
| | | OSIP_ICT_STATUS_TIMEOUT, /**< TIMER B EXPIRATION: NO REM | |
| | | OTE ANSWER */ | |
| | | OSIP_NICT_STATUS_TIMEOUT, /**< TIMER F EXPIRATION: NO REM | |
| | | OTE ANSWER */ | |
| | | | |
| OSIP_MESSAGE_CALLBACK_COUNT /**< END OF ENUM */ | | OSIP_MESSAGE_CALLBACK_COUNT /**< END OF ENUM */ | |
| } osip_message_callback_type_t; | | } osip_message_callback_type_t; | |
| | | | |
| /** | | /** | |
| * Enumeration for callback type used when transaction is over. | | * Enumeration for callback type used when transaction is over. | |
| */ | | */ | |
| typedef enum osip_kill_callback_type | | typedef enum osip_kill_callback_type | |
| { | | { | |
| OSIP_ICT_KILL_TRANSACTION, /**< end of Client INVITE transaction *
/ | | OSIP_ICT_KILL_TRANSACTION, /**< end of Client INVITE transaction *
/ | |
| OSIP_IST_KILL_TRANSACTION, /**< end of Server INVITE transaction *
/ | | OSIP_IST_KILL_TRANSACTION, /**< end of Server INVITE transaction *
/ | |
| | | | |
| skipping to change at line 647 | | skipping to change at line 647 | |
| /** | | /** | |
| * 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, | | int osip_transaction_get_destination (osip_transaction_t * transaction, | |
| char **ip, int *port); | | char **ip, int *port); | |
| | | | |
|
| #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 osip_transaction_set_in_socket (osip_transaction_t * transaction, | |
| int 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, | | int osip_transaction_set_out_socket (osip_transaction_t * transaction, | |
| int sock); | | int sock); | |
| | | | |
|
| #if 0 | | | |
| | | | |
| /** | | | |
| * Check if the first 2 parameters match the other ones. | | | |
| * NOTE: THIS IS AN INTERNAL METHOD ONLY | | | |
| * @param to1 The initial to header. | | | |
| * @param from1 The initial from header. | | | |
| * @param to2 The new to header. | | | |
| * @param from2 The new from header. | | | |
| */ | | | |
| int callleg_match (osip_to_t * to1, osip_from_t * from1, osip_to_t * to2, | | | |
| osip_from_t * from2); | | | |
| | | | |
| #endif | | | |
| | | | |
| #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); | |
| /** | | /** | |
| * Free all resource in a osip_t element. | | * Free all resource in a osip_t element. | |
| * @param osip The element to release. | | * @param osip The element to release. | |
| */ | | */ | |
| void osip_release (osip_t * osip); | | void osip_release (osip_t * osip); | |
| | | | |
| skipping to change at line 841 | | skipping to change at line 822 | |
| void osip_start_200ok_retransmissions (osip_t * osip, | | void osip_start_200ok_retransmissions (osip_t * osip, | |
| struct osip_dialog *dialog, | | struct osip_dialog *dialog, | |
| osip_message_t * msg200ok, int sock
); | | 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 port 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, | | void osip_start_ack_retransmissions (osip_t * osip, | |
| struct osip_dialog *dialog, | | struct osip_dialog *dialog, | |
| osip_message_t * ack, char *dest, | | osip_message_t * ack, char *dest, | |
| int port, int sock); | | int port, int sock); | |
| | | | |
| /** | | /** | |
| * Stop the out of fsm 200 Ok retransmissions matching an incoming ACK. | | * Stop the out of fsm 200 Ok retransmissions matching an incoming ACK. | |
| * @param osip The osip_t structure. | | * @param osip The osip_t structure. | |
| | | | |
End of changes. 5 change blocks. |
| 25 lines changed or deleted | | 8 lines changed or added | |
|
| osip_list.h | | osip_list.h | |
| | | | |
| skipping to change at line 72 | | skipping to change at line 72 | |
| void *element; /**< element in Current node */ | | void *element; /**< element in Current node */ | |
| }; | | }; | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * Structure for referencing a list of elements. | | * Structure for referencing a list of elements. | |
| * @var osip_list_t | | * @var osip_list_t | |
| */ | | */ | |
| typedef struct osip_list osip_list_t; | | typedef struct osip_list osip_list_t; | |
| | | | |
|
| | | /* added by bennewit@cs.tu-berlin.de */ | |
| | | typedef struct { | |
| | | __node_t * actual; | |
| | | __node_t ** prev; | |
| | | osip_list_t * li; | |
| | | int pos; | |
| | | } osip_list_iterator_t; | |
| | | | |
| /** | | /** | |
| * Structure for referencing a list of elements. | | * Structure for referencing a list of elements. | |
| * @struct osip_list | | * @struct osip_list | |
| */ | | */ | |
| struct osip_list | | struct osip_list | |
| { | | { | |
| | | | |
| int nb_elt; /**< Number of element in the list */ | | int nb_elt; /**< Number of element in the list */ | |
| __node_t *node; /**< Next node containing element */ | | __node_t *node; /**< Next node containing element */ | |
| | | | |
| }; | | }; | |
| | | | |
|
| | | /* added by bennewit@cs.tu-berlin.de */ | |
| | | #define osip_list_iterator_has_elem( it ) ( 0 != (it).actual && (it).pos < | |
| | | (it).li->nb_elt ) | |
| | | | |
| /** | | /** | |
| * Initialise a osip_list_t element. | | * Initialise a osip_list_t element. | |
|
| * NOTE: this element MUST be previously allocated. | | * NOTE: this element MUST be previously allocated with | |
| | | * osip_malloc(). The osip_free() call on the list is | |
| | | * still automatically done by osip_list_free(). This | |
| | | * also means you can't use a static osip_list_t variable | |
| | | * if you want to use osip_list_free(). | |
| * @param li The element to initialise. | | * @param li The element to initialise. | |
| */ | | */ | |
| int osip_list_init (osip_list_t * li); | | int osip_list_init (osip_list_t * li); | |
| /** | | /** | |
| * Free a list of element. | | * Free a list of element. | |
| * Each element will be free with the method given as the second parameter. | | * Each element will be free with the method given as the second parameter. | |
| * @param li The element to work on. | | * @param li The element to work on. | |
| * @param free_func The method that is able to release one element of the l
ist. | | * @param free_func The method that is able to release one element of the l
ist. | |
| */ | | */ | |
| void osip_list_special_free (osip_list_t * li, void *(*free_func) (void *
)); | | void osip_list_special_free (osip_list_t * li, void *(*free_func) (void *
)); | |
| | | | |
| skipping to change at line 133 | | skipping to change at line 148 | |
| * @param pos the index of the element to get. | | * @param pos the index of the element to get. | |
| */ | | */ | |
| void *osip_list_get (const osip_list_t * li, int pos); | | void *osip_list_get (const osip_list_t * li, int pos); | |
| /** | | /** | |
| * Remove an element from a list. | | * Remove an element from a list. | |
| * @param li The element to work on. | | * @param li The element to work on. | |
| * @param pos the index of the element to remove. | | * @param pos the index of the element to remove. | |
| */ | | */ | |
| int osip_list_remove (osip_list_t * li, int pos); | | int osip_list_remove (osip_list_t * li, int pos); | |
| | | | |
|
| | | /* added by bennewit@cs.tu-berlin.de */ | |
| | | void * osip_list_get_first( osip_list_t * li, osip_list_iterator_t * it ) | |
| | | ; | |
| | | /* added by bennewit@cs.tu-berlin.de */ | |
| | | void * osip_list_get_next( osip_list_iterator_t * it ); | |
| | | /* added by bennewit@cs.tu-berlin.de */ | |
| | | void * osip_list_iterator_remove( osip_list_iterator_t * it ); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 25 lines changed or added | |
|
| osip_parser.h | | osip_parser.h | |
| | | | |
| skipping to change at line 449 | | skipping to change at line 449 | |
| int osip_message_set_www_authenticate (osip_message_t * sip, | | int osip_message_set_www_authenticate (osip_message_t * sip, | |
| const char *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); | |
|
| | | #ifndef DOXYGEN | |
| | | /** | |
| | | * Allocate and Add multiple header (not defined in oSIP). | |
| | | * @param sip The element to work on. | |
| | | * @param hname The token name. NAME MUST BE DYNAMICLY ALLOCATED | |
| | | * @param hvalue The token value. VALUE MUST BE DYNAMICLY ALLOCATED | |
| | | */ | |
| | | int osip_message_set_multiple_header (osip_message_t * sip, char *hname, | |
| | | char *hvalue); | |
| | | #endif | |
| /** | | /** | |
| * 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). | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 10 lines changed or added | |
|
| osip_port.h | | osip_port.h | |
| | | | |
| skipping to change at line 26 | | skipping to change at line 26 | |
| License along with this library; if not, write to the Free Software | | License along with this library; if not, write to the Free Software | |
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| */ | | */ | |
| | | | |
| #ifndef _OSIP_PORT_H_ | | #ifndef _OSIP_PORT_H_ | |
| #define _OSIP_PORT_H_ | | #define _OSIP_PORT_H_ | |
| | | | |
| /* Include necessary headers for osip */ | | /* Include necessary headers for osip */ | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
|
| #ifdef WIN32 | | | |
| | | #if defined(__PALMOS__) && (__PALMOS__ >= 0x06000000) | |
| | | # define STDC_HEADERS 1 | |
| | | # define HAVE_CTYPE_H 1 | |
| | | # define HAVE_STRING_H 1 | |
| | | # define HAVE_SYS_TYPES_H 1 | |
| | | # define HAVE_TIME_H 1 | |
| | | # define HAVE_STDARG_H 1 | |
| | | | |
| | | #elif defined(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 */ | | /* use win32 crypto routines for random number generation */ | |
| /* only use for vs .net (compiler v. 1300) or greater */ | | /* only use for vs .net (compiler v. 1300) or greater */ | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 65 | |
| #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 | |
| #define EBUSY 16 | | #define EBUSY 16 | |
| | | | |
| #endif | | #endif | |
| | | | |
| #ifdef __VXWORKS_OS__ | | #ifdef __VXWORKS_OS__ | |
|
| | | | |
| #include <string.h> | | #include <string.h> | |
| #include <time.h> | | #include <time.h> | |
|
| | | #include <sys/times.h> | |
| #include <stdarg.h> | | #include <stdarg.h> | |
|
| | | #include <sys/types.h> | |
| | | #include <stdlib.h> | |
| #define VA_START(a, f) va_start(a, f) | | #define VA_START(a, f) va_start(a, f) | |
| | | | |
|
| | | /* VxWorks lacks support for snprintf */ | |
| | | int osip_vsnprintf( char* buf, int max, const char *fmt, va_list ap); | |
| | | int osip_snprintf( char *buf, int max, const char *fmt, ...); | |
| | | | |
| | | #define snprintf osip_snprintf | |
| | | #define vsnprintf osip_vsnprintf | |
| | | | |
| #else /* end of __VXWORKS_OS__ */ | | #else /* end of __VXWORKS_OS__ */ | |
| | | | |
| #if defined (HAVE_CONFIG_H) | | #if defined (HAVE_CONFIG_H) | |
| #include <config.h> | | #include <config.h> | |
| # if defined (HAVE_STRING_H) | | # if defined (HAVE_STRING_H) | |
| # include <string.h> | | # include <string.h> | |
| # else | | # else | |
| # include <strings.h> | | # include <strings.h> | |
| # endif /* HAVE_STRING_H */ | | # endif /* HAVE_STRING_H */ | |
| #else | | #else | |
| | | | |
End of changes. 5 change blocks. |
| 2 lines changed or deleted | | 20 lines changed or added | |
|
| sdp_message.h | | sdp_message.h | |
| | | | |
| skipping to change at line 584 | | skipping to change at line 584 | |
| * @param pos_media The line number. | | * @param pos_media The line number. | |
| * @param att_field The value to remove. | | * @param att_field The value to remove. | |
| */ | | */ | |
| int sdp_message_a_attribute_del (sdp_message_t * sdp, int pos_media, | | int sdp_message_a_attribute_del (sdp_message_t * sdp, int pos_media, | |
| char *att_field); | | char *att_field); | |
| /** | | /** | |
| * delete one specific attribute fields specified by att_field. | | * delete one specific attribute fields specified by att_field. | |
| * @param sdp The element to work on. | | * @param sdp The element to work on. | |
| * @param pos_media The line number. | | * @param pos_media The line number. | |
| * @param att_field The value to remove. | | * @param att_field The value to remove. | |
|
| * @param att_field The index of attribute to remove. | | * @param pos_attr The index of attribute to remove. | |
| */ | | */ | |
| int sdp_message_a_attribute_del_at_index (sdp_message_t * sdp, int pos_me
dia, | | int sdp_message_a_attribute_del_at_index (sdp_message_t * sdp, int pos_me
dia, | |
| char *att_field, int pos_attr); | | char *att_field, int pos_attr); | |
| /** | | /** | |
| * Get one of the attribute ('a' field) of a SDP packet. | | * Get one of the attribute ('a' field) of a SDP packet. | |
| * @param sdp The element to work on. | | * @param sdp The element to work on. | |
| * @param pos_media The media line number. | | * @param pos_media The media line number. | |
| * @param pos The attribute line number. | | * @param pos The attribute line number. | |
| */ | | */ | |
| sdp_attribute_t *sdp_message_attribute_get (sdp_message_t * sdp, | | sdp_attribute_t *sdp_message_attribute_get (sdp_message_t * sdp, | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|