reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
Uri.cxx File Reference
#include <ctype.h>
#include <set>
#include "resip/stack/Embedded.hxx"
#include "resip/stack/Helper.hxx"
#include "resip/stack/NameAddr.hxx"
#include "resip/stack/SipMessage.hxx"
#include "resip/stack/Symbols.hxx"
#include "resip/stack/UnknownParameter.hxx"
#include "resip/stack/Uri.hxx"
#include "rutil/compat.hxx"
#include "rutil/DataStream.hxx"
#include "rutil/DnsUtil.hxx"
#include "rutil/Logger.hxx"
#include "rutil/ParseBuffer.hxx"

Go to the source code of this file.

Classes

class  OrderUnknownParameters
 used as a comparator for sorting purposes More...
 

Macros

#define RESIPROCATE_SUBSYSTEM   Subsystem::SIP
 
#define HANDLE_CHARACTER_ESCAPING
 
#define defineParam(_enum, _name, _type, _RFC_ref_ignored)
 

Functions

static bool initAllTables ()
 
static void decodeUserPreservingEscapes (ParseBuffer &pb, const char *start, Data &user, std::unique_ptr< Data > &userRaw)
 
 defineParam (ob,"ob", ExistsParameter,"RFC 5626")
 
 defineParam (gr, "gr", ExistsOrDataParameter, "RFC 5627")
 
 defineParam (comp, "comp", DataParameter, "RFC 3486")
 
 defineParam (duration, "duration", UInt32Parameter, "RFC 4240")
 
 defineParam (lr, "lr", ExistsParameter, "RFC 3261")
 
 defineParam (maddr, "maddr", DataParameter, "RFC 3261")
 
 defineParam (method, "method", DataParameter, "RFC 3261")
 
 defineParam (transport, "transport", DataParameter, "RFC 3261")
 
 defineParam (ttl, "ttl", UInt32Parameter, "RFC 3261")
 
 defineParam (user, "user", DataParameter, "RFC 3261, 4967")
 
 defineParam (extension, "ext", DataParameter, "RFC 3966")
 
 defineParam (sigcompId, "sigcomp-id", QuotedDataParameter, "RFC 5049")
 
 defineParam (rinstance, "rinstance", DataParameter, "proprietary (resip)")
 
 defineParam (addTransport, "addTransport", ExistsParameter, "RESIP INTERNAL")
 
 defineParam (wsSrcIp, "ws-src-ip", DataParameter, "RESIP INTERNAL (WebSocket)")
 
 defineParam (wsSrcPort, "ws-src-port", UInt32Parameter, "RESIP INTERNAL (WebSocket)")
 
 HashValueImp (resip::Uri, resip::Data::from(data).hash())
 

Variables

static const Data parseContext ("Uri constructor")
 
static const Data bodyData ("Body")
 

Macro Definition Documentation

◆ defineParam

#define defineParam (   _enum,
  _name,
  _type,
  _RFC_ref_ignored 
)
Value:
_enum##_Param::DType& \
Uri::param(const _enum##_Param& paramType) \
{ \
checkParsed(); \
_enum##_Param::Type* p = \
static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
if (!p) \
{ \
p = new _enum##_Param::Type(paramType.getTypeNum()); \
mParameters.push_back(p); \
} \
return p->value(); \
} \
\
const _enum##_Param::DType& \
Uri::param(const _enum##_Param& paramType) const \
{ \
checkParsed(); \
_enum##_Param::Type* p = \
static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
if (!p) \
{ \
InfoLog(<< "Missing parameter " _name " " << ParameterTypes::ParameterNames[paramType.getTypeNum()]); \
DebugLog(<< *this); \
throw Exception("Missing parameter " _name, __FILE__, __LINE__); \
} \
return p->value(); \
}
static Data ParameterNames[MAX_PARAMETER]
static array of ParameterNames indexed by the 2nd element in defineParam(...)

Definition at line 1715 of file Uri.cxx.

◆ HANDLE_CHARACTER_ESCAPING

#define HANDLE_CHARACTER_ESCAPING

Definition at line 25 of file Uri.cxx.

◆ RESIPROCATE_SUBSYSTEM

#define RESIPROCATE_SUBSYSTEM   Subsystem::SIP

Definition at line 24 of file Uri.cxx.

Function Documentation

◆ decodeUserPreservingEscapes()

static void decodeUserPreservingEscapes ( ParseBuffer &  pb,
const char *  start,
Data &  user,
std::unique_ptr< Data > &  userRaw 
)
static

Definition at line 1150 of file Uri.cxx.

◆ defineParam() [1/16]

defineParam ( addTransport  ,
"addTransport"  ,
ExistsParameter  ,
"RESIP INTERNAL"   
)

◆ defineParam() [2/16]

defineParam ( comp  ,
"comp"  ,
DataParameter  ,
"RFC 3486"   
)

◆ defineParam() [3/16]

defineParam ( duration  ,
"duration"  ,
UInt32Parameter  ,
"RFC 4240"   
)

◆ defineParam() [4/16]

defineParam ( extension  ,
"ext"  ,
DataParameter  ,
"RFC 3966"   
)

◆ defineParam() [5/16]

defineParam ( gr  ,
"gr"  ,
ExistsOrDataParameter  ,
"RFC 5627"   
)

◆ defineParam() [6/16]

defineParam ( lr  ,
"lr"  ,
ExistsParameter  ,
"RFC 3261"   
)

◆ defineParam() [7/16]

defineParam ( maddr  ,
"maddr"  ,
DataParameter  ,
"RFC 3261"   
)

◆ defineParam() [8/16]

defineParam ( method  ,
"method"  ,
DataParameter  ,
"RFC 3261"   
)

◆ defineParam() [9/16]

defineParam ( ob  ,
"ob"  ,
ExistsParameter  ,
"RFC 5626"   
)

◆ defineParam() [10/16]

defineParam ( rinstance  ,
"rinstance"  ,
DataParameter  ,
"proprietary (resip)"   
)

◆ defineParam() [11/16]

defineParam ( sigcompId  ,
"sigcomp-id"  ,
QuotedDataParameter  ,
"RFC 5049"   
)

◆ defineParam() [12/16]

defineParam ( transport  ,
"transport"  ,
DataParameter  ,
"RFC 3261"   
)

◆ defineParam() [13/16]

defineParam ( ttl  ,
"ttl"  ,
UInt32Parameter  ,
"RFC 3261"   
)

◆ defineParam() [14/16]

defineParam ( user  ,
"user"  ,
DataParameter  ,
"RFC  3261,
4967"   
)

◆ defineParam() [15/16]

defineParam ( wsSrcIp  ,
"ws-src-ip"  ,
DataParameter  ,
"RESIP INTERNAL (WebSocket)"   
)

◆ defineParam() [16/16]

defineParam ( wsSrcPort  ,
"ws-src-port"  ,
UInt32Parameter  ,
"RESIP INTERNAL (WebSocket)"   
)

◆ HashValueImp()

HashValueImp ( resip::Uri  ,
resip::Data::from(data).hash()   
)

◆ initAllTables()

static bool initAllTables ( )
static

Definition at line 27 of file Uri.cxx.

Variable Documentation

◆ bodyData

const Data bodyData("Body") ( "Body"  )
static

◆ parseContext

const Data parseContext("Uri constructor") ( "Uri constructor"  )
static