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

kmobiletools

at_engine.h

Go to the documentation of this file.
00001 /***************************************************************************
00002    Copyright (C) 2007
00003    by Marco Gulino <marco@kmobiletools.org>
00004 
00005    This program is free software; you can redistribute it and/or modify
00006    it under the terms of the GNU General Public License as published by
00007    the Free Software Foundation; either version 2 of the License, or
00008    (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the
00017    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019  ***************************************************************************/
00020 #ifndef KMOBILETOOLSAT_ENGINE_H
00021 #define KMOBILETOOLSAT_ENGINE_H
00022 
00023 #include <klibloader.h>
00024 
00025 #include <config-kmobiletools.h>
00026 
00027 #ifdef HAVE_KCAL
00028 #include "calendar_jobs.h"
00029 #endif
00030 
00031 #include "atabilities.h"
00032 #include "atengineconfig.h"
00033 
00034 #include <libkmobiletools/engine.h>
00035 #include <libkmobiletools/serialdevice.h>
00036 //Added by qt3to4:
00037 #include <Q3ValueList>
00038 /*class Device;*/
00039 class QWizardPage;
00040 class ATDevicesConfig;
00041 class TestPhoneDeviceJob;
00042 class FindDeviceDataJob;
00046 using namespace ThreadWeaver;
00047 
00048 typedef QHash<QString,KMobileTools::EngineData> ATDevices;
00049 
00050 class AT_Engine : public KMobileTools::Engine
00051 {
00052 Q_OBJECT
00053 public:
00054     explicit AT_Engine(QObject *parent = 0, const QString &name = QString() );
00055 
00056     ~AT_Engine();
00057     enum ATJobTypes { TestPhoneDevice=KMobileTools::Job::UserJob+1, FindDeviceData=KMobileTools::Job::UserJob+2 };
00058 //     enum jobTypes
00059 //     { PollStatus=1, PollSMS=2 };
00060 
00061         void setATAbilities( ATAbilities atAbilities );
00062         ATAbilities getATAbilities() const;
00063         int availPbSlots();
00064     static QString getPBMemSlotString(int memslot);
00065     void queryClose();
00066     bool pdu();
00067     QString currentDeviceName() const;
00068     QString engineLibName() const;
00069     void setDevice ( const QString &deviceName);
00070     QList<QWizardPage*> wizardPages(QWidget *parentWidget);
00071     QList<QWidget*> configWidgets(QWidget *parentWidget);
00075     QStringList encodings()
00076     {
00077         return atAbilities.getCharacterSets();
00078     }
00079     QString parseWizardSummary(const QString &strtemplate, const QString &deviceName) const;
00080     ATDevicesConfig *config(bool forceNew=false, const QString &groupName=QString() );
00081     private:
00084         ATAbilities atAbilities;
00085         KMobileTools::SerialManager *device;
00086         bool queue_sms;
00088         QStringList initStrings();
00089         KMobileTools::Job *p_lastJob;
00090         void searchPhones(ATDevicesConfig::Connection connections, const QStringList &bluetoothDevices, const QStringList &customDevices);
00091         QList<TestPhoneDeviceJob*> l_testphonejobs;
00092         void enqueueTPJob(TestPhoneDeviceJob*);
00093 
00094 public slots:
00095     void slotPollStatus();
00096     void processSlot(KMobileTools::Job* );
00097     void slotFetchInfos();
00098     void slotInitPhone();
00099     void slotFetchPhonebook();
00100     void slotFetchSMS();
00101     void slotAddAddressee(const KABC::Addressee::List&);
00102     void slotDelAddressee(const KABC::Addressee::List&);
00103 
00104     void slotEditAddressee(const KABC::Addressee& p_oldAddressee, const KABC::Addressee& p_newAddressee);
00105     void slotWeaverSuspended();
00106     void slotResumeDevice();
00107     void slotStopDevice();
00108     static void closeDevice(KMobileTools::SerialManager *dev)
00109     {
00110         if(!dev) return;
00111         dev->close();
00112     }
00113     void closeDevice() { AT_Engine::closeDevice(device); }
00114     void slotDelSMS(KMobileTools::SMS* sms);
00115     void slotSendStoredSMS(KMobileTools::SMS*);
00116     void slotStoreSMS(const QString &number, const QString &text);
00117     void slotSendSMS(const QString &number, const QString &text);
00118     void slotSearchPhone();
00119     void slotSendSMS(KMobileTools::SMS*);
00120     void slotStoreSMS(KMobileTools::SMS*);
00121 //     void invalidLockFile(const QString &);
00122     void slotDial(DialActions, const QString & =QString() );
00123 
00124 
00125 protected slots:
00126     void slotFetchCalendar();
00127     void slotSwitchToFSMode();
00128 
00129 private slots:
00130     void connectionStateChanged();
00131 
00132 signals:
00133     void foundDeviceData(FindDeviceDataJob*);
00134 };
00135 
00136 #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