summaryrefslogtreecommitdiffabout
path: root/libkcal
Side-by-side diff
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp79
-rw-r--r--libkcal/phoneformat.h14
2 files changed, 49 insertions, 44 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index f78730d..fa18683 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -61,6 +61,6 @@ using namespace KCal;
-class SharpParser : public QObject
+class PhoneParser : public QObject
{
public:
- SharpParser( Calendar *calendar ) : mCalendar( calendar ) {
+ PhoneParser( Calendar *calendar ) : mCalendar( calendar ) {
oldCategories = 0;
@@ -82,3 +82,3 @@ class SharpParser : public QObject
return false;
- ulong cSum = SharpFormat::getCsum(attList );
+ ulong cSum = PhoneFormat::getCsum(attList );
@@ -86,3 +86,3 @@ class SharpParser : public QObject
Event *event;
- event = existingCalendar->event( attList[0].toInt() );
+ event = existingCalendar->event( attList[0] );
if ( event )
@@ -91,5 +91,5 @@ class SharpParser : public QObject
event = new Event;
- event->setZaurusId( attList[0].toInt() );
- event->setZaurusUid( cSum );
- event->setZaurusStat( -2 );
+ // event->setZaurusId( attList[0].toInt() );
+ //event->setZaurusUid( cSum );
+ //event->setZaurusStat( -2 );
@@ -190,3 +190,3 @@ class SharpParser : public QObject
- todo = existingCalendar->todo( attList[0].toInt() );
+ todo = existingCalendar->todo( attList[0] );
if (todo )
@@ -202,5 +202,5 @@ class SharpParser : public QObject
- todo->setZaurusId( attList[0].toInt() );
- todo->setZaurusUid( cSum );
- todo->setZaurusStat( -2 );
+ //todo->setZaurusId( attList[0] );
+ //todo->setZaurusUid( cSum );
+ //todo->setZaurusStat( -2 );
@@ -325,5 +325,5 @@ class SharpParser : public QObject
-QMap<QString,QString> SharpParser::mCategoriesMap;
+QMap<QString,QString> PhoneParser::mCategoriesMap;
-SharpFormat::SharpFormat()
+PhoneFormat::PhoneFormat()
{
@@ -332,6 +332,6 @@ SharpFormat::SharpFormat()
-SharpFormat::~SharpFormat()
+PhoneFormat::~PhoneFormat()
{
}
-ulong SharpFormat::getCsum( const QStringList & attList)
+ulong PhoneFormat::getCsum( const QStringList & attList)
{
@@ -361,3 +361,3 @@ ulong SharpFormat::getCsum( const QStringList & attList)
#define DEBUGMODE false
-bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
+bool PhoneFormat::load( Calendar *calendar, Calendar *existngCal )
{
@@ -490,3 +490,3 @@ static char *cp;
}
-int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
+int PhoneFormat::getNumFromRecord( QString answer, Incidence* inc )
{
@@ -531,5 +531,5 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
retval = newnum;
- inc->setZaurusId( newnum );
- inc->setZaurusUid( getCsum( templist ) );
- inc->setZaurusStat( -4 );
+ //inc->setZaurusId( newnum );
+ //inc->setZaurusUid( getCsum( templist ) );
+ //inc->setZaurusStat( -4 );
}
@@ -540,3 +540,3 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
}
-bool SharpFormat::save( Calendar *calendar)
+bool PhoneFormat::save( Calendar *calendar)
{
@@ -572,3 +572,3 @@ bool SharpFormat::save( Calendar *calendar)
//qDebug("i %d ", ++i);
- if ( ev->zaurusStat() != -2 ) {
+ if ( true /*ev->zaurusStat() != -2*/ ) {
status.setText ( message + QString::number ( ++procCount ) );
@@ -576,3 +576,3 @@ bool SharpFormat::save( Calendar *calendar)
QString eString = getEventString( ev );
- if ( ev->zaurusStat() == -3 ) { // delete
+ if (/* ev->zaurusStat() == -3 */ true) { // delete
// deleting empty strings does not work.
@@ -585,3 +585,3 @@ bool SharpFormat::save( Calendar *calendar)
}
- else if ( ev->zaurusId() == -1 ) { // add new
+ else if ( /*ev->zaurusId() == -1*/true ) { // add new
command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName;
@@ -658,3 +658,3 @@ bool SharpFormat::save( Calendar *calendar)
while ( to ) {
- if ( to->zaurusStat() != -2 ) {
+ if ( true /*to->zaurusStat() != -2 */) {
status.setText ( message + QString::number ( ++procCount ) );
@@ -662,3 +662,3 @@ bool SharpFormat::save( Calendar *calendar)
QString eString = getTodoString( to );
- if ( to->zaurusStat() == -3 ) { // delete
+ if ( /*to->zaurusStat() == -3*/true ) { // delete
// deleting empty strings does not work.
@@ -671,3 +671,3 @@ bool SharpFormat::save( Calendar *calendar)
}
- else if ( to->zaurusId() == -1 ) { // add new
+ else if ( true /*to->zaurusId() == -1*/ ) { // add new
command = "(echo \"" + tPrefix + eString + "\" ) | db2file todo -w -g -c " + codec+ " > "+ fileName;
@@ -736,3 +736,3 @@ bool SharpFormat::save( Calendar *calendar)
}
-QString SharpFormat::dtToString( const QDateTime& dti, bool useTZ )
+QString PhoneFormat::dtToString( const QDateTime& dti, bool useTZ )
{
@@ -758,4 +758,5 @@ QString SharpFormat::dtToString( const QDateTime& dti, bool useTZ )
}
-QString SharpFormat::getEventString( Event* event )
+QString PhoneFormat::getEventString( Event* event )
{
+#if 0
QStringList list;
@@ -919,7 +920,9 @@ QString SharpFormat::getEventString( Event* event )
return list.join(",");
-
+#endif
+ return QString();
}
-QString SharpFormat::getTodoString( Todo* todo )
+QString PhoneFormat::getTodoString( Todo* todo )
{
+#if 0
QStringList list;
@@ -971,4 +974,6 @@ QString SharpFormat::getTodoString( Todo* todo )
return list.join(",");
+#endif
+ return QString();
}
-QString SharpFormat::getPart( const QString & text, bool &ok, int &start )
+QString PhoneFormat::getPart( const QString & text, bool &ok, int &start )
{
@@ -1030,3 +1035,3 @@ QString SharpFormat::getPart( const QString & text, bool &ok, int &start )
}
-bool SharpFormat::fromString( Calendar *calendar, const QString & text)
+bool PhoneFormat::fromString( Calendar *calendar, const QString & text)
{
@@ -1034,3 +1039,3 @@ bool SharpFormat::fromString( Calendar *calendar, const QString & text)
}
-bool SharpFormat::fromString2Cal( Calendar *calendar,Calendar *existingCalendar, GSM_StateMachine* s, const QString & type)
+bool PhoneFormat::fromString2Cal( Calendar *calendar,Calendar *existingCalendar, GSM_StateMachine* s, const QString & type)
{
@@ -1044,3 +1049,3 @@ bool SharpFormat::fromString2Cal( Calendar *calendar,Calendar *existingCalendar,
bool gshutdown = false;
- SharpParser handler( calendar );
+ PhoneParser handler( calendar );
//handler.setCategoriesList( mCategories );
@@ -1332,3 +1337,3 @@ typedef struct {
start = end;
- SharpParser handler( calendar );
+ PhoneParser handler( calendar );
handler.setCategoriesList( mCategories );
@@ -1355,3 +1360,3 @@ typedef struct {
-QString SharpFormat::toString( Calendar * )
+QString PhoneFormat::toString( Calendar * )
{
diff --git a/libkcal/phoneformat.h b/libkcal/phoneformat.h
index f4cb52c..4ddf6f0 100644
--- a/libkcal/phoneformat.h
+++ b/libkcal/phoneformat.h
@@ -20,4 +20,4 @@
*/
-#ifndef SHARPFORMAT_H
-#define SHARPAFORMAT_H
+#ifndef PHONEFORMAT_H
+#define PHONEFORMAT_H
@@ -29,3 +29,3 @@
extern "C" {
-#include "gammu.h"
+#include "../gammu/emb/common/gammu.h"
}
@@ -35,10 +35,10 @@ namespace KCal {
/**
- This class implements the calendar format used by Sharp.
+ This class implements the calendar format used by Phone.
*/
-class SharpFormat : public QObject {
+class PhoneFormat : public QObject {
public:
/** Create new iCalendar format. */
- SharpFormat();
- virtual ~SharpFormat();
+ PhoneFormat();
+ virtual ~PhoneFormat();