kitchensync
helper.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef OpieHelperBase_H
00022 #define OpieHelperBase_H
00023
00024 #include <sys/types.h>
00025 #include <stdlib.h>
00026 #include <time.h>
00027
00028 #include <qdatetime.h>
00029 #include <qstring.h>
00030 #include <qstringlist.h>
00031 #include <qvaluelist.h>
00032
00033 #include <ktempfile.h>
00034
00035 #include <kontainer.h>
00036 #include <syncer.h>
00037
00038 #include <idhelper.h>
00039
00040 #include "extramap.h"
00041 #include "categoryedit.h"
00042
00043 namespace OpieHelper {
00044 class Device;
00045 class Base {
00046 public:
00047 Base( CategoryEdit* edit =0,
00048 KSync::KonnectorUIDHelper* helper = 0,
00049 const QString &tz = QString::null,
00050 Device* d = 0);
00051 virtual ~Base();
00052 protected:
00053
00054 time_t toUTC( const QDateTime& dt );
00055 QDateTime fromUTC( time_t time );
00056
00057
00059 KTempFile* file();
00060
00062 int newId();
00063
00064 CategoryEdit* edit() { return m_edit; };
00065 KSync::KonnectorUIDHelper* helper() { return m_helper; };
00066
00067 QString appendText(const QString& text, const QString& def);
00068
00069
00070
00071 QString categoriesToNumber( const QStringList &categories,
00072 const QString &app= QString::null );
00073
00074 QString konnectorId( const QString &appName, const QString &uid );
00075 QString kdeId( const QString &appName, const QString &uid );
00076
00077 const Device* device();
00078
00079 CategoryEdit *m_edit;
00080 KSync::KonnectorUIDHelper *m_helper;
00081 Kontainer::ValueList m_kde2opie;
00082 QString m_tz;
00083 private:
00084 Device* m_device;
00085 class BasePrivate;
00086 BasePrivate *baseD;
00087 };
00088
00090 QString escape(const QString&);
00091
00092 }
00093
00094
00095 #endif
|