Back to index

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

List of all members.

Public Member Functions

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

Protected Attributes

const char * mTestFile

Detailed Description

Definition at line 886 of file updater.cpp.


Constructor & Destructor Documentation

AddIfFile::AddIfFile ( ) [inline]

Definition at line 889 of file updater.cpp.

: mTestFile(NULL) { }

Member Function Documentation

int AddIfFile::Execute ( ) [virtual]

Reimplemented from AddFile.

Definition at line 930 of file updater.cpp.

{
  if (!mTestFile)
    return OK;

  return AddFile::Execute();
}
void AddIfFile::Finish ( int  status) [virtual]

Reimplemented from AddFile.

Definition at line 939 of file updater.cpp.

{
  if (!mTestFile)
    return;

  AddFile::Finish(status);
}
int AddIfFile::Parse ( char *  line) [virtual]

Reimplemented from AddFile.

Definition at line 901 of file updater.cpp.

{
  // format "<testfile>" "<newfile>"

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

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

  return AddFile::Parse(line);
}

Here is the call graph for this function:

int AddIfFile::Prepare ( ) [virtual]

Reimplemented from AddFile.

Definition at line 918 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 AddFile::Prepare();
}

Member Data Documentation

const char* AddIfFile::mTestFile [protected]

Definition at line 897 of file updater.cpp.


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