qvalue.h File Reference

Functions related to the SIP q value. More...

#include <string.h>

Include dependency graph for qvalue.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _QVALUE_H   1
#define MAX_Q   ((qvalue_t)1000)
#define MAX_Q_STR   "1"
#define MAX_Q_STR_LEN   (sizeof(MAX_Q_STR) - 1)
#define MIN_Q   ((qvalue_t)0)
#define MIN_Q_STR   "0"
#define MIN_Q_STR_LEN   (sizeof(MIN_Q_STR) - 1)
#define Q_PREFIX   "0."
#define Q_PREFIX_LEN   (sizeof(Q_PREFIX) - 1)
#define Q_UNSPECIFIED   ((qvalue_t)-1)
 Use this if the value of q is not specified.

Typedefs

typedef int qvalue_t

Functions

static qvalue_t double2q (double q)
 Convert double to qvalue_t.
static size_t len_q (qvalue_t q)
 Calculate the length of printed q.
static double q2double (qvalue_t q)
 Convert qvalue_t to double.
static char * q2str (qvalue_t q, unsigned int *len)
 Convert q value to string.
int str2q (qvalue_t *q, char *s, int len)
 Convert string representation of q parameter in qvalue_t.


Detailed Description

Functions related to the SIP q value.

Definition in file qvalue.h.


Define Documentation

#define _QVALUE_H   1

Definition at line 31 of file qvalue.h.

#define MAX_Q   ((qvalue_t)1000)

Definition at line 67 of file qvalue.h.

Referenced by do_query(), enum_pv_query_3(), len_q(), mod_init(), and q2str().

#define MAX_Q_STR   "1"

Definition at line 70 of file qvalue.h.

Referenced by q2str().

#define MAX_Q_STR_LEN   (sizeof(MAX_Q_STR) - 1)

Definition at line 71 of file qvalue.h.

Referenced by len_q(), and q2str().

#define MIN_Q   ((qvalue_t)0)

Definition at line 68 of file qvalue.h.

Referenced by alias_db_lookup(), len_q(), mod_init(), and q2str().

#define MIN_Q_STR   "0"

Definition at line 73 of file qvalue.h.

Referenced by q2str().

#define MIN_Q_STR_LEN   (sizeof(MIN_Q_STR) - 1)

Definition at line 74 of file qvalue.h.

Referenced by len_q(), and q2str().

#define Q_PREFIX   "0."

Definition at line 76 of file qvalue.h.

Referenced by q2str().

#define Q_PREFIX_LEN   (sizeof(Q_PREFIX) - 1)

Definition at line 77 of file qvalue.h.

Referenced by len_q(), and q2str().

#define Q_UNSPECIFIED   ((qvalue_t)-1)


Typedef Documentation

typedef int qvalue_t

Definition at line 59 of file qvalue.h.


Function Documentation

static qvalue_t double2q ( double  q  )  [inline, static]

Convert double to qvalue_t.

Definition at line 118 of file qvalue.h.

References Q_UNSPECIFIED.

Referenced by dbrow2info().

static size_t len_q ( qvalue_t  q  )  [inline, static]

Calculate the length of printed q.

Definition at line 84 of file qvalue.h.

References MAX_Q, MAX_Q_STR_LEN, MIN_Q, MIN_Q_STR_LEN, Q_PREFIX_LEN, and Q_UNSPECIFIED.

Referenced by build_contact(), calc_buf_len(), and print_dset().

static double q2double ( qvalue_t  q  )  [inline, static]

Convert qvalue_t to double.

Definition at line 105 of file qvalue.h.

References Q_UNSPECIFIED.

Referenced by db_insert_ucontact(), and db_update_ucontact().

static char* q2str ( qvalue_t  q,
unsigned int *  len 
) [inline, static]

int str2q ( qvalue_t q,
char *  s,
int  len 
)

Convert string representation of q parameter in qvalue_t.

Definition at line 38 of file qvalue.c.

References E_INVALID_PARAMS, E_Q_DEC_MISSING, E_Q_EMPTY, E_Q_INV_CHAR, and E_Q_TOO_BIG.

Referenced by calc_contact_q(), mi_usrloc_add(), and sort_contacts().


Generated on Thu May 24 08:01:16 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6