• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kmobiletools

atabilities.h

Go to the documentation of this file.
00001 /***************************************************************************
00002    Copyright (C) 2007
00003    by Marco Gulino <marco@kmobiletools.org>,
00004    Alexander Rensmann <zerraxys@gmx.net>
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the
00018    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
00020  ***************************************************************************/
00021 
00022 #ifndef ATABILITIES_H
00023 #define ATABILITIES_H
00024 
00025 class QStringList;
00026 #include <qstring.h>
00027 #include <qstringlist.h>
00028 #include <libkmobiletools/devicesconfig.h>
00029 
00030 
00036 class ATAbilities
00037 {
00038     public:
00039         ATAbilities();
00042         QStringList getPBSlots() const { return sl_pbSlots; }
00043         int filesystem() { return i_filesystem; }
00046         bool canSelectPBSlots() { return sl_pbSlots.count()!=0; }
00049         QStringList getCharacterSets() const { return sl_CharacterSets; }
00052         bool canSelectCharacterSets() { return sl_CharacterSets.count()!=0; }
00055         QStringList getSMSSlots() const { return sl_SMSSlots; }
00058         bool canSelectSMSSlots() { return sl_SMSSlots.count()!=0; }
00061         bool isPDU() { return smsPDUMode; }
00064         bool isSiemens() { return manufacturer.contains( "Siemens", Qt::CaseInsensitive ); }
00067         bool isMotorola() { return manufacturer.contains( "Motorola", Qt::CaseInsensitive ); }
00070         bool isSonyEricsson() { return manufacturer.contains( "Ericsson", Qt::CaseInsensitive ); }
00075         bool canSMGL() { return b_canSMGL; }
00080         bool canSiemensVCF() { return b_canSiemensVCF; }
00086         bool canSDBR() { return b_canSDBR; }
00090         bool canStoreSMS() { return b_canStoreSMS; }
00094         bool canDeleteSMS() { return b_canDeleteSMS; }
00098         bool canSendSMS() { return b_canSendSMS; }
00099 
00100         QString printCapabilities() {
00101                 QString out="Phonebook Slots: %1";
00102                 out += "\nCan select phonebook slots: %2";
00103                 out += "\nCharset: %4";;
00104                 out += "\nCan select charset:%5";
00105                 out += "\nSMS Slots: %6" ;
00106                 out += "\nCan select SMS slots: %7";;
00107                 out += "\nPDU Mode: %8";;
00108                 out=out.arg(getPBSlots().join(",")).arg(canSelectPBSlots()).arg(getCharacterSets().join(",")).arg(canSelectCharacterSets())
00109                         .arg(getSMSSlots().join(",")).arg(canSelectSMSSlots()).arg(isPDU());
00110                 out += "\nSiemens phone: %1" ;
00111                 out += "\nSMGL siemens command: %2";
00112                 out += "\nSDBR siemens command: %3";
00113                 out += "\nSiemens VCF: %4";
00114                 out += "\nCan store SMS: %5";
00115                 out += "\nCan delete SMS: %6";
00116                 out += "\nCan send SMS: %7";
00117                 out += "\nManufacturer: %8";
00118                 out=out.arg(isSiemens()).arg(canSMGL()).arg(canSDBR()).arg(canSiemensVCF()).arg(canStoreSMS()).arg(canDeleteSMS()).arg(canSendSMS()).arg(manufacturer);
00119                 out += "\nFileSystem abilities: %1";
00120                 switch( filesystem() ){
00121                     case KMT_FILESYSTEM_NONE:
00122                         out=out.arg("none");
00123                         break;
00124                     case KMT_FILESYSTEM_Pk2:
00125                         out=out.arg("P2K");
00126                         break;
00127                 }
00128                 return out.append("\n");
00129         }
00130     protected:
00131         void setPBSlots( const QStringList &pbslots ) { sl_pbSlots = pbslots; }
00132         void setSMSSlots( const QStringList &smsslots ) { sl_SMSSlots = smsslots; }
00133         void setCharacterSets( const QStringList &characterSets ) { sl_CharacterSets = characterSets; }
00134         void setManufacturer( const QString &manufacturer );
00135         void setFileSystem( int fs ) { i_filesystem=fs; }
00136         int i_filesystem;
00140         QStringList sl_pbSlots;
00143         QStringList sl_CharacterSets;
00146         QStringList sl_SMSSlots;
00149         QString manufacturer;
00150         bool smsPDUMode, b_canSMGL, b_canSiemensVCF, b_canStoreSMS, b_canSendSMS, b_canDeleteSMS, b_canSDBR;
00151     friend class TestPhoneFeatures;
00152 };
00153 
00154 #endif

kmobiletools

Skip menu "kmobiletools"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal