Back to index

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

#include <nsInstallLogComment.h>

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

List of all members.

Public Member Functions

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

Protected Attributes

nsInstallmInstall

Private Attributes

nsString mFileOpCommand
nsString mComment

Detailed Description

Definition at line 50 of file nsInstallLogComment.h.


Constructor & Destructor Documentation

nsInstallLogComment::nsInstallLogComment ( nsInstall inInstall,
const nsAString &  inFileOpCommand,
const nsAString &  inComment,
PRInt32 error 
)

Definition at line 56 of file nsInstallLogComment.cpp.

: nsInstallObject(inInstall)
{
    MOZ_COUNT_CTOR(nsInstallLogComment);

    *error = nsInstall::SUCCESS;
    if (inInstall == NULL) 
    {
        *error = nsInstall::INVALID_ARGUMENTS;
        return;
    }
    
    mFileOpCommand = inFileOpCommand;
    mComment       = inComment;
}

Definition at line 77 of file nsInstallLogComment.cpp.


Member Function Documentation

Implements nsInstallObject.

Definition at line 95 of file nsInstallLogComment.cpp.

{
}

Implements nsInstallObject.

Definition at line 121 of file nsInstallLogComment.cpp.

{
    return PR_FALSE;
}

Implements nsInstallObject.

Definition at line 89 of file nsInstallLogComment.cpp.

{
    // nothing to complete
    return nsInstall::SUCCESS;
}

Implements nsInstallObject.

Definition at line 83 of file nsInstallLogComment.cpp.

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

Implements nsInstallObject.

Definition at line 127 of file nsInstallLogComment.cpp.

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

Implements nsInstallObject.

Definition at line 99 of file nsInstallLogComment.cpp.

{
    char* buffer = new char[1024];
    char* rsrcVal = nsnull;
    
    if (buffer == nsnull || !mInstall)
        return nsnull;

    rsrcVal = mInstall->GetResourcedString(mFileOpCommand);
    if (rsrcVal)
    {
        nsCAutoString comment;
        if ( NS_SUCCEEDED( NS_CopyUnicodeToNative(mComment, comment) ) )
          PR_snprintf(buffer, 1024, rsrcVal, comment.get());
        nsCRT::free(rsrcVal);
    }

    return buffer;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 73 of file nsInstallLogComment.h.

Definition at line 72 of file nsInstallLogComment.h.

nsInstall* nsInstallObject::mInstall [protected, inherited]

Definition at line 69 of file nsInstallObject.h.


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