kmobiletools
Device Class Reference
#include <device.h>

Detailed Description
This class abstracts the Gammu device functions and provides an easy to use interface for the engine.
Definition at line 45 of file device.h.
Public Slots | |
| void | initPhone () |
| void | terminatePhone () |
Signals | |
| void | connected () |
| void | disconnected () |
Public Member Functions | |
| void | addAddressee (KABC::Addressee::List *addresseeList) |
| int | battery () |
| void | deleteSMS (GammuSMS *sms) |
| Device (const char *name) | |
| bool | dial (const QString &number) |
| void | editAddressee (KABC::Addressee *oldAddressee, KABC::Addressee *newAddressee) |
| bool | hangup () |
| QString | imei () |
| QString | manufacturer () |
| QString | model () |
| QString | networkName () |
| KABC::Addressee::List | phonebook () |
| QValueList< QString > | phonebookSlots () |
| bool | phoneConnected () |
| void | removeAddressee (KABC::Addressee::List *addresseeList) |
| bool | ringing () |
| void | sendSMS (SMS *sms) |
| void | sendStoredSMS (GammuSMS *sms) |
| int | signalQuality () |
| QString | smsc () |
| SMSList * | smsList () |
| void | storeSMS (SMS *sms) |
| int | totalSMS () |
| int | unreadSMS () |
| QString | version () |
| ~Device () | |
Constructor & Destructor Documentation
| Device::Device | ( | const char * | name | ) |
- Todo:
- write nice encoding and decoding methods for communication with gammu to replace the ugly statements we have so far
design and implement real error handling
Definition at line 33 of file device.cpp.
| Device::~Device | ( | ) |
Definition at line 98 of file device.cpp.
Member Function Documentation
| void Device::addAddressee | ( | KABC::Addressee::List * | addresseeList | ) |
Adds the supplied addressee list to the phone's contact database.
addresseeList the new contact
- Todo:
- add fail-safe implementation if addMemory is not implemented in gammu's phone protocol
Definition at line 514 of file device.cpp.
| int Device::battery | ( | ) |
Returns the phone's battery status in percent.
- Returns:
- the battery charge status
Definition at line 279 of file device.cpp.
| void Device::connected | ( | ) | [signal] |
| void Device::deleteSMS | ( | GammuSMS * | sms | ) |
Deletes the specified sms from the phone.
sms the sms to delete
Definition at line 1127 of file device.cpp.
| bool Device::dial | ( | const QString & | number | ) |
This causes the phone to dial the supplied number.
number the phone number to dial
- Returns:
- whether dialing was successful
Definition at line 590 of file device.cpp.
| void Device::disconnected | ( | ) | [signal] |
| void Device::editAddressee | ( | KABC::Addressee * | oldAddressee, | |
| KABC::Addressee * | newAddressee | |||
| ) |
Changes the supplied contact according to the new one.
oldAddressee the contact to change newAddressee the new contact information
Definition at line 541 of file device.cpp.
| bool Device::hangup | ( | ) |
This cancels an persisting phone call.
- Returns:
- whether canceling was successful
Definition at line 609 of file device.cpp.
| QString Device::imei | ( | ) |
Returns the device's International Mobile Equipment Identity (IMEI).
- Returns:
- the device's imei
Definition at line 235 of file device.cpp.
| void Device::initPhone | ( | ) | [slot] |
| QString Device::manufacturer | ( | ) |
Returns the phone manufacturer information.
- Returns:
- the device manufacturer
Definition at line 193 of file device.cpp.
| QString Device::model | ( | ) |
Returns the phone model information.
- Returns:
- the device model
Definition at line 172 of file device.cpp.
| QString Device::networkName | ( | ) |
Returns the network's name the phone is currently logged in.
- Returns:
- the current network name
Definition at line 299 of file device.cpp.
| KABC::Addressee::List Device::phonebook | ( | ) |
Returns the device's phonebook.
This will collect contacts from the internal phonebook and the sim card as well.
- Returns:
- the device's phonebook
Definition at line 452 of file device.cpp.
| QValueList< QString > Device::phonebookSlots | ( | ) |
Returns the list of supported phonebook slots.
- Returns:
- the list of supported phonebook slots
Definition at line 422 of file device.cpp.
| bool Device::phoneConnected | ( | ) |
Returns whether the phone is initialized.
- Returns:
- true if the phone is initialized
Definition at line 168 of file device.cpp.
| void Device::removeAddressee | ( | KABC::Addressee::List * | addresseeList | ) |
Removes the supplied addressee list from the phone's contact database.
addresseeList the contact list to remove
Definition at line 564 of file device.cpp.
| bool Device::ringing | ( | ) |
Returns whether the phone is currently ringing.
- Returns:
- true if the phone is ringing
Definition at line 391 of file device.cpp.
| void Device::sendSMS | ( | SMS * | sms | ) |
| void Device::sendStoredSMS | ( | GammuSMS * | sms | ) |
Sends the specified previous stored sms.
sms the sms to send
Definition at line 1167 of file device.cpp.
| int Device::signalQuality | ( | ) |
Returns the signal quality in percent.
- Returns:
- the signal quality in percent
Definition at line 320 of file device.cpp.
| QString Device::smsc | ( | ) |
Returns the SMS Center phone number.
- Returns:
- the phone's smsc
Definition at line 256 of file device.cpp.
| SMSList * Device::smsList | ( | ) |
Loads the phone's sms folder list and fetches the sms.
- Returns:
- the sms
Definition at line 1018 of file device.cpp.
| void Device::storeSMS | ( | SMS * | sms | ) |
Stores the specified sms on the phone.
sms the sms to store
Definition at line 1149 of file device.cpp.
| void Device::terminatePhone | ( | ) | [slot] |
| int Device::totalSMS | ( | ) |
Returns the total amount of SMS.
- Returns:
- the total amount of SMS
Definition at line 365 of file device.cpp.
| int Device::unreadSMS | ( | ) |
Returns the amount of unread SMS.
- Returns:
- the amount of unread SMS
Definition at line 340 of file device.cpp.
| QString Device::version | ( | ) |
Returns the phone's firmware version.
- Returns:
- the device's firmware version
Definition at line 214 of file device.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference