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

OpieTooth::BlueBase Class Reference

#include </home/clem/local/src/opie/noncore/net/opietooth/manager/bluebase.h>

Collaboration diagram for OpieTooth::BlueBase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BlueBase (QWidget *parent=0, const char *name=0, WFlags fl=0)
 ~BlueBase ()

Static Public Member Functions

static QString appName ()

Private Slots

void startScan ()
void addSearchedDevices (const QValueList< RemoteDevice > &newDevices)
void addServicesToDevices ()
void addServicesToDevice (BTDeviceItem *item)
void addServicesToDevice (const QString &device, Services::ValueList)
void addConnectedDevices ()
void addConnectedDevices (ConnectionState::ValueList)
void startServiceActionClicked (QListViewItem *item)
void startServiceActionHold (QListViewItem *, const QPoint &, int)
void deviceActive (const QString &mac, bool connected)
void applyConfigChanges ()
void addSignalStrength ()
void addSignalStrength (const QString &mac, const QString &strengh)
void rfcommDialog ()

Private Member Functions

bool find (const RemoteDevice &device)
void readConfig ()
void writeConfig ()
void readSavedDevices ()
void writeSavedDevices ()
void writeToHciConfig ()
QString status () const
void initGui ()
void setInfo ()
void deviceActive (const RemoteDevice &device)

Private Attributes

PopupHelper m_popHelper
Managerm_localDevice
QMap< QString, BTDeviceItem * > m_deviceList
QString m_deviceName
QString m_defaultPasskey
bool m_useEncryption
bool m_enableAuthentification
bool m_enablePagescan
bool m_enableInquiryscan
QPixmap m_offPix
QPixmap m_onPix
QPixmap m_findPix
BTIconLoaderm_iconLoader

Constructor & Destructor Documentation

BlueBase::BlueBase QWidget *  parent = 0,
const char *  name = 0,
WFlags  fl = 0
 

Definition at line 59 of file bluebase.cpp.

References addConnectedDevices(), addServicesToDevice(), addServicesToDevices(), addSignalStrength(), applyConfigChanges(), col, deviceActive(), Disabled, initGui(), Resource::loadPixmap(), m_findPix, m_iconLoader, m_localDevice, m_offPix, m_onPix, Qtopia::Manager, Dasher::Opts::Normal, readConfig(), readSavedDevices(), rfcommDialog(), QPEApplication::RightOnHold, QPEApplication::setStylusOperation(), startScan(), startServiceActionClicked(), startServiceActionHold(), tr, and writeToHciConfig().

BlueBase::~BlueBase  ) 
 

Decontructor

Definition at line 653 of file bluebase.cpp.

References m_iconLoader, and writeSavedDevices().


Member Function Documentation

void BlueBase::addConnectedDevices ConnectionState::ValueList  connectionList  )  [private, slot]
 

This adds the found connections to the connection tab.

Parameters:
connectionList the ValueList with all current connections

Definition at line 518 of file bluebase.cpp.

References addConnectedDevices(), QValueList< T >::begin(), QValueList< T >::end(), QMap< Key, T >::find(), QValueList< T >::isEmpty(), m_deviceList, OpieTooth::ConnectionState::setMac(), OpieTooth::BTConnectionItem::setName(), and tr.

void BlueBase::addConnectedDevices  )  [private, slot]
 

Add the existing connections (pairs) to the connections tab. This one triggers the search

Definition at line 508 of file bluebase.cpp.

References addSignalStrength(), m_localDevice, and OpieTooth::Manager::searchConnections().

Referenced by addConnectedDevices(), and BlueBase().

void BlueBase::addSearchedDevices const QValueList< RemoteDevice > &  newDevices  )  [private, slot]
 

Add fresh found devices from scan dialog to the listing

Definition at line 275 of file bluebase.cpp.

References QValueList< T >::begin(), deviceActive(), QValueList< T >::end(), find(), and m_findPix.

Referenced by readSavedDevices(), and startScan().

void BlueBase::addServicesToDevice const QString device,
Services::ValueList  servicesList
[private, slot]
 

Parameters:
device the mac address of the remote device
servicesList the list with the service the device has.

Definition at line 422 of file bluebase.cpp.

References QMap< Key, T >::begin(), QValueList< T >::begin(), QValueList< T >::end(), QMap< Key, T >::end(), QMap< Key, T >::find(), QValueList< T >::isEmpty(), list, m_deviceList, m_iconLoader, odebug, oendl, QMap< Key, T >::remove(), OpieTooth::BTIconLoader::serviceIcon(), OpieTooth::Services::setServiceName(), and tr.

void BlueBase::addServicesToDevice BTDeviceItem item  )  [private, slot]
 

Search and display avail. services for a device (on expand from device listing)

Parameters:
item the service item returned

Definition at line 407 of file bluebase.cpp.

References device, QMap< Key, T >::insert(), m_deviceList, m_localDevice, OpieTooth::BTDeviceItem::mac(), odebug, oendl, OpieTooth::BTDeviceItem::remoteDevice(), and OpieTooth::Manager::searchServices().

Referenced by addServicesToDevices(), BlueBase(), and startServiceActionHold().

void BlueBase::addServicesToDevices  )  [private, slot]
 

Definition at line 392 of file bluebase.cpp.

References addServicesToDevice(), odebug, and oendl.

Referenced by BlueBase().

void BlueBase::addSignalStrength const QString mac,
const QString strengh
[private, slot]
 

Definition at line 491 of file bluebase.cpp.

void BlueBase::addSignalStrength  )  [private, slot]
 

Definition at line 479 of file bluebase.cpp.

References m_localDevice, and OpieTooth::Manager::signalStrength().

Referenced by addConnectedDevices(), and BlueBase().

void BlueBase::applyConfigChanges  )  [private, slot]
 

Read the current values from the gui and invoke writeConfig()

Definition at line 243 of file bluebase.cpp.

References m_defaultPasskey, m_deviceName, m_enableAuthentification, m_enableInquiryscan, m_enablePagescan, m_useEncryption, tr, and writeConfig().

Referenced by BlueBase().

static QString OpieTooth::BlueBase::appName  )  [inline, static]
 

Definition at line 44 of file bluebase.h.

References QString::fromLatin1().

void BlueBase::deviceActive const QString device,
bool  connected
[private, slot]
 

The signal catcher. Set the avail. status on device.

Parameters:
device - the mac address
connected - if it is avail. or not

Definition at line 603 of file bluebase.cpp.

References QMap< Key, T >::end(), QMap< Key, T >::find(), m_deviceList, m_offPix, m_onPix, odebug, oendl, and QMap< Key, T >::remove().

void BlueBase::deviceActive const RemoteDevice device  )  [private]
 

Find out if a device can currently be reached

Parameters:
device 

Definition at line 590 of file bluebase.cpp.

References OpieTooth::Manager::isAvailable(), m_localDevice, and OpieTooth::RemoteDevice::mac().

Referenced by addSearchedDevices(), and BlueBase().

bool BlueBase::find const RemoteDevice rem  )  [private]
 

find searches the ListView for a BTDeviceItem containig the same Device if found return true else false

Parameters:
dev RemoteDevice to find
Returns:
returns true if found

Definition at line 666 of file bluebase.cpp.

References OpieTooth::BTListItem::Device, device, OpieTooth::RemoteDevice::equals(), OpieTooth::BTDeviceItem::remoteDevice(), and OpieTooth::BTListItem::typeId().

Referenced by addSearchedDevices().

void BlueBase::initGui  )  [private]
 

Set up the gui

Definition at line 212 of file bluebase.cpp.

References m_defaultPasskey, m_deviceName, m_enableAuthentification, m_enableInquiryscan, m_enablePagescan, m_useEncryption, setInfo(), and status().

Referenced by BlueBase().

void BlueBase::readConfig  )  [private]
 

Reads all options from the config file

Definition at line 116 of file bluebase.cpp.

References m_defaultPasskey, m_deviceName, m_enableAuthentification, m_enableInquiryscan, m_enablePagescan, m_useEncryption, Config::readBoolEntry(), Config::readEntry(), Config::readEntryCrypt(), Config::setGroup(), and TRUE.

Referenced by BlueBase().

void BlueBase::readSavedDevices  )  [private]
 

Read the list of already known devices

Definition at line 170 of file bluebase.cpp.

References addSearchedDevices(), handler, and OpieTooth::DeviceHandler::load().

Referenced by BlueBase().

void BlueBase::rfcommDialog  )  [private, slot]
 

Launch Rfcomm Bind dialog

Definition at line 261 of file bluebase.cpp.

References QPEApplication::execDialog().

Referenced by BlueBase().

void BlueBase::setInfo  )  [private]
 

Set the informations about the local device in information Tab

Definition at line 644 of file bluebase.cpp.

References status().

Referenced by initGui().

void BlueBase::startScan  )  [private, slot]
 

Open the "scan for devices" dialog

Definition at line 630 of file bluebase.cpp.

References addSearchedDevices(), and QPEApplication::showDialog().

Referenced by BlueBase().

void BlueBase::startServiceActionClicked QListViewItem *  item  )  [private, slot]
 

Action that is toggled on entrys on click

Definition at line 299 of file bluebase.cpp.

Referenced by BlueBase().

void BlueBase::startServiceActionHold QListViewItem *  item,
const QPoint &  point,
int 
[private, slot]
 

Action that are toggled on hold (mostly QPopups i guess)

Definition at line 306 of file bluebase.cpp.

References addServicesToDevice(), QMap< Key, T >::begin(), QMap< Key, T >::end(), OpieTooth::PopupHelper::find(), l, list, m_popHelper, name, oendl, owarn, OpieTooth::BTServiceItem::services(), tr, and type.

Referenced by BlueBase().

QString BlueBase::status  )  const [private]
 

Get the status informations and returns it

Returns:
QString the status informations gathered

Definition at line 230 of file bluebase.cpp.

References tr.

Referenced by initGui(), and setInfo().

void BlueBase::writeConfig  )  [private]
 

Writes all options to the config file

Definition at line 133 of file bluebase.cpp.

References m_defaultPasskey, m_deviceName, m_enableAuthentification, m_enableInquiryscan, m_enablePagescan, m_useEncryption, Config::setGroup(), Config::writeEntry(), Config::writeEntryCrypt(), and writeToHciConfig().

Referenced by applyConfigChanges().

void BlueBase::writeSavedDevices  )  [private]
 

Write the list of already known devices

Definition at line 184 of file bluebase.cpp.

References QValueList< T >::append(), OpieTooth::BTListItem::Device, device, handler, QValueList< T >::isEmpty(), list, OpieTooth::BTDeviceItem::remoteDevice(), OpieTooth::DeviceHandler::save(), and OpieTooth::BTListItem::typeId().

Referenced by ~BlueBase().

void BlueBase::writeToHciConfig  )  [private]
 

Modify the hcid.conf file to our needs

Definition at line 152 of file bluebase.cpp.

References OpieTooth::HciConfWrapper::load(), m_deviceName, m_enableAuthentification, m_enableInquiryscan, m_enablePagescan, m_useEncryption, oendl, owarn, QPEApplication::qpeDir(), OpieTooth::HciConfWrapper::save(), OpieTooth::HciConfWrapper::setAuth(), OpieTooth::HciConfWrapper::setEncrypt(), OpieTooth::HciConfWrapper::setIscan(), OpieTooth::HciConfWrapper::setName(), OpieTooth::HciConfWrapper::setPinHelper(), and OpieTooth::HciConfWrapper::setPscan().

Referenced by BlueBase(), and writeConfig().


Member Data Documentation

QString OpieTooth::BlueBase::m_defaultPasskey [private]
 

Definition at line 71 of file bluebase.h.

Referenced by applyConfigChanges(), initGui(), readConfig(), and writeConfig().

QMap<QString,BTDeviceItem*> OpieTooth::BlueBase::m_deviceList [private]
 

Definition at line 66 of file bluebase.h.

Referenced by addConnectedDevices(), addServicesToDevice(), and deviceActive().

QString OpieTooth::BlueBase::m_deviceName [private]
 

Definition at line 70 of file bluebase.h.

Referenced by applyConfigChanges(), initGui(), readConfig(), writeConfig(), and writeToHciConfig().

bool OpieTooth::BlueBase::m_enableAuthentification [private]
 

Definition at line 73 of file bluebase.h.

Referenced by applyConfigChanges(), initGui(), readConfig(), writeConfig(), and writeToHciConfig().

bool OpieTooth::BlueBase::m_enableInquiryscan [private]
 

Definition at line 75 of file bluebase.h.

Referenced by applyConfigChanges(), initGui(), readConfig(), writeConfig(), and writeToHciConfig().

bool OpieTooth::BlueBase::m_enablePagescan [private]
 

Definition at line 74 of file bluebase.h.

Referenced by applyConfigChanges(), initGui(), readConfig(), writeConfig(), and writeToHciConfig().

QPixmap OpieTooth::BlueBase::m_findPix [private]
 

Definition at line 79 of file bluebase.h.

Referenced by addSearchedDevices(), and BlueBase().

BTIconLoader* OpieTooth::BlueBase::m_iconLoader [private]
 

Definition at line 81 of file bluebase.h.

Referenced by addServicesToDevice(), BlueBase(), and ~BlueBase().

Manager* OpieTooth::BlueBase::m_localDevice [private]
 

Definition at line 65 of file bluebase.h.

Referenced by addConnectedDevices(), addServicesToDevice(), addSignalStrength(), BlueBase(), and deviceActive().

QPixmap OpieTooth::BlueBase::m_offPix [private]
 

Definition at line 77 of file bluebase.h.

Referenced by BlueBase(), and deviceActive().

QPixmap OpieTooth::BlueBase::m_onPix [private]
 

Definition at line 78 of file bluebase.h.

Referenced by BlueBase(), and deviceActive().

PopupHelper OpieTooth::BlueBase::m_popHelper [private]
 

Definition at line 64 of file bluebase.h.

Referenced by startServiceActionHold().

bool OpieTooth::BlueBase::m_useEncryption [private]
 

Definition at line 72 of file bluebase.h.

Referenced by applyConfigChanges(), initGui(), readConfig(), writeConfig(), and writeToHciConfig().


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