Back to index

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

#include <nsWinProfileItem.h>

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

List of all members.

Public Member Functions

 nsWinProfileItem (nsWinProfile *profileObj, nsString sectionName, nsString keyName, nsString val, PRInt32 *aReturn)
virtual ~nsWinProfileItem ()
PRInt32 Complete ()
 Completes the install:
char * toString ()
void Abort ()
PRInt32 Prepare ()
PRBool CanUninstall ()
PRBool RegisterPackageNode ()

Protected Attributes

nsInstallmInstall

Private Attributes

nsWinProfilemProfile
nsStringmSection
nsStringmKey
nsStringmValue

Detailed Description

Definition at line 49 of file nsWinProfileItem.h.


Constructor & Destructor Documentation

nsWinProfileItem::nsWinProfileItem ( nsWinProfile profileObj,
nsString  sectionName,
nsString  keyName,
nsString  val,
PRInt32 aReturn 
)

Definition at line 47 of file nsWinProfileItem.cpp.

                                                     : nsInstallObject(profileObj->InstallObject())
{
  MOZ_COUNT_CTOR(nsWinProfileItem);

  mProfile = profileObj;
  mSection = new nsString(sectionName);
  mKey     = new nsString(keyName);
  mValue   = new nsString(val);

  *aReturn = nsInstall::SUCCESS;

  if((mSection == nsnull) ||
     (mKey     == nsnull) ||
     (mValue   == nsnull))
  {
    *aReturn = nsInstall::OUT_OF_MEMORY;
  }
}

Here is the call graph for this function:

Definition at line 70 of file nsWinProfileItem.cpp.

{
  if (mSection) delete mSection;
  if (mKey)     delete mKey;
  if (mValue)   delete mValue;

  MOZ_COUNT_DTOR(nsWinProfileItem);
}

Member Function Documentation

Implements nsInstallObject.

Definition at line 116 of file nsWinProfileItem.cpp.

{
}

Implements nsInstallObject.

Definition at line 131 of file nsWinProfileItem.cpp.

{
    return PR_FALSE;
}

Completes the install:

  • writes the data into the .INI file

Implements nsInstallObject.

Definition at line 79 of file nsWinProfileItem.cpp.

Here is the call graph for this function:

Implements nsInstallObject.

Definition at line 120 of file nsWinProfileItem.cpp.

{
       return nsnull;
}

Implements nsInstallObject.

Definition at line 141 of file nsWinProfileItem.cpp.

{
    return PR_TRUE;
}
char * nsWinProfileItem::toString ( ) [virtual]

Implements nsInstallObject.

Definition at line 87 of file nsWinProfileItem.cpp.

{
  char*     resultCString;
  
  nsString* filename = new nsString(mProfile->GetFilename());
  nsString* result = new nsString;
  result->AssignLiteral("Write ");

  if (filename == nsnull || result == nsnull)
      return nsnull;

  result->Append(*filename);
  result->AppendLiteral(": [");
  result->Append(*mSection);
  result->AppendLiteral("] ");
  result->Append(*mKey);
  result->AppendLiteral("=");
  result->Append(*mValue);

  resultCString = new char[result->Length() + 1];
  if(resultCString != nsnull)
      result->ToCString(resultCString, result->Length() + 1);
  
  if (result)   delete result;
  if (filename) delete filename;

  return resultCString;
}

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 87 of file nsWinProfileItem.h.

Definition at line 85 of file nsWinProfileItem.h.

Definition at line 86 of file nsWinProfileItem.h.

Definition at line 88 of file nsWinProfileItem.h.


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