xrootd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
XrdOucUri Class Reference

#include <XrdOucUri.hh>

Public Member Functions

 XrdOucUri ()
 
 ~XrdOucUri ()
 

Static Public Member Functions

static int Decode (const char *src, int len, char *dst)
 
static int Encode (const char *src, int len, char **dst)
 
static int Encode (const char *src, int len, char *dst)
 
static int Encoded (const char *src, int len)
 

Constructor & Destructor Documentation

◆ XrdOucUri()

XrdOucUri::XrdOucUri ( )
inline

◆ ~XrdOucUri()

XrdOucUri::~XrdOucUri ( )
inline

Member Function Documentation

◆ Decode()

static int XrdOucUri::Decode ( const char *  src,
int  len,
char *  dst 
)
static

Decode a url encoded string

Parameters
srcPointer to the source string to decode
lenThe length of src (i.e. strlen(src)).
dstPointer to the buffer where to put the result. The buffer should be at least as long as the src, including null byte.
Returns
The index of the null byte (i.e. end of string) in dst.

◆ Encode() [1/2]

static int XrdOucUri::Encode ( const char *  src,
int  len,
char **  dst 
)
static

Encode an ASCII text string

Parameters
srcPointer to the source string to encode
lenThe length of src (i.e. strlen(src)).
dstPointer to where the allocated buffer pointer should be placed. This buffer holds the result and must be released using free() when no longer needed.
Returns
The index of the null byte (i.e. end of string) in dst.

◆ Encode() [2/2]

static int XrdOucUri::Encode ( const char *  src,
int  len,
char *  dst 
)
static

Encode an ASCII text string

Parameters
srcPointer to the source string to encode
lenThe length of src (i.e. strlen(src)).
dstPointer to the buffer where to put the result. The buffer should be long enough to hold the result. Use the Encoded() method to determine how many bytes will be needed.
Returns
The index of the null byte (i.e. end of string) in dst.

◆ Encoded()

static int XrdOucUri::Encoded ( const char *  src,
int  len 
)
static

Calculate the number of bytes an encoded string will occupy.

Parameters
srcPointer to the source string to encode
lenThe length of src (i.e. strlen(src)).
Returns
The number of bytes needed, including the ending null byte.

The documentation for this class was generated from the following file: