nsIURLParser

IID:7281076d-cf37-464a-815e-698235802604
Inherits From:nsISupports

nsIURLParser specifies the interface to an URL parser that attempts to follow the definitions of RFC 2396.

This interface is implemented by the following components:


Methods

void parseAuthority ( char* authority , PRInt32 authorityLen , out PRUint32 usernamePos , out PRInt32 usernameLen , out PRUint32 passwordPos , out PRInt32 passwordLen , out PRUint32 hostnamePos , out PRInt32 hostnameLen , out PRInt32 port ) void parseFileName ( char* filename , PRInt32 filenameLen , out PRUint32 basenamePos , out PRInt32 basenameLen , out PRUint32 extensionPos , out PRInt32 extensionLen ) void parseFilePath ( char* filepath , PRInt32 filepathLen , out PRUint32 directoryPos , out PRInt32 directoryLen , out PRUint32 basenamePos , out PRInt32 basenameLen , out PRUint32 extensionPos , out PRInt32 extensionLen ) void parsePath ( char* path , PRInt32 pathLen , out PRUint32 filepathPos , out PRInt32 filepathLen , out PRUint32 paramPos , out PRInt32 paramLen , out PRUint32 queryPos , out PRInt32 queryLen , out PRUint32 refPos , out PRInt32 refLen ) void parseServerInfo ( char* serverinfo , PRInt32 serverinfoLen , out PRUint32 hostnamePos , out PRInt32 hostnameLen , out PRInt32 port ) void parseURL ( char* spec , PRInt32 specLen , out PRUint32 schemePos , out PRInt32 schemeLen , out PRUint32 authorityPos , out PRInt32 authorityLen , out PRUint32 pathPos , out PRInt32 pathLen ) void parseUserInfo ( char* userinfo , PRInt32 userinfoLen , out PRUint32 usernamePos , out PRInt32 usernameLen , out PRUint32 passwordPos , out PRInt32 passwordLen )

void parseAuthority ( char* authority , PRInt32 authorityLen , out PRUint32 usernamePos , out PRInt32 usernameLen , out PRUint32 passwordPos , out PRInt32 passwordLen , out PRUint32 hostnamePos , out PRInt32 hostnameLen , out PRInt32 port )

ParseAuthority breaks the authority string up into its 4 components: username, password, hostname, and hostport.

Auth = :@:

Arguments:
authority
authorityLen
usernamePos
usernameLen
passwordPos
passwordLen
hostnamePos
hostnameLen
port

void parseFileName ( char* filename , PRInt32 filenameLen , out PRUint32 basenamePos , out PRInt32 basenameLen , out PRUint32 extensionPos , out PRInt32 extensionLen )

Filename = .

Arguments:
filename
filenameLen
basenamePos
basenameLen
extensionPos
extensionLen

void parseFilePath ( char* filepath , PRInt32 filepathLen , out PRUint32 directoryPos , out PRInt32 directoryLen , out PRUint32 basenamePos , out PRInt32 basenameLen , out PRUint32 extensionPos , out PRInt32 extensionLen )

ParseFilePath breaks the file path string up into: the directory portion, file base name, and file extension.

Filepath = .

Arguments:
filepath
filepathLen
directoryPos
directoryLen
basenamePos
basenameLen
extensionPos
extensionLen

void parsePath ( char* path , PRInt32 pathLen , out PRUint32 filepathPos , out PRInt32 filepathLen , out PRUint32 paramPos , out PRInt32 paramLen , out PRUint32 queryPos , out PRInt32 queryLen , out PRUint32 refPos , out PRInt32 refLen )

ParsePath breaks the path string up into its 4 major components: a file path, a param string, a query string, and a reference string.

Path = ;?#

Arguments:
path
pathLen
filepathPos
filepathLen
paramPos
paramLen
queryPos
queryLen
refPos
refLen

void parseServerInfo ( char* serverinfo , PRInt32 serverinfoLen , out PRUint32 hostnamePos , out PRInt32 hostnameLen , out PRInt32 port )

Serverinfo = :

Arguments:
serverinfo
serverinfoLen
hostnamePos
hostnameLen
port

void parseURL ( char* spec , PRInt32 specLen , out PRUint32 schemePos , out PRInt32 schemeLen , out PRUint32 authorityPos , out PRInt32 authorityLen , out PRUint32 pathPos , out PRInt32 pathLen )

ParseSpec breaks the URL string up into its 3 major components: a scheme, an authority section (hostname, etc.), and a path.

Spec = ://

Arguments:
spec
specLen
schemePos
schemeLen
authorityPos
authorityLen
pathPos
pathLen

void parseUserInfo ( char* userinfo , PRInt32 userinfoLen , out PRUint32 usernamePos , out PRInt32 usernameLen , out PRUint32 passwordPos , out PRInt32 passwordLen )

Userinfo = :

Arguments:
userinfo
userinfoLen
usernamePos
usernameLen
passwordPos
passwordLen

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com