-rw-r--r-- | libkcal/phoneformat.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libkcal/phoneformat.h b/libkcal/phoneformat.h index 2c2e51c..8286098 100644 --- a/libkcal/phoneformat.h +++ b/libkcal/phoneformat.h | |||
@@ -6,62 +6,56 @@ | |||
6 | This library is free software; you can redistribute it and/or | 6 | This library is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU Library General Public | 7 | modify it under the terms of the GNU Library General Public |
8 | License as published by the Free Software Foundation; either | 8 | License as published by the Free Software Foundation; either |
9 | version 2 of the License, or (at your option) any later version. | 9 | version 2 of the License, or (at your option) any later version. |
10 | 10 | ||
11 | This library is distributed in the hope that it will be useful, | 11 | This library is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | Library General Public License for more details. | 14 | Library General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU Library General Public License | 16 | You should have received a copy of the GNU Library General Public License |
17 | along with this library; see the file COPYING.LIB. If not, write to | 17 | along with this library; see the file COPYING.LIB. If not, write to |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. | 19 | Boston, MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | #ifndef PHONEFORMAT_H | 21 | #ifndef PHONEFORMAT_H |
22 | #define PHONEFORMAT_H | 22 | #define PHONEFORMAT_H |
23 | 23 | ||
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | 25 | ||
26 | #include "scheduler.h" | 26 | #include "scheduler.h" |
27 | 27 | ||
28 | #include "vcalformat.h" | 28 | #include "vcalformat.h" |
29 | #include "calformat.h" | 29 | #include "calformat.h" |
30 | extern "C" { | 30 | |
31 | #include "../gammu/emb/common/gammu.h" | ||
32 | } | ||
33 | namespace KCal { | 31 | namespace KCal { |
34 | 32 | ||
35 | /** | 33 | /** |
36 | This class implements the calendar format used by Phone. | 34 | This class implements the calendar format used by Phone. |
37 | */ | 35 | */ |
38 | class Event; | 36 | class Event; |
39 | class Todo; | 37 | class Todo; |
40 | class PhoneFormat : public QObject { | 38 | class PhoneFormat : public QObject { |
41 | public: | 39 | public: |
42 | /** Create new iCalendar format. */ | 40 | /** Create new iCalendar format. */ |
43 | PhoneFormat(QString profileName, QString device,QString connection, QString model); | 41 | PhoneFormat(QString profileName, QString device,QString connection, QString model); |
44 | virtual ~PhoneFormat(); | 42 | virtual ~PhoneFormat(); |
45 | 43 | ||
46 | bool load( Calendar * ,Calendar * ); | 44 | bool load( Calendar * ,Calendar * ); |
47 | bool save( Calendar * ); | 45 | bool save( Calendar * ); |
48 | bool fromString( Calendar *, const QString & ); | 46 | bool fromString( Calendar *, const QString & ); |
49 | QString toString( Calendar * ); | 47 | QString toString( Calendar * ); |
50 | static ulong getCsum( const QStringList & ); | 48 | static ulong getCsum( const QStringList & ); |
51 | static ulong getCsumTodo( Todo* to ); | 49 | static ulong getCsumTodo( Todo* to ); |
52 | static ulong getCsumEvent( Event* ev ); | 50 | static ulong getCsumEvent( Event* ev ); |
53 | private: | 51 | private: |
54 | VCalFormat vfconverter; | 52 | void copyEvent( Event* to, Event* from ); |
55 | void event2GSM( Calendar *, Event* ev, GSM_CalendarEntry*Note ); | 53 | void copyTodo( Todo* to, Todo* from ); |
56 | void todo2GSM( Calendar *, Todo* ev, GSM_ToDoEntry *ToDo ); | 54 | //int initDevice(GSM_StateMachine *s); |
57 | int initDevice(GSM_StateMachine *s); | ||
58 | QString getEventString( Event* ); | ||
59 | QString getTodoString( Todo* ); | ||
60 | QString dtToGSM( const QDateTime& dt, bool useTZ = true ); | ||
61 | QString mProfileName, mDevice, mConnection, mModel; | 55 | QString mProfileName, mDevice, mConnection, mModel; |
62 | void afterSave( Incidence* ); | 56 | void afterSave( Incidence* ); |
63 | }; | 57 | }; |
64 | 58 | ||
65 | } | 59 | } |
66 | 60 | ||
67 | #endif | 61 | #endif |