KDESu::StubProcess

Search for usage in LXR

#include <KDESu/StubProcess>

Inheritance diagram for KDESu::StubProcess:

Public Types

enum  Scheduler { SchedNormal, SchedRealtime }
 
- Public Types inherited from KDESu::PtyProcess
enum  checkPidStatus { Error = -1, NotExited = -2, Killed = -3 }
 

Public Member Functions

void setCommand (const QByteArray &command)
 
void setPriority (int prio)
 
void setScheduler (int sched)
 
void setUser (const QByteArray &user)
 
void setXOnly (bool xonly)
 
- Public Member Functions inherited from KDESu::PtyProcess
int enableLocalEcho (bool enable=true)
 
int exec (const QByteArray &command, const QList< QByteArray > &args)
 
int fd () const
 
int pid () const
 
QByteArray readAll (bool block=true)
 
QByteArray readLine (bool block=true)
 
void setEnvironment (const QList< QByteArray > &env)
 
void setErase (bool erase)
 
void setExitString (const QByteArray &exit)
 
void setTerminal (bool terminal)
 
void unreadLine (const QByteArray &line, bool addNewline=true)
 
int waitForChild ()
 
int waitSlave ()
 
int WaitSlave ()
 
void writeLine (const QByteArray &line, bool addNewline=true)
 

Protected Member Functions

 StubProcess (StubProcessPrivate &dd)
 
int converseStub (int check)
 
virtual QByteArray display ()
 
virtual QByteArray displayAuth ()
 
void virtual_hook (int id, void *data) override
 
- Protected Member Functions inherited from KDESu::PtyProcess
 PtyProcess (PtyProcessPrivate &dd)
 
QList< QByteArrayenvironment () const
 

Protected Attributes

QByteArray m_command
 
KDESuPrivate::KCookie * m_cookie
 
int m_priority
 
int m_scheduler
 
QByteArray m_user
 
bool m_XOnly
 
- Protected Attributes inherited from KDESu::PtyProcess
QByteArray m_command
 
bool m_erase
 
QByteArray m_exitString
 
int m_pid
 
bool m_terminal
 

Additional Inherited Members

- Static Public Member Functions inherited from KDESu::PtyProcess
static bool checkPid (pid_t pid)
 
static int checkPidExited (pid_t pid)
 
static int waitMS (int fd, int ms)
 

Detailed Description

Chat with kdesu_stub.

StubProcess extends PtyProcess with functionality to chat with kdesu_stub.

Definition at line 32 of file stubprocess.h.

Member Enumeration Documentation

◆ Scheduler

Different schedulers.

SchedNormal is the normal Unix timesharing scheduler, while SchedRealtime is a POSIX.1b realtime scheduler.

Definition at line 39 of file stubprocess.h.

Member Function Documentation

◆ converseStub()

int KDESu::StubProcess::converseStub ( int  check)
protected

Exchange all parameters with kdesu_stub.

Definition at line 127 of file stubprocess.cpp.

◆ display()

QByteArray KDESu::StubProcess::display ( )
protectedvirtual

This virtual function can be overloaded when special behavior is desired.

By default, it returns the value returned by KCookie.

Reimplemented in KDESu::SshProcess.

Definition at line 234 of file stubprocess.cpp.

◆ displayAuth()

QByteArray KDESu::StubProcess::displayAuth ( )
protectedvirtual

See display.

Reimplemented in KDESu::SshProcess.

Definition at line 239 of file stubprocess.cpp.

◆ setCommand()

void KDESu::StubProcess::setCommand ( const QByteArray command)

Set the command.

Definition at line 45 of file stubprocess.cpp.

◆ setPriority()

void KDESu::StubProcess::setPriority ( int  prio)

Set the priority of the process.

The priority value must be between 0 and 100, 0 being the lowest priority. This value is mapped to the scheduler and system dependent priority range of the OS.

Definition at line 60 of file stubprocess.cpp.

◆ setScheduler()

void KDESu::StubProcess::setScheduler ( int  sched)

Set the scheduler type.

Definition at line 71 of file stubprocess.cpp.

◆ setUser()

void KDESu::StubProcess::setUser ( const QByteArray user)

Set the target user.

Definition at line 50 of file stubprocess.cpp.

◆ setXOnly()

void KDESu::StubProcess::setXOnly ( bool  xonly)

Set to "X only mode": Sycoca is not built and kdeinit is not launched.

Definition at line 55 of file stubprocess.cpp.

◆ virtual_hook()

void KDESu::StubProcess::virtual_hook ( int  id,
void *  data 
)
overrideprotectedvirtual

Standard hack to add virtual methods in a BC way.

Unused.

Reimplemented from KDESu::PtyProcess.

Reimplemented in KDESu::SuProcess.

Definition at line 248 of file stubprocess.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Sep 26 2022 04:07:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.