- Inherits from:
- Object
- Conforms to:
- DParsable, DTextable
- Declared in:
- DURL.h
Object
|
+---DURL
Class Description
The DURL class implements a number of methods for using URLs accordingly the
RFC1738 specification. Note: this class is not a validator; the url:/fromString:
methods check only a few rules. ToDo: relative urls, factory method for protocol
client classes.
- Last modified:
- 27-Feb-2005 (DURL.h)
Instance Variables
- private DText *_scheme
- the scheme (or protocol) of the url
- private DText *_user
- the username in the url
- private BOOL _noUser
- there is no user name in the url
- private DText *_password
- the password in the url
- private BOOL _noPassword
- there is no password in the url
- private DText *_host
- the host
- private DInt *_port
- the port number
- private DText *_path
- the path
- Constructors
- - (DURL *) init
- Initialise an empty URL
- Returns:
- the object
- - (DURL *) init :(const char *) url
- Initialise the URL with an url
- Parameters:
- url - the url
- Returns:
- the object
- Deconstructor
- - free
- Free the url object
- Returns:
- the object
- Copy related methods
- - deepen
- Deepen the object
- Member methods
- - (const char *) host
- Return the host
- Returns:
- the host (or NULL)
- - (DURL *) host :(const char *) host
- Set the host
- Parameters:
- host - the host (or NULL)
- Returns:
- the object
- - (const char *) password
- Return the password
- Returns:
- the password (or NULL)
- - (DURL *) password :(const char *) password
- Set the password for the url
- Parameters:
- password - the password
- Returns:
- the object
- - (const char *) path
- Return the path of the url
- Returns:
- the path (or NULL)
- - (DURL *) path :(const char *) path
- Set the path of the url
- Parameters:
- path - the path (or NULL)
- Returns:
- the object
- - (int) port
- Return the port
- Returns:
- the port (or 0)
- - (DURL *) port :(int) port
- Set the port
- Parameters:
- port - the port (or 0)
- Returns:
- the object
- - (const char *) protocol
- Return the protocol (identical to the scheme)
- Returns:
- the scheme (or NULL)
- - (const char *) scheme
- Return the scheme
- Returns:
- the scheme
- - (DURL *) scheme :(const char *) scheme
- Set the scheme
- Parameters:
- scheme - the scheme for the url (or NULL)
- Returns:
- the object
- - (const char *) user
- Return the user name
- Returns:
- the user name (or NULL)
- - (DURL *) user :(const char *) user
- Set the user name
- Parameters:
- user - the user name (or NULL)
- Returns:
- the object
- Main methods
- - (DURL *) clear
- Clear the url
- Returns:
- the object
- - (DText *) url
- Return the url
- Returns:
- a (new) text object with the url
- - (BOOL) url :(const char *) url
- Set the url
- Parameters:
- url - the url to be set
- Returns:
- success
- - (BOOL) url :(const char *) url :(DURL *) reference
- Set an url with a reference url (missing scheme, user,
password, host and port in url are used from reference)
- Parameters:
- url - the url to be set
reference - the reference url
- Returns:
- success
- Parsable protocol
- - (int) fromString :(char **) cstr
- Parse a string to set an url
- Parameters:
- cstr - the string to be parsed (moved to first non-parsable char)
- Returns:
- the result (0, ERANGE, ENODATA)
- Textable protocol methods
- - (DText *) toText
- Convert the url object to a text object
- Returns:
- the (new) text string object
generated 08-Jan-2006 by ObjcDoc 3.0.0