Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes | Private Attributes
nsInstallUninstall Class Reference

#include <nsInstallUninstall.h>

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

List of all members.

Public Member Functions

 nsInstallUninstall (nsInstall *inInstall, const nsString &regName, PRInt32 *error)
virtual ~nsInstallUninstall ()
PRInt32 Prepare ()
PRInt32 Complete ()
void Abort ()
char * toString ()
PRBool CanUninstall ()
PRBool RegisterPackageNode ()

Protected Attributes

nsInstallmInstall

Private Attributes

nsString mRegName
nsString mUIName

Detailed Description

Definition at line 50 of file nsInstallUninstall.h.


Constructor & Destructor Documentation

nsInstallUninstall::nsInstallUninstall ( nsInstall inInstall,
const nsString regName,
PRInt32 error 
)

Definition at line 56 of file nsInstallUninstall.cpp.

: nsInstallObject(inInstall)
{
    MOZ_COUNT_CTOR(nsInstallUninstall);

    if (regName.IsEmpty()) 
    {
        *error = nsInstall::INVALID_ARGUMENTS;
        return;
    }
    
    mRegName.Assign(regName);

    char* userName = (char*)PR_Malloc(MAXREGPATHLEN);
    PRInt32 err = VR_GetUninstallUserName( NS_CONST_CAST(char*, NS_ConvertUCS2toUTF8(regName).get()),
                                           userName, 
                                           MAXREGPATHLEN );
    
    mUIName.AssignWithConversion(userName);
    
    if (err != REGERR_OK)
    {
        *error = nsInstall::NO_SUCH_COMPONENT;
    }
    
    PR_FREEIF(userName);
    
}

Definition at line 88 of file nsInstallUninstall.cpp.


Member Function Documentation

Implements nsInstallObject.

Definition at line 112 of file nsInstallUninstall.cpp.

{
}

Implements nsInstallObject.

Definition at line 145 of file nsInstallUninstall.cpp.

{
    return PR_FALSE;
}

Implements nsInstallObject.

Definition at line 100 of file nsInstallUninstall.cpp.

Here is the call graph for this function:

Implements nsInstallObject.

Definition at line 94 of file nsInstallUninstall.cpp.

{
    // no set-up necessary
    return nsInstall::SUCCESS;
}

Implements nsInstallObject.

Definition at line 151 of file nsInstallUninstall.cpp.

{
    return PR_FALSE;
}
char * nsInstallUninstall::toString ( ) [virtual]

Implements nsInstallObject.

Definition at line 116 of file nsInstallUninstall.cpp.

{
    char* buffer = new char[1024];
    char* rsrcVal = nsnull;

    if (buffer == nsnull || !mInstall)
        return buffer;
    
    char* temp = ToNewCString(mUIName);
    
    if (temp)
    {
        rsrcVal = mInstall->GetResourcedString(NS_LITERAL_STRING("Uninstall"));

        if (rsrcVal)
        {
            sprintf( buffer, rsrcVal, temp);
            nsCRT::free(rsrcVal);
        }
    }

    if (temp)
         Recycle(temp);

    return buffer;
}

Here is the call graph for this function:


Member Data Documentation

nsInstall* nsInstallObject::mInstall [protected, inherited]

Definition at line 69 of file nsInstallObject.h.

Definition at line 72 of file nsInstallUninstall.h.

Definition at line 73 of file nsInstallUninstall.h.


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