Commit 8a6b5af2 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

Cleaned up sip types.

Not using special typedefs sip_u32_t or sip_u16_t.

darcs-hash:20051107182122-65a35-69c7bd17b015be58a85635e66c0b089df94e4403.gz
parent d814eb36
......@@ -78,29 +78,25 @@ typedef enum {
#define SIP_METHOD_PUBLISH sip_method_publish, "PUBLISH"
/** Magic pointer value - never valid for SIP headers. @HI */
#define SIP_NONE ((sip_header_t const *)-1L)
#define sip_none SIP_NONE
#define SIP_NONE ((void const *)-1L)
/** SIP protocol identifier @HIDE */
#define SIP_PROTOCOL_TAG ((void *)0x53495020) /* 'SIP'20 */
enum {
/** Default port for SIP as integer */
SIP_DEFAULT_PORT = 5060,
#define SIP_DEFAULT_PORT SIP_DEFAULT_PORT
};
/** SIP protocol identifier @HIDE */
#define SIP_PROTOCOL_TAG ((void *)0x53495020) /* 'SIP'20 */
/** Default port for SIP as string */
#define SIP_DEFAULT_SERV "5060"
/** 32-bit unsigned int. */
typedef uint32_t sip_u32_t;
/** 16-bit unsigned int. */
typedef uint16_t sip_u16_t;
/** Time in seconds */
typedef unsigned long sip_time_t;
typedef msg_time_t sip_time_t;
/** Latest time that can be expressed with sip_time_t. @HIDE */
#define SIP_TIME_MAX ((sip_time_t)-1)
#define SIP_TIME_MAX ((sip_time_t)MSG_TIME_MAX)
/** SIP message object. */
typedef struct sip_s sip_t;
......@@ -427,7 +423,7 @@ struct sip_call_id_s {
sip_common_t i_common[1]; /**< Common fragment info */
sip_call_id_t *i_next; /**< Link to next (In-Reply-To) */
char const *i_id; /**< ID value */
sip_u32_t i_hash; /**< Hash value (always nonzero) */
uint32_t i_hash; /**< Hash value (always nonzero) */
};
/**@ingroup sip_call_info
......@@ -449,7 +445,7 @@ struct sip_cseq_s
{
sip_common_t cs_common[1]; /**< Common fragment info */
sip_error_t *cs_next; /**< Link to next (dummy) */
sip_u32_t cs_seq; /**< Sequence number */
uint32_t cs_seq; /**< Sequence number */
sip_method_t cs_method; /**< Method enum */
char const *cs_method_name; /**< Method name */
};
......
......@@ -777,7 +777,7 @@ int sip_addr_tag(su_home_t *home, sip_addr_t *a, char const *tag)
* sip_common_t i_common[1]; // Common fragment info
* sip_call_id_t *i_next; // Link to next (dummy)
* char const *i_id; // ID value
* sip_u32_t i_hash; // Hash value (always nonzero)
* uint32_t i_hash; // Hash value (always nonzero)
* } sip_call_id_t;
* @endcode
*/
......@@ -920,7 +920,7 @@ sip_call_id_t *sip_call_id_create(su_home_t *home, char const *domain)
* typedef struct sip_cseq_s {
* sip_common_t cs_common[1]; // Common fragment info
* sip_unknown_t *cs_next; // Link to next (dummy)
* sip_u32_t cs_seq; // Sequence number
* uint32_t cs_seq; // Sequence number
* sip_method_t cs_method; // Method enum
* char const *cs_method_name; // Method name
* } sip_cseq_t;
......@@ -1015,7 +1015,7 @@ char *sip_cseq_dup_one(sip_header_t *dst, sip_header_t const *src,
* header object when successful or NULL upon an error.
*/
sip_cseq_t *sip_cseq_create(su_home_t *home,
sip_u32_t seq,
uint32_t seq,
unsigned method,
char const *method_name)
{
......@@ -1381,7 +1381,7 @@ int sip_content_length_e(char b[], int bsiz, sip_header_t const *h, int flags)
* created @b Content-Length header object when successful or NULL upon
* an error.
*/
sip_content_length_t *sip_content_length_create(su_home_t *home, sip_u32_t n)
sip_content_length_t *sip_content_length_create(su_home_t *home, uint32_t n)
{
sip_content_length_t *l =
sip_header_alloc(home, sip_content_length_class, 0)->sh_content_length;
......
......@@ -238,7 +238,7 @@ sip_call_id_t *sip_call_id_create(su_home_t *home, char const *domain);
/** Create a @b CSeq header object. */
sip_cseq_t *sip_cseq_create(su_home_t *,
sip_u32_t seq, unsigned method, char const *name);
uint32_t seq, unsigned method, char const *name);
/** Create a @b Contact header object. */
sip_contact_t * sip_contact_create(su_home_t *home, url_string_t const *url,
......@@ -254,7 +254,7 @@ sip_time_t sip_contact_expires(sip_contact_t const *m,
sip_time_t now);
/** Create a @b Content-Length header object. */
sip_content_length_t *sip_content_length_create(su_home_t *home, sip_u32_t n);
sip_content_length_t *sip_content_length_create(su_home_t *home, uint32_t n);
/** Create an @b Date header object. */
sip_date_t *sip_date_create(su_home_t *home, sip_time_t t);
......
......@@ -330,9 +330,9 @@ url_t *sip_url_dup(su_home_t *home, url_t const *o)
* @return
* The function sip_q_value() returns an integer in range 0 .. 1000.
*/
sip_u32_t sip_q_value(sip_param_t q)
unsigned sip_q_value(sip_param_t q)
{
sip_u32_t value = 0;
unsigned value = 0;
if (!q)
return 1000;
......
......@@ -65,7 +65,7 @@ int sip_response_terminates_dialog(int response_code,
int sip_sanity_check(sip_t const *sip);
sip_u32_t sip_q_value(sip_param_t q);
unsigned sip_q_value(sip_param_t q);
url_t *sip_url_dup(su_home_t *sh, url_t const *o);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment