00001
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
bool metaSyncing = FALSE, 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();
00061
int newId();
00062 CategoryEdit* edit() {
return m_edit; };
00063 KSync::KonnectorUIDHelper* helper() {
return m_helper; };
00064
bool isMetaSyncingEnabled()const;
00065
void setMetaSyncingEnabled(
bool meta);
00066
00067
00068
00069
QString categoriesToNumber( const
QStringList &categories,
00070 const
QString &app=
QString::null );
00071
00072
QString konnectorId( const
QString &appName, const
QString &uid );
00073
QString kdeId( const
QString &appName, const
QString &uid );
00074
00075 const Device* device();
00076
00077 CategoryEdit *m_edit;
00078 KSync::KonnectorUIDHelper *m_helper;
00079 Kontainer::ValueList m_kde2opie;
00080
bool m_metaSyncing : 1;
00081
QString m_tz;
00082 private:
00083 Device* m_device;
00084 class BasePrivate;
00085 BasePrivate *baseD;
00086 };
00087
00089
QString escape(const
QString&);
00090
00091 }
00092
00093
00094 #endif