Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
PatchIfFile Class Reference
Inheritance diagram for PatchIfFile:
Inheritance graph
[legend]
Collaboration diagram for PatchIfFile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PatchIfFile ()
virtual int Parse (char *line)
virtual int Prepare ()
virtual int Execute ()
virtual void Finish (int status)

Private Attributes

const char * mTestFile

Detailed Description

Definition at line 947 of file updater.cpp.


Constructor & Destructor Documentation

Definition at line 950 of file updater.cpp.

: mTestFile(NULL) { }

Member Function Documentation

int PatchIfFile::Execute ( ) [virtual]

Reimplemented from PatchFile.

Definition at line 991 of file updater.cpp.

{
  if (!mTestFile)
    return OK;

  return PatchFile::Execute();
}
void PatchIfFile::Finish ( int  status) [virtual]

Reimplemented from PatchFile.

Definition at line 1000 of file updater.cpp.

{
  if (!mTestFile)
    return;

  PatchFile::Finish(status);
}
int PatchIfFile::Parse ( char *  line) [virtual]

Reimplemented from PatchFile.

Definition at line 962 of file updater.cpp.

{
  // format "<testfile>" "<patchfile>" "<filetopatch>"

  mTestFile = mstrtok(kQuote, &line);
  if (!mTestFile)
    return PARSE_ERROR;

  // consume whitespace between args
  char *q = mstrtok(kQuote, &line);
  if (!q)
    return PARSE_ERROR;

  return PatchFile::Parse(line);
}

Here is the call graph for this function:

int PatchIfFile::Prepare ( ) [virtual]

Reimplemented from PatchFile.

Definition at line 979 of file updater.cpp.

{
  // If the test file does not exist, then turn disable this action.
  if (access(mTestFile, F_OK)) {
    mTestFile = NULL;
    return OK;
  }

  return PatchFile::Prepare();
}

Member Data Documentation

const char* PatchIfFile::mTestFile [private]

Definition at line 958 of file updater.cpp.


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