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 ()
 
void writeLine (const QByteArray &line, bool addNewline=true)
 

Protected Member Functions

KDESU_NO_EXPORT 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
KDESU_NO_EXPORT 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
std::unique_ptr< PtyProcessPrivate > const d_ptr
 
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.

Constructor & Destructor Documentation

◆ StubProcess() [1/2]

KDESu::StubProcess::StubProcess ( )

Definition at line 25 of file stubprocess.cpp.

◆ ~StubProcess()

KDESu::StubProcess::~StubProcess ( )
override

Definition at line 40 of file stubprocess.cpp.

◆ StubProcess() [2/2]

KDESu::StubProcess::StubProcess ( StubProcessPrivate & dd)
explicitprotected

Definition at line 30 of file stubprocess.cpp.

Member Function Documentation

◆ converseStub()

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

Exchange all parameters with kdesu_stub.

Definition at line 117 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 224 of file stubprocess.cpp.

◆ displayAuth()

QByteArray KDESu::StubProcess::displayAuth ( )
protectedvirtual

See display.

Reimplemented in KDESu::SshProcess.

Definition at line 229 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 238 of file stubprocess.cpp.

Member Data Documentation

◆ m_command

QByteArray KDESu::StubProcess::m_command
protected

Definition at line 97 of file stubprocess.h.

◆ m_cookie

KDESuPrivate::KCookie* KDESu::StubProcess::m_cookie
protected

Definition at line 99 of file stubprocess.h.

◆ m_priority

int KDESu::StubProcess::m_priority
protected

Definition at line 95 of file stubprocess.h.

◆ m_scheduler

int KDESu::StubProcess::m_scheduler
protected

Definition at line 96 of file stubprocess.h.

◆ m_user

QByteArray KDESu::StubProcess::m_user
protected

Definition at line 98 of file stubprocess.h.

◆ m_XOnly

bool KDESu::StubProcess::m_XOnly
protected

Definition at line 94 of file stubprocess.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.