URL.cpp File Reference

#include <support/String.h>
#include <support/Debug.h>
#include <support/Message.h>
#include <support/URL.h>
#include <support/StdIO.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ErrorMgr.h>

Enumerations

enum  field_offset {
  kAction, kScheme, kUser, kPassword,
  kHostname, kPath, kQuery, kFragment,
  kLastField
}
enum  Scheme {
  kNoScheme, kCustomScheme, kHTTP, kHTTPS,
  kFile, kFTP, kNNTP, kTelnet,
  kWAIS, kMailTo, kJavaScript, kAbout
}

Functions

char * append (char *start, const char *string)
char * append_decimal (char *start, int dec)
const char * ExtractQueryString (const char *src, int *query_length, char qChar)
Scheme ExtractScheme (const char *urlString, const char **schemeEndP)
const char * get_nth_string (const char *buf, int index)
int HexToInt (const char *str)
bool IsHierarchalScheme (Scheme scheme)
bool IsValidURLChar (char c, const unsigned int *validMap)
int LookupScheme (const char *scheme, int len)
int LookupScheme (const char *scheme)
bool NeedsEscape (char c, const unsigned int *escapeMap)
char * NormalizePathString (char *path)
void ResetUrlData (URLData *newUrlData)
void UnescapeString (char *out, const char *in, size_t len)

Variables

const char * kSchemes []


Enumeration Type Documentation

enum field_offset
 

Enumerator:
kAction 
kScheme 
kUser 
kPassword 
kHostname 
kPath 
kQuery 
kFragment 
kLastField 

enum Scheme
 

Enumerator:
kNoScheme 
kCustomScheme 
kHTTP 
kHTTPS 
kFile 
kFTP 
kNNTP 
kTelnet 
kWAIS 
kMailTo 
kJavaScript 
kAbout 


Function Documentation

char* append char *  start,
const char *  string
[inline]
 

char* append_decimal char *  start,
int  dec
[inline]
 

const char * ExtractQueryString const char *  src,
int *  query_length,
char  qChar
 

Scheme ExtractScheme const char *  urlString,
const char **  schemeEndP
 

const char* get_nth_string const char *  buf,
int  index
[inline]
 

int HexToInt const char *  str  )  [inline]
 

bool IsHierarchalScheme Scheme  scheme  )  [inline]
 

bool IsValidURLChar char  c,
const unsigned int *  validMap
[inline]
 

int LookupScheme const char *  scheme,
int  len
 

int LookupScheme const char *  scheme  ) 
 

bool NeedsEscape char  c,
const unsigned int *  escapeMap
[inline]
 

char * NormalizePathString char *  path  ) 
 

void ResetUrlData URLData *  newUrlData  ) 
 

void UnescapeString char *  out,
const char *  in,
size_t  len
[inline]
 


Variable Documentation

const char* kSchemes[]
 

Initial value:

 {
    "",     
    "UnSupported",
    "http",
    "https",
    "file",
    "ftp",
    "nntp",
    "telnet",
    "wais",
    "mailto",
    "javascript",
    "about",
    NULL
}