Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsAboutProtocolUtils.h File Reference
#include "nsIURI.h"
#include "nsString.h"
#include "nsReadableUtils.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

nsresult NS_GetAboutModuleName (nsIURI *aAboutURI, nsCString &aModule)

Function Documentation

nsresult NS_GetAboutModuleName ( nsIURI aAboutURI,
nsCString aModule 
) [inline]

Definition at line 42 of file nsAboutProtocolUtils.h.

{
#ifdef DEBUG
    {
        PRBool isAbout;
        NS_ASSERTION(NS_SUCCEEDED(aAboutURI->SchemeIs("about", &isAbout)) &&
                     isAbout,
                     "should be used only on about: URIs");
    }
#endif

    nsresult rv = aAboutURI->GetPath(aModule);
    NS_ENSURE_SUCCESS(rv, rv);

    PRInt32 f = aModule.FindCharInSet(NS_LITERAL_CSTRING("#?"));
    if (f != kNotFound) {
        aModule.Truncate(f);
    }

    // convert to lowercase, as all about: modules are lowercase
    ToLowerCase(aModule);
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: