-rw-r--r-- | libkcal/phoneformat.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index 1a9ccbc..7e1c9cd 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp | |||
@@ -45,22 +45,8 @@ | |||
45 | #include "syncdefines.h" | 45 | #include "syncdefines.h" |
46 | 46 | ||
47 | using namespace KCal; | 47 | using namespace KCal; |
48 | 48 | ||
49 | //CARDID,CATEGORY,DSRP,PLCE,MEM1,TIM1,TIM2,ADAY,ARON,ARMN,ARSD,RTYP,RFRQ,RPOS,RDYS,REND,REDT,ALSD,ALED,MDAY | ||
50 | // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ||
51 | |||
52 | //ARSD silentalarm = 0 | ||
53 | // 11 RTYP 225 no /0 dialy/ 1 weekly/ 3 month by date/ 2 month by day(pos)/ yearly | ||
54 | // 12 RFRQ | ||
55 | // 13 RPOS pos = 4. monday in month | ||
56 | // 14 RDYS days: 1 mon/ 2 tue .. 64 sun | ||
57 | // 15 REND 0 = no end/ 1 = end | ||
58 | // 16 REDT rec end dt | ||
59 | //ALSD | ||
60 | //ALED | ||
61 | //MDAY | ||
62 | |||
63 | class PhoneParser : public QObject | 49 | class PhoneParser : public QObject |
64 | { | 50 | { |
65 | public: | 51 | public: |
66 | PhoneParser( Calendar *calendar, QString profileName ) : mCalendar( calendar ), mProfileName ( profileName ) { | 52 | PhoneParser( Calendar *calendar, QString profileName ) : mCalendar( calendar ), mProfileName ( profileName ) { |
@@ -172,9 +158,8 @@ public: | |||
172 | break; | 158 | break; |
173 | } | 159 | } |
174 | } | 160 | } |
175 | QString alarmString = ""; | 161 | QString alarmString = ""; |
176 | // strange 0 semms to mean: alarm enabled | ||
177 | if ( alarm ) { | 162 | if ( alarm ) { |
178 | Alarm *alarm; | 163 | Alarm *alarm; |
179 | if ( todo->alarms().count() > 0 ) | 164 | if ( todo->alarms().count() > 0 ) |
180 | alarm = todo->alarms().first(); | 165 | alarm = todo->alarms().first(); |
@@ -662,9 +647,8 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi | |||
662 | setlocale(LC_ALL, ""); | 647 | setlocale(LC_ALL, ""); |
663 | GSM_ReadConfig(NULL, &s.Config[0], 0); | 648 | GSM_ReadConfig(NULL, &s.Config[0], 0); |
664 | s.ConfigNum = 1; | 649 | s.ConfigNum = 1; |
665 | GSM_Config *cfg = &s.Config[0]; | 650 | GSM_Config *cfg = &s.Config[0]; |
666 | di.coding = "utf8"; | ||
667 | if ( ! connection.isEmpty() ) { | 651 | if ( ! connection.isEmpty() ) { |
668 | cfg->Connection = strdup(connection.latin1()); | 652 | cfg->Connection = strdup(connection.latin1()); |
669 | cfg->DefaultConnection = false; | 653 | cfg->DefaultConnection = false; |
670 | qDebug("Connection set %s ", cfg->Connection ); | 654 | qDebug("Connection set %s ", cfg->Connection ); |
@@ -683,20 +667,20 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi | |||
683 | 667 | ||
684 | 668 | ||
685 | } | 669 | } |
686 | int error=GSM_InitConnection(&s,3); | 670 | int error=GSM_InitConnection(&s,3); |
687 | qDebug(" init %d %d", error, ERR_NONE); | 671 | qDebug("GSM Init %d (no error is %d)", error, ERR_NONE); |
688 | if ( error != ERR_NONE ) | 672 | if ( error != ERR_NONE ) |
689 | return false; | 673 | return false; |
690 | // fromString2Cal( calendar, existngCal, &s, "Event" ); | ||
691 | GSM_Phone_Functions*Phone; | 674 | GSM_Phone_Functions*Phone; |
692 | GSM_CalendarEntrynote; | 675 | GSM_CalendarEntrynote; |
693 | bool start = true; | 676 | bool start = true; |
694 | Phone=s.Phone.Functions; | 677 | Phone=s.Phone.Functions; |
695 | bool gshutdown = false; | 678 | bool gshutdown = false; |
696 | PhoneParser handler( calendar, profileName ); | 679 | PhoneParser handler( calendar, profileName ); |
697 | int ccc = 0; | 680 | int ccc = 0; |
698 | while (!gshutdown && ccc++ < 3) { | 681 | qDebug("Debug: only 10 calender items are downloaded "); |
682 | while (!gshutdown && ccc++ < 10) { | ||
699 | 683 | ||
700 | qDebug("readEvent %d ", ccc); | 684 | qDebug("readEvent %d ", ccc); |
701 | error=Phone->GetNextCalendar(&s,¬e,start); | 685 | error=Phone->GetNextCalendar(&s,¬e,start); |
702 | if (error == ERR_EMPTY) break; | 686 | if (error == ERR_EMPTY) break; |
@@ -710,9 +694,9 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal ,QString profi | |||
710 | while (!gshutdown) { | 694 | while (!gshutdown) { |
711 | error = Phone->GetNextToDo(&s, &ToDo, start); | 695 | error = Phone->GetNextToDo(&s, &ToDo, start); |
712 | if (error == ERR_EMPTY) break; | 696 | if (error == ERR_EMPTY) break; |
713 | start = false; | 697 | start = false; |
714 | qDebug("readTodo %d ", ++ccc); | 698 | qDebug("ReadTodo %d ", ++ccc); |
715 | handler.readTodo( existingCal, &ToDo, &s); | 699 | handler.readTodo( existingCal, &ToDo, &s); |
716 | 700 | ||
717 | } | 701 | } |
718 | 702 | ||