Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

Public Member Functions | Protected Member Functions | Protected Attributes

PURL Class Reference

#include <url.h>

Inheritance diagram for PURL:
Inheritance graph
[legend]
Collaboration diagram for PURL:
Collaboration graph
[legend]

List of all members.

Public Member Functions

PString LegacyAsString (PURL::UrlFormat fmt, const PURLLegacyScheme *schemeInfo) const
BOOL LegacyParse (const PString &_url, const PURLLegacyScheme *schemeInfo)
 PURL (const char *cstr, const char *defaultScheme=NULL)
 PURL (const PFilePath &path)
 PURL (const PString &str, const char *defaultScheme=NULL)
 PURL ()
Overrides from class PObject
virtual Comparison Compare (const PObject &obj) const
virtual PINDEX HashFunction () const
virtual void PrintOn (ostream &strm) const
virtual void ReadFrom (istream &strm)
Miscellaneous functions
virtual PObjectClone () const

Protected Member Functions

virtual BOOL InternalParse (const char *cstr, const char *defaultScheme)
void Recalculate ()

Protected Attributes

PString fragment
PCaselessString hostname
PStringToString paramVars
PString password
PStringArray path
PString pathStr
WORD port
BOOL portSupplied
PStringToString queryVars
BOOL relativePath
 port was supplied in string input
PCaselessString scheme
PString urlString
PString username

Friends

I/O functions
ostream & operator<< (ostream &strm, const PObject &obj)
istream & operator>> (istream &strm, PObject &obj)

New functions for class.

enum  UrlFormat { FullURL, PathOnly, URIOnly, HostPortOnly }
enum  TranslationType { LoginTranslation, PathTranslation, QueryTranslation }
 

Type for translation of strings to URL format,.

More...
BOOL Parse (const char *cstr, const char *defaultScheme=NULL)
BOOL Parse (const PString &str, const char *defaultScheme=NULL)
PString AsString (UrlFormat fmt=FullURL) const
PFilePath AsFilePath () const
const PCaselessStringGetScheme () const
 Get the scheme field of the URL.
void SetScheme (const PString &scheme)
 Set the scheme field of the URL.
const PStringGetUserName () const
 Get the username field of the URL.
void SetUserName (const PString &username)
 Set the username field of the URL.
const PStringGetPassword () const
 Get the password field of the URL.
void SetPassword (const PString &password)
 Set the password field of the URL.
const PCaselessStringGetHostName () const
 Get the hostname field of the URL.
void SetHostName (const PString &hostname)
 Set the hostname field of the URL.
WORD GetPort () const
 Get the port field of the URL.
void SetPort (WORD newPort)
 Set the port field in the URL.
BOOL GetRelativePath () const
 Get if path is relative or absolute.
const PStringGetPathStr () const
 Get the path field of the URL as a string.
void SetPathStr (const PString &pathStr)
 Set the path field of the URL as a string.
const PStringArray & GetPath () const
 Get the path field of the URL as a string array.
void SetPath (const PStringArray &path)
 Set the path field of the URL as a string array.
PString GetParameters () const
 Get the parameter (;) field of the URL.
void SetParameters (const PString &parameters)
 Set the parameter (;) field of the URL.
const PStringToString & GetParamVars () const
 Get the parameter (;) field(s) of the URL as a string dictionary.
void SetParamVars (const PStringToString &paramVars)
 Set the parameter (;) field(s) of the URL as a string dictionary.
void SetParamVar (const PString &key, const PString &data)
 Set the parameter (;) field of the URL as a string dictionary.
const PStringGetFragment () const
 Get the fragment (##) field of the URL.
PString GetQuery () const
 Get the Query (?) field of the URL as a string.
void SetQuery (const PString &query)
 Set the Query (?) field of the URL as a string.
const PStringToString & GetQueryVars () const
 Get the Query (?) field of the URL as a string dictionary.
void SetQueryVars (const PStringToString &queryVars)
 Set the Query (?) field(s) of the URL as a string dictionary.
void SetQueryVar (const PString &key, const PString &data)
 Set the Query (?) field of the URL as a string dictionary.
BOOL IsEmpty () const
 Return TRUE if the URL is an empty string.
static PString TranslateString (const PString &str, TranslationType type)
static PString UntranslateString (const PString &str, TranslationType type)
static void SplitQueryVars (const PString &queryStr, PStringToString &queryVars)
static BOOL OpenBrowser (const PString &url)

Comparison functions

enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
bool operator== (const PObject &obj) const
bool operator!= (const PObject &obj) const
bool operator< (const PObject &obj) const
bool operator> (const PObject &obj) const
bool operator<= (const PObject &obj) const
bool operator>= (const PObject &obj) const

Run Time Type functions

virtual const char * GetClass (unsigned=0) const
BOOL IsClass (const char *cls) const
virtual BOOL InternalIsDescendant (const char *clsName) const
static const char * Class ()

Detailed Description

This class describes a Universal Resource Locator. This is the desciption of a resource location as used by the World Wide Web and the PHTTPSocket# class.

Definition at line 156 of file url.h.


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

Generated by  Doxygen 1.6.0   Back to index