• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

NepomukDaemons

ProcessControl Class Reference

This class starts and observes a process. More...

#include <processcontrol.h>

Inheritance diagram for ProcessControl:

Inheritance graph
[legend]

List of all members.


Public Types

enum  CrashPolicy { StopOnCrash, RestartOnCrash }

Signals

void finished (bool clean)
void processErrorMessages (const QString &errorMsg)

Public Member Functions

bool isRunning () const
 ProcessControl (QObject *parent=0)
void setCrashPolicy (CrashPolicy policy)
bool start (const QString &application, const QStringList &arguments=QStringList(), CrashPolicy policy=RestartOnCrash, int maxCrashes=5)
void stop ()
 ~ProcessControl ()

Detailed Description

This class starts and observes a process.

Depending on the policy it also restarts the process when it crashes.

Definition at line 32 of file processcontrol.h.


Member Enumeration Documentation

enum ProcessControl::CrashPolicy

Theses enums describe the behaviour when the observed application crashed.

  • StopOnCrash - The application won't be restarted.
  • RestartOnCrash - The application is restarted with the same arguments.
Enumerator:
StopOnCrash 
RestartOnCrash 

Definition at line 44 of file processcontrol.h.


Constructor & Destructor Documentation

ProcessControl::ProcessControl ( QObject *  parent = 0  ) 

Creates a new process control.

Parameters:
parent The parent object.

Definition at line 27 of file processcontrol.cpp.

ProcessControl::~ProcessControl (  ) 

Destroys the process control.

Definition at line 40 of file processcontrol.cpp.


Member Function Documentation

void ProcessControl::finished ( bool  clean  )  [signal]

bool ProcessControl::isRunning (  )  const

Definition at line 134 of file processcontrol.cpp.

void ProcessControl::processErrorMessages ( const QString &  errorMsg  )  [signal]

This signal is emitted whenever the observed application writes something to stderr.

Parameters:
errorMsg The error output of the observed application.

void ProcessControl::setCrashPolicy ( CrashPolicy  policy  ) 

Sets the crash policy.

Definition at line 57 of file processcontrol.cpp.

bool ProcessControl::start ( const QString &  application,
const QStringList &  arguments = QStringList(),
CrashPolicy  policy = RestartOnCrash,
int  maxCrashes = 5 
)

Starts the application with the given list of arguments.

Definition at line 45 of file processcontrol.cpp.

void ProcessControl::stop (  ) 

Stops the currently running application.

Definition at line 62 of file processcontrol.cpp.


The documentation for this class was generated from the following files:
  • processcontrol.h
  • processcontrol.cpp

NepomukDaemons

Skip menu "NepomukDaemons"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KCMShell
  • KNotify
  • KStyles
  • Nepomuk Daemons
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal