kmobiletools
atabilities.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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