Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes
nsMozIconURI Class Reference

#include <nsIconURI.h>

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

List of all members.

Public Member Functions

 nsMozIconURI ()
virtual ~nsMozIconURI ()
boolean equals (in nsIURI other)
 URI equivalence test (not a strict string comparison).
boolean schemeIs (in string scheme)
 An optimization to do scheme checks without requiring the users of nsIURI to GetScheme, thereby saving extra allocating and freeing.
nsIURI clone ()
 Clones the current URI.
AUTF8String resolve (in AUTF8String relativePath)
 This method resolves a relative string into an absolute URI string, using this URI as the base.

Static Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIURI static
NS_DECL_NSIMOZICONURI void 
InitAtoms ()

Public Attributes

attribute nsIURI iconFile
 iconFile
attribute unsigned long imageSize
 imageSize
readonly attribute ACString stockIcon
 stockIcon
readonly attribute ACString iconSize
 iconSize
readonly attribute ACString iconState
 iconState
attribute ACString contentType
 contentType
readonly attribute ACString fileExtension
 fileExtension
attribute AUTF8String spec
 Returns a string representation of the URI.
readonly attribute AUTF8String prePath
 The prePath (eg.
attribute ACString scheme
 The Scheme is the protocol to which this URI refers.
attribute AUTF8String userPass
 The username:password (or username only if value doesn't contain a ':')
attribute AUTF8String username
 The optional username and password, assuming the preHost consists of username:password.
attribute AUTF8String password
attribute AUTF8String hostPort
 The host:port (or simply the host, if port == -1).
attribute AUTF8String host
 The host is the internet domain name to which this URI refers.
attribute long port
 A port value of -1 corresponds to the protocol's default port (eg.
attribute AUTF8String path
 The path, typically including at least a leading '/' (but may also be empty, depending on the protocol).
readonly attribute ACString asciiSpec
 The URI spec with an ASCII compatible encoding.
readonly attribute ACString asciiHost
 The URI host with an ASCII compatible encoding.
readonly attribute ACString originCharset
 The charset of the document from which this URI originated.

Protected Member Functions

nsresult FormatSpec (nsACString &result)

Protected Attributes

nsCOMPtr< nsIURImFileIcon
PRUint32 mSize
nsCString mContentType
nsCString mDummyFilePath
nsCString mStockIcon
nsCOMPtr< nsIAtommIconSize
nsCOMPtr< nsIAtommIconState

Static Protected Attributes

static const nsStaticAtom sSizeAtoms []
static const nsStaticAtom sStateAtoms []

Detailed Description

Definition at line 58 of file nsIconURI.h.


Constructor & Destructor Documentation

Definition at line 82 of file nsIconURI.cpp.

Definition at line 87 of file nsIconURI.cpp.

{
}

Member Function Documentation

nsIURI nsIURI::clone ( ) [inherited]

Clones the current URI.

For some protocols, this is more than just an optimization. For example, under MacOS, the spec of a file URL does not necessarily uniquely identify a file since two volumes could share the same name.

Here is the caller graph for this function:

boolean nsIURI::equals ( in nsIURI  other) [inherited]

URI equivalence test (not a strict string comparison).

eg. http://foo.com:80/ == http://foo.com/

nsresult nsMozIconURI::FormatSpec ( nsACString &  result) [protected]

Definition at line 106 of file nsIconURI.cpp.

{
  nsresult rv = NS_OK;
  spec = NS_MOZICON_SCHEME;

  if (mFileIcon)
  {
    nsCAutoString fileIconSpec;
    rv = mFileIcon->GetSpec(fileIconSpec);
    NS_ENSURE_SUCCESS(rv, rv);
    spec += fileIconSpec;
  }
  else if (!mStockIcon.IsEmpty())
  {
    spec += "//stock/";
    spec += mStockIcon;
  }
  else
  {
    spec += "//";
    spec += mDummyFilePath;
  }

  if (mIconSize)
  {
    spec += NS_MOZ_ICON_DELIMITER;
    spec += "size=";
    const char *size_string;
    mIconSize->GetUTF8String(&size_string);
    spec.Append(size_string);
  }
  else
  {
    spec += NS_MOZ_ICON_DELIMITER;
    spec += "size=";
    spec.Append(nsPrintfCString("%d", mSize));
  }

  if (mIconState) {
    spec += "&state=";
    const char *state_string;
    mIconState->GetUTF8String(&state_string);
    spec.Append(state_string);
  }

  if (!mContentType.IsEmpty())
  {
    spec += "&contentType=";
    spec += mContentType.get();
  }
  
  return NS_OK;
}

Here is the call graph for this function:

Definition at line 93 of file nsIconURI.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

AUTF8String nsIURI::resolve ( in AUTF8String  relativePath) [inherited]

This method resolves a relative string into an absolute URI string, using this URI as the base.

NOTE: some implementations may have no concept of a relative URI.

boolean nsIURI::schemeIs ( in string  scheme) [inherited]

An optimization to do scheme checks without requiring the users of nsIURI to GetScheme, thereby saving extra allocating and freeing.

Returns true if the schemes match (case ignored).


Member Data Documentation

readonly attribute ACString nsIURI::asciiHost [inherited]

The URI host with an ASCII compatible encoding.

Follows the IDNA draft spec for converting internationalized domain names (UTF-8) to ASCII for compatibility with existing internet infrasture.

Definition at line 220 of file nsIURI.idl.

readonly attribute ACString nsIURI::asciiSpec [inherited]

The URI spec with an ASCII compatible encoding.

Host portion follows the IDNA draft spec. Other parts are URL-escaped per the rules of RFC2396. The result is strictly ASCII.

Definition at line 213 of file nsIURI.idl.

attribute ACString nsIMozIconURI::contentType [inherited]

contentType

A valid mime type, or the empty string.

Definition at line 124 of file nsIIconURI.idl.

readonly attribute ACString nsIMozIconURI::fileExtension [inherited]

fileExtension

The file extension of the file which we are looking up.

Definition at line 131 of file nsIIconURI.idl.

attribute AUTF8String nsIURI::host [inherited]

The host is the internet domain name to which this URI refers.

It could be an IPv4 (or IPv6) address literal. If supported, it could be a non-ASCII internationalized domain name.

Characters are NOT escaped.

Definition at line 152 of file nsIURI.idl.

attribute AUTF8String nsIURI::hostPort [inherited]

The host:port (or simply the host, if port == -1).

Characters are NOT escaped.

Definition at line 143 of file nsIURI.idl.

iconFile

the file URL contained within this moz-icon url, or null.

Definition at line 88 of file nsIIconURI.idl.

readonly attribute ACString nsIMozIconURI::iconSize [inherited]

iconSize

The stock icon size requested from the OS.

Definition at line 109 of file nsIIconURI.idl.

readonly attribute ACString nsIMozIconURI::iconState [inherited]

iconState

The stock icon state requested from the OS.

Definition at line 116 of file nsIIconURI.idl.

attribute unsigned long nsIMozIconURI::imageSize [inherited]

imageSize

The image area in square pixels, defaulting to 16 if unspecified.

Definition at line 95 of file nsIIconURI.idl.

Definition at line 74 of file nsIconURI.h.

Definition at line 75 of file nsIconURI.h.

Definition at line 72 of file nsIconURI.h.

Definition at line 77 of file nsIconURI.h.

Definition at line 78 of file nsIconURI.h.

Definition at line 73 of file nsIconURI.h.

Definition at line 76 of file nsIconURI.h.

readonly attribute ACString nsIURI::originCharset [inherited]

The charset of the document from which this URI originated.

An empty value implies UTF-8.

If this value is something other than UTF-8 then the URI components (e.g., spec, prePath, username, etc.) will all be fully URL-escaped. Otherwise, the URI components may contain unescaped multibyte UTF-8 characters.

Definition at line 231 of file nsIURI.idl.

attribute AUTF8String nsIURI::password [inherited]

Definition at line 136 of file nsIURI.idl.

attribute AUTF8String nsIURI::path [inherited]

The path, typically including at least a leading '/' (but may also be empty, depending on the protocol).

Some characters may be escaped.

Definition at line 166 of file nsIURI.idl.

A port value of -1 corresponds to the protocol's default port (eg.

-1 implies port 80 for http URIs).

Definition at line 158 of file nsIURI.idl.

readonly attribute AUTF8String nsIURI::prePath [inherited]

The prePath (eg.

scheme://user:password:port) returns the string before the path. This is useful for authentication or managing sessions.

Some characters may be escaped.

Definition at line 114 of file nsIURI.idl.

attribute ACString nsIURI::scheme [inherited]

The Scheme is the protocol to which this URI refers.

The scheme is restricted to the US-ASCII charset per RFC2396.

Definition at line 120 of file nsIURI.idl.

attribute AUTF8String nsIURI::spec [inherited]

Returns a string representation of the URI.

Setting the spec causes the new spec to be parsed, initializing the URI.

Some characters may be escaped.

Definition at line 106 of file nsIURI.idl.

Initial value:
{
  { "button", &sStockSizeButton },
  { "toolbar", &sStockSizeToolbar },
  { "toolbarsmall", &sStockSizeToolbarsmall },
  { "menu", &sStockSizeMenu },
  { "dialog", &sStockSizeDialog }
}

Definition at line 80 of file nsIconURI.h.

Initial value:
{
  { "normal", &sStockStateNormal },
  { "disabled", &sStockStateDisabled }
}

Definition at line 81 of file nsIconURI.h.

readonly attribute ACString nsIMozIconURI::stockIcon [inherited]

stockIcon

The stock icon name requested from the OS.

Definition at line 102 of file nsIIconURI.idl.

attribute AUTF8String nsIURI::username [inherited]

The optional username and password, assuming the preHost consists of username:password.

Some characters may be escaped.

Definition at line 135 of file nsIURI.idl.

attribute AUTF8String nsIURI::userPass [inherited]

The username:password (or username only if value doesn't contain a ':')

Some characters may be escaped.

Definition at line 127 of file nsIURI.idl.


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