pv_trans.h

Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Copyright (C) 2007 voice-system.ro
00005  *
00006  * This file is part of Kamailio, a free SIP server.
00007  *
00008  * Kamailio is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version
00012  *
00013  * Kamailio is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License 
00019  * along with this program; if not, write to the Free Software 
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00028 #ifndef _PV_TRANS_H_
00029 #define _PV_TRANS_H_
00030 
00031 #include "../../pvar.h"
00032 
00033 
00034 
00035 enum _tr_type { TR_NONE=0, TR_STRING, TR_URI, TR_PARAMLIST, TR_NAMEADDR,
00036                                 TR_TOBODY, TR_LINE };
00037 enum _tr_s_subtype { 
00038         TR_S_NONE=0, TR_S_LEN, TR_S_INT, TR_S_MD5, TR_S_SUBSTR,
00039         TR_S_SELECT, TR_S_ENCODEHEXA, TR_S_DECODEHEXA,
00040         TR_S_ESCAPECOMMON, TR_S_UNESCAPECOMMON, TR_S_ESCAPEUSER, TR_S_UNESCAPEUSER,
00041         TR_S_ESCAPEPARAM, TR_S_UNESCAPEPARAM, TR_S_TOLOWER, TR_S_TOUPPER,
00042         TR_S_STRIP, TR_S_STRIPTAIL, TR_S_PREFIXES, TR_S_PREFIXES_QUOT, TR_S_REPLACE,
00043         TR_S_TIMEFORMAT, TR_S_TRIM, TR_S_RTRIM, TR_S_LTRIM, TR_S_RM
00044 };
00045 enum _tr_uri_subtype {
00046         TR_URI_NONE=0, TR_URI_USER, TR_URI_HOST, TR_URI_PASSWD, TR_URI_PORT,
00047         TR_URI_PARAMS, TR_URI_PARAM, TR_URI_HEADERS, TR_URI_TRANSPORT, TR_URI_TTL,
00048         TR_URI_UPARAM, TR_URI_MADDR, TR_URI_METHOD, TR_URI_LR,
00049         TR_URI_R2
00050 };
00051 enum _tr_param_subtype {
00052         TR_PL_NONE=0, TR_PL_VALUE, TR_PL_VALUEAT, TR_PL_NAME, TR_PL_COUNT
00053 };
00054 enum _tr_nameaddr_subtype {
00055         TR_NA_NONE=0, TR_NA_NAME, TR_NA_URI, TR_NA_LEN
00056 };
00057 enum _tr_tobody_subtype {
00058         TR_TOBODY_NONE=0, TR_TOBODY_DISPLAY, TR_TOBODY_URI, TR_TOBODY_TAG,
00059         TR_TOBODY_URI_USER, TR_TOBODY_URI_HOST, TR_TOBODY_PARAMS
00060 };
00061 enum _tr_line_subtype {
00062         TR_LINE_NONE=0, TR_LINE_COUNT, TR_LINE_AT, TR_LINE_SW
00063 };
00064 
00065 
00066 char* tr_parse_string(str *in, trans_t *tr);
00067 char* tr_parse_uri(str *in, trans_t *tr);
00068 char* tr_parse_paramlist(str *in, trans_t *tr);
00069 char* tr_parse_nameaddr(str *in, trans_t *tr);
00070 char* tr_parse_tobody(str* in, trans_t *t);
00071 char* tr_parse_line(str* in, trans_t *t);
00072 
00073 int tr_init_buffers(void);
00074 
00075 #endif