Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions | Variables
xptiMisc.cpp File Reference
#include "xptiprivate.h"

Go to the source code of this file.

Classes

struct  xptiFileTypeEntry

Functions

nsresult xptiCloneLocalFile (nsILocalFile *aLocalFile, nsILocalFile **aCloneLocalFile)
nsresult xptiCloneElementAsLocalFile (nsISupportsArray *aArray, PRUint32 aIndex, nsILocalFile **aLocalFile)

Variables

static const xptiFileTypeEntry g_Entries []

Class Documentation

struct xptiFileTypeEntry

Definition at line 44 of file xptiMisc.cpp.

Collaboration diagram for xptiFileTypeEntry:
Class Members
int len
const char * name
Type type

Function Documentation

nsresult xptiCloneElementAsLocalFile ( nsISupportsArray aArray,
PRUint32  aIndex,
nsILocalFile **  aLocalFile 
)

Definition at line 152 of file xptiMisc.cpp.

{
    nsresult rv;
    nsCOMPtr<nsILocalFile> original;

    rv = aArray->QueryElementAt(aIndex, NS_GET_IID(nsILocalFile), 
                                getter_AddRefs(original));
    if(NS_FAILED(rv))
        return rv;

    return xptiCloneLocalFile(original, aLocalFile);
}       

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult xptiCloneLocalFile ( nsILocalFile aLocalFile,
nsILocalFile **  aCloneLocalFile 
)

Definition at line 137 of file xptiMisc.cpp.

{
    nsresult rv;
    nsCOMPtr<nsIFile> cloneRaw;
 
    rv = aLocalFile->Clone(getter_AddRefs(cloneRaw));
    if(NS_FAILED(rv))
        return rv;

    return CallQueryInterface(cloneRaw, aCloneLocalFile);
}                        

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Initial value:
 
    {
        {".xpt", 4, xptiFileType::XPT},            
        {".zip", 4, xptiFileType::ZIP},            
        {".jar", 4, xptiFileType::ZIP},            
        {nsnull, 0, xptiFileType::UNKNOWN}            
    }

Definition at line 51 of file xptiMisc.cpp.