WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIURIFixup

IID:773081ac-9f81-4bdb-9e7a-5e87b4361f09
Inherits From:nsISupports

Interface implemented by objects capable of fixing up strings into URIs

This interface is implemented by the following components:


Constants

PRUint32 FIXUP_FLAG_NONE = 0
Allow the fixup to use a keyword lookup service to complete the URI. The fixup object implementer should honour this flag and only perform any lengthy keyword (or search) operation if it is set.
PRUint32 FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP = 1
Tell the fixup to make an alternate URI from the input URI, for example to turn foo into www.foo.com.
PRUint32 FIXUP_FLAGS_MAKE_ALTERNATE_URI = 2

Methods

nsIURI createExposableURI ( nsIURI URI ) nsIURI createFixupURI ( AUTF8String URIText , PRUint32 fixupFlags ) nsIURI keywordToURI ( AUTF8String keyword )

nsIURI createExposableURI ( nsIURI URI )

Converts an internal URI (e.g. a wyciwyg URI) into one which we can expose to the user, for example on the URL bar.

Arguments:
URI: The URI to be converted
Returns:
nsIURI The converted, exposable URI

nsIURI createFixupURI ( AUTF8String URIText , PRUint32 fixupFlags )

Converts the specified string into a URI, first attempting to correct any errors in the syntax or other vagaries. Returns a wellformed URI or nsnull if it can't.

Arguments:
URIText: Candidate URI.
fixupFlags: Flags that govern ways the URI may be fixed up.

nsIURI keywordToURI ( AUTF8String keyword )

Converts the specified keyword string into a URI. Note that it's the caller's responsibility to check whether keywords are enabled and whether keyword is a sensible keyword.

Arguments:
keyword

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com