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

OpieTooth::Device Class Reference

#include </home/clem/local/src/opie/noncore/net/opietooth/lib/device.h>

Collaboration diagram for OpieTooth::Device:

Collaboration graph
[legend]
List of all members.

Signals

void device (const QString &device, bool up)

Public Member Functions

 Device (const QString &device, const QString &mode, const QString &speed)
 ~Device ()
void attach ()
void detach ()
bool isLoaded () const
QString devName () const

Private Slots

virtual void slotExited (Opie::Core::OProcess *)
virtual void slotStdOut (Opie::Core::OProcess *, char *, int)
virtual void slotStdErr (Opie::Core::OProcess *, char *, int)

Private Attributes

Private * d
QString m_device
bool m_attached:1
Opie::Core::OProcessm_hci
Opie::Core::OProcessm_process
QString m_devId
QString m_mode
QString m_speed
pid_t pid
QCString m_output

Detailed Description

Device takes care of attaching serial devices to the blueZ stack. After attaching it hciconfig ups it

Definition at line 18 of file device.h.


Constructor & Destructor Documentation

Device::Device const QString device,
const QString mode,
const QString speed
 

Brings up an device. Usage example: new Device(/dev/ttySB0, csr)

Parameters:
&device QString the device name
&mode QString the mode
&speed QString the speed of the device, can be left blank

Definition at line 48 of file device.cc.

References attach(), m_attached, m_device, m_hci, m_mode, m_process, m_speed, oendl, and owarn.

Device::~Device  ) 
 

unloads the device

Definition at line 60 of file device.cc.

References detach().


Member Function Documentation

void Device::attach  ) 
 

attach the device

Definition at line 67 of file device.cc.

References OProcess::AllOutput, QString::latin1(), m_device, m_mode, m_output, m_process, m_speed, OProcess::NotifyOnExit, oendl, OProcess, owarn, QCString::resize(), slotExited(), slotStdErr(), slotStdOut(), and Opie::Core::OProcess::start().

Referenced by Device().

void Device::detach  ) 
 

detach the device

Definition at line 98 of file device.cc.

References m_attached, m_hci, m_process, oendl, owarn, and pid.

Referenced by ~Device().

void OpieTooth::Device::device const QString device,
bool  up
[signal]
 

Signals devicename and up status

Returns:
&device QString, Devicename

up bool, if the device is up or not.

Referenced by slotExited().

QString Device::devName  )  const
 

Returns the device name

Returns:
QString, the device name

Definition at line 112 of file device.cc.

References QString::fromLatin1().

bool Device::isLoaded  )  const
 

Is the device loaded?

Returns:
bool, if the device is loaded

Definition at line 109 of file device.cc.

References m_attached.

Referenced by OpieTooth::BluezApplet::checkBluezStatus().

void Device::slotExited Opie::Core::OProcess  )  [private, virtual, slot]
 

Definition at line 115 of file device.cc.

References device(), Opie::Core::OProcess::exitStatus(), m_attached, m_hci, m_output, m_process, Opie::Core::OProcess::normalExit(), oendl, OProcess, owarn, parsePid(), pid, and Opie::Core::OProcess::start().

Referenced by attach().

void Device::slotStdErr Opie::Core::OProcess ,
char *  ,
int 
[private, virtual, slot]
 

Definition at line 182 of file device.cc.

References oendl, owarn, and slotStdOut().

Referenced by attach().

void Device::slotStdOut Opie::Core::OProcess ,
char *  ,
int 
[private, virtual, slot]
 

Definition at line 169 of file device.cc.

References QCString::append(), m_output, m_process, oendl, owarn, and Opie::Internal::string().

Referenced by attach(), and slotStdErr().


Member Data Documentation

Private* OpieTooth::Device::d [private]
 

Definition at line 74 of file device.h.

bool OpieTooth::Device::m_attached [private]
 

Definition at line 77 of file device.h.

Referenced by detach(), Device(), isLoaded(), and slotExited().

QString OpieTooth::Device::m_device [private]
 

Definition at line 76 of file device.h.

Referenced by attach(), and Device().

QString OpieTooth::Device::m_devId [private]
 

Definition at line 80 of file device.h.

Opie::Core::OProcess* OpieTooth::Device::m_hci [private]
 

Definition at line 78 of file device.h.

Referenced by detach(), Device(), and slotExited().

QString OpieTooth::Device::m_mode [private]
 

Definition at line 81 of file device.h.

Referenced by attach(), and Device().

QCString OpieTooth::Device::m_output [private]
 

Definition at line 84 of file device.h.

Referenced by attach(), slotExited(), and slotStdOut().

Opie::Core::OProcess* OpieTooth::Device::m_process [private]
 

Definition at line 79 of file device.h.

Referenced by attach(), detach(), Device(), slotExited(), and slotStdOut().

QString OpieTooth::Device::m_speed [private]
 

Definition at line 82 of file device.h.

Referenced by attach(), and Device().

pid_t OpieTooth::Device::pid [private]
 

Definition at line 83 of file device.h.

Referenced by detach(), and slotExited().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:02:32 2005 for OPIE by  doxygen 1.4.2