kitchensync Library API Documentation

helper.h

00001 /* 00002 This file is part of KitchenSync. 00003 00004 Copyright (c) 2002,2003 Holger Freyther <freyther@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library 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 GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 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 // from tt GPLed 00054 time_t toUTC( const QDateTime& dt ); 00055 QDateTime fromUTC( time_t time ); 00056 // off tt code 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 // returns a ; separated list of real ids 00068 // will also add the value m_kde2opie 00069 QString categoriesToNumber( const QStringList &categories, 00070 const QString &app= QString::null ); 00071 // convience method 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
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:32 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003