Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

System Class Reference

#include </home/clem/local/src/opie/noncore/settings/networksettings2/networksettings2/system.h>

Collaboration diagram for System:

Collaboration graph
[legend]
List of all members.

Signals

void stdoutLine (const QString &)
void stderrLine (const QString &)
void processEvent (const QString &)

Public Member Functions

 System (void)
 ~System (void)
QDict< InterfaceInfo > & interfaces (void)
InterfaceInfointerface (const QString &N)
int runAsRoot (QStringList &S, MyProcess *Prc=0)
int execAsUser (QStringList &Cmd, bool Synchronous=0)
void refreshStatistics (InterfaceInfo &)
void probeInterfaces (void)
InterfaceInfofindInterface (const QString &DevName)

Private Slots

void SLOT_ProcessExited (MyProcess *)

Private Attributes

QDict< InterfaceInfoProbedInterfaces
FILE * OutputOfCmd
QFileProcDevNet

Constructor & Destructor Documentation

System::System void   ) 
 

Definition at line 46 of file system.cpp.

References ProcDevNet.

System::~System void   ) 
 

Definition at line 50 of file system.cpp.

References ProcDevNet.


Member Function Documentation

int System::execAsUser QStringList Cmd,
bool  Synchronous = 0
 

Definition at line 122 of file system.cpp.

References OProcess::AllOutput, OProcess::Block, OProcess::DontCare, CurrentQPEUser::EnvList, CurrentQPEUser::Gid, i, QString::isEmpty(), QString::latin1(), Log, OProcess::NoCommunication, NSResources, P, MyProcess::process(), processEvent(), MyProcess::setEchoMode(), QStringList::split(), tr, CurrentQPEUser::Uid, CurrentQPEUser::UserName, and X.

InterfaceInfo * System::findInterface const QString DevName  ) 
 

Definition at line 466 of file system.cpp.

References QDictIterator< type >::current(), InterfaceInfo::Name, and ProbedInterfaces.

Referenced by BluetoothBNEPRun::hasFreePANNetworkSetup().

InterfaceInfo* System::interface const QString N  )  [inline]
 

Definition at line 109 of file system.h.

References interfaces().

QDict< InterfaceInfo > & System::interfaces void   ) 
 

Definition at line 55 of file system.cpp.

References QDict< type >::count(), ProbedInterfaces, and probeInterfaces().

Referenced by WLanRun::detectState(), USBRun::detectState(), LanCardRun::detectState(), WLanRun::getInterface(), USBRun::getInterface(), LanCardRun::getInterface(), interface(), PPPRun::isMyPPPUp(), LanCardEdit::SLOT_RemoveUnknown(), and LanCardEdit::SLOT_ScanCards().

void System::probeInterfaces void   ) 
 

Definition at line 274 of file system.cpp.

References ARPHRD_IEEE80211, QDictIterator< type >::current(), QDict< type >::find(), QString::find(), HN, QDict< type >::insert(), IO_ReadOnly, QString::latin1(), QString::left(), LN, loc, Log, QString::null, odebug, oendl, QFile::open(), ProbedInterfaces, ProcDevNet, PROCNETDEV, and QTextStream::readLine().

Referenced by interfaces(), and LanCardEdit::SLOT_RemoveUnknown().

void System::processEvent const QString  )  [signal]
 

Referenced by execAsUser(), runAsRoot(), and SLOT_ProcessExited().

void System::refreshStatistics InterfaceInfo  ) 
 

Definition at line 189 of file system.cpp.

References QFile::close(), InterfaceInfo::Collisions, FALSE, QString::find(), IO_ReadOnly, QString::left(), loc, QString::mid(), InterfaceInfo::Name, QString::null, QFile::open(), ProcDevNet, InterfaceInfo::RcvBytes, InterfaceInfo::RcvDropped, InterfaceInfo::RcvErrors, InterfaceInfo::RcvPackets, QTextStream::readLine(), InterfaceInfo::SndBytes, InterfaceInfo::SndDropped, InterfaceInfo::SndErrors, InterfaceInfo::SndPackets, QStringList::split(), and version.

int System::runAsRoot QStringList S,
MyProcess Prc = 0
 

Definition at line 62 of file system.cpp.

References OProcess::AllOutput, QValueList< T >::count(), OProcess::DontCare, QStringList::join(), Log, odebug, oendl, P, QValueList< T >::prepend(), MyProcess::process(), processEvent(), SLOT_ProcessExited(), stderrLine(), stdoutLine(), and tr.

Referenced by BluetoothRFCOMMRun::setMyState().

void System::SLOT_ProcessExited MyProcess  )  [private, slot]
 

Definition at line 174 of file system.cpp.

References MyProcess::process(), and processEvent().

Referenced by runAsRoot().

void System::stderrLine const QString  )  [signal]
 

Referenced by runAsRoot().

void System::stdoutLine const QString  )  [signal]
 

Referenced by runAsRoot().


Member Data Documentation

FILE* System::OutputOfCmd [private]
 

Definition at line 139 of file system.h.

QDict<InterfaceInfo> System::ProbedInterfaces [private]
 

Definition at line 138 of file system.h.

Referenced by findInterface(), interfaces(), and probeInterfaces().

QFile* System::ProcDevNet [private]
 

Definition at line 140 of file system.h.

Referenced by probeInterfaces(), refreshStatistics(), System(), and ~System().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:52:54 2005 for OPIE by  doxygen 1.4.2