-rw-r--r-- | kabc/plugins/sharpdtm/resourcesharpdtm.h | 10 | ||||
-rw-r--r-- | kabc/plugins/sharpdtm/sharpdtmE.pro | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.h b/kabc/plugins/sharpdtm/resourcesharpdtm.h index 32d0be1..d2e2a52 100644 --- a/kabc/plugins/sharpdtm/resourcesharpdtm.h +++ b/kabc/plugins/sharpdtm/resourcesharpdtm.h | |||
@@ -1,149 +1,149 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkabc. | 2 | This file is part of libkabc. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /* | 21 | /* |
22 | Enhanced Version of the file for platform independent KDE tools. | 22 | Enhanced Version of the file for platform independent KDE tools. |
23 | Copyright (c) 2004 Ulf Schenk | 23 | Copyright (c) 2004 Ulf Schenk |
24 | 24 | ||
25 | $Id$ | 25 | $Id$ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | 28 | ||
29 | #ifndef KABC_RESOURCESHARPDTM_H | 29 | #ifndef KABC_RESOURCESHARPDTM_H |
30 | #define KABC_RESOURCESHARPDTM_H | 30 | #define KABC_RESOURCESHARPDTM_H |
31 | 31 | ||
32 | #include <kconfig.h> | 32 | #include <kconfig.h> |
33 | #include <kdirwatch.h> | 33 | #include <kdirwatch.h> |
34 | 34 | ||
35 | #include <sys/types.h> | 35 | #include <sys/types.h> |
36 | 36 | ||
37 | #include "resource.h" | 37 | #include "resource.h" |
38 | 38 | ||
39 | 39 | ||
40 | namespace KABC { | 40 | namespace KABC { |
41 | 41 | ||
42 | class ResourceConfigWidget; | 42 | class ResourceConfigWidget; |
43 | class QtopiaConverter; | 43 | class SharpDTMConverter; |
44 | 44 | ||
45 | /** | 45 | /** |
46 | @internal | 46 | @internal |
47 | */ | 47 | */ |
48 | class ResourceSharpDTM : public Resource | 48 | class ResourceSharpDTM : public Resource |
49 | { | 49 | { |
50 | Q_OBJECT | 50 | Q_OBJECT |
51 | 51 | ||
52 | public: | 52 | public: |
53 | 53 | ||
54 | /** | 54 | /** |
55 | Constructor. | 55 | Constructor. |
56 | 56 | ||
57 | @param cfg The config object where custom resource settings are stored. | 57 | @param cfg The config object where custom resource settings are stored. |
58 | */ | 58 | */ |
59 | ResourceSharpDTM( const KConfig *cfg ); | 59 | ResourceSharpDTM( const KConfig *cfg ); |
60 | 60 | ||
61 | /** | 61 | /** |
62 | Construct file resource on file @arg fileName using format @arg formatName. | 62 | Construct file resource on file @arg fileName using format @arg formatName. |
63 | */ | 63 | */ |
64 | ResourceSharpDTM( const QString &fileName ); | 64 | ResourceSharpDTM( const QString &fileName ); |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * Destructor. | 67 | * Destructor. |
68 | */ | 68 | */ |
69 | ~ResourceSharpDTM(); | 69 | ~ResourceSharpDTM(); |
70 | 70 | ||
71 | /** | 71 | /** |
72 | Writes the config back. | 72 | Writes the config back. |
73 | */ | 73 | */ |
74 | virtual void writeConfig( KConfig *cfg ); | 74 | virtual void writeConfig( KConfig *cfg ); |
75 | 75 | ||
76 | /** | 76 | /** |
77 | * Tries to open the file and checks for the proper format. | 77 | * Tries to open the file and checks for the proper format. |
78 | * This method should be called before @ref load(). | 78 | * This method should be called before @ref load(). |
79 | */ | 79 | */ |
80 | virtual bool doOpen(); | 80 | virtual bool doOpen(); |
81 | 81 | ||
82 | /** | 82 | /** |
83 | * Closes the file again. | 83 | * Closes the file again. |
84 | */ | 84 | */ |
85 | virtual void doClose(); | 85 | virtual void doClose(); |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * Requests a save ticket, that is used by @ref save() | 88 | * Requests a save ticket, that is used by @ref save() |
89 | */ | 89 | */ |
90 | virtual Ticket *requestSaveTicket(); | 90 | virtual Ticket *requestSaveTicket(); |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * Loads all addressees from file to the address book. | 93 | * Loads all addressees from file to the address book. |
94 | * Returns true if all addressees could be loaded otherwise false. | 94 | * Returns true if all addressees could be loaded otherwise false. |
95 | */ | 95 | */ |
96 | virtual bool load(); | 96 | virtual bool load(); |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * Saves all addresses from address book to file. | 99 | * Saves all addresses from address book to file. |
100 | * Returns true if all addressees could be saved otherwise false. | 100 | * Returns true if all addressees could be saved otherwise false. |
101 | * | 101 | * |
102 | * @param ticket The ticket returned by @ref requestSaveTicket() | 102 | * @param ticket The ticket returned by @ref requestSaveTicket() |
103 | */ | 103 | */ |
104 | virtual bool save( Ticket *ticket ); | 104 | virtual bool save( Ticket *ticket ); |
105 | 105 | ||
106 | /** | 106 | /** |
107 | * Set name of file to be used for saving. | 107 | * Set name of file to be used for saving. |
108 | */ | 108 | */ |
109 | void setFileName( const QString & ); | 109 | void setFileName( const QString & ); |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * Return name of file used for loading and saving the address book. | 112 | * Return name of file used for loading and saving the address book. |
113 | */ | 113 | */ |
114 | QString fileName() const; | 114 | QString fileName() const; |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * Remove a addressee from its source. | 117 | * Remove a addressee from its source. |
118 | * This method is mainly called by KABC::AddressBook. | 118 | * This method is mainly called by KABC::AddressBook. |
119 | */ | 119 | */ |
120 | virtual void removeAddressee( const Addressee& addr ); | 120 | virtual void removeAddressee( const Addressee& addr ); |
121 | 121 | ||
122 | /** | 122 | /** |
123 | * This method is called by an error handler if the application | 123 | * This method is called by an error handler if the application |
124 | * crashed | 124 | * crashed |
125 | */ | 125 | */ |
126 | virtual void cleanUp(); | 126 | virtual void cleanUp(); |
127 | 127 | ||
128 | protected slots: | 128 | protected slots: |
129 | void fileChanged(); | 129 | void fileChanged(); |
130 | 130 | ||
131 | protected: | 131 | protected: |
132 | void init( const QString &fileName ); | 132 | void init( const QString &fileName ); |
133 | 133 | ||
134 | bool lock( const QString &fileName ); | 134 | bool lock( const QString &fileName ); |
135 | void unlock( const QString &fileName ); | 135 | void unlock( const QString &fileName ); |
136 | 136 | ||
137 | private: | 137 | private: |
138 | QtopiaConverter* mConverter; | 138 | SharpDTMConverter* mConverter; |
139 | 139 | ||
140 | QString mFileName; | 140 | QString mFileName; |
141 | 141 | ||
142 | QString mLockUniqueName; | 142 | QString mLockUniqueName; |
143 | 143 | ||
144 | KDirWatch mDirWatch; | 144 | KDirWatch mDirWatch; |
145 | }; | 145 | }; |
146 | 146 | ||
147 | } | 147 | } |
148 | 148 | ||
149 | #endif | 149 | #endif |
diff --git a/kabc/plugins/sharpdtm/sharpdtmE.pro b/kabc/plugins/sharpdtm/sharpdtmE.pro index f29be2f..7c7a6d5 100644 --- a/kabc/plugins/sharpdtm/sharpdtmE.pro +++ b/kabc/plugins/sharpdtm/sharpdtmE.pro | |||
@@ -1,31 +1,31 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | #release debug | 3 | #release debug |
4 | TARGET = microkabc_sharpdtm | 4 | TARGET = microkabc_sharpdtm |
5 | 5 | ||
6 | INCLUDEPATH += ../.. ../../../external/sharpdtm/include ../../converter/qtopia ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../qtcompat $(QPEDIR)/include | 6 | INCLUDEPATH += ../.. ../../../external/sharpdtm/include ../../converter/sharpdtm ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../qtcompat $(QPEDIR)/include |
7 | 7 | ||
8 | 8 | ||
9 | OBJECTS_DIR = obj/$(PLATFORM) | 9 | OBJECTS_DIR = obj/$(PLATFORM) |
10 | MOC_DIR = moc/$(PLATFORM) | 10 | MOC_DIR = moc/$(PLATFORM) |
11 | DESTDIR = $(QPEDIR)/lib | 11 | DESTDIR = $(QPEDIR)/lib |
12 | LIBS += -lmicrokde | 12 | LIBS += -lmicrokde |
13 | LIBS += -lmicrokabc | 13 | LIBS += -lmicrokabc |
14 | LIBS += -L$(QPEDIR)/lib | 14 | LIBS += -L$(QPEDIR)/lib |
15 | LIBS += -lqpe | 15 | LIBS += -lqpe |
16 | LIBS += -lqte | 16 | LIBS += -lqte |
17 | LIBS += -lzdtm | 17 | LIBS += -lzdtm |
18 | LIBS += -lmicrokabc_sharpdtmconverter | 18 | LIBS += -lmicrokabc_sharpdtmconverter |
19 | #LIBS += -L../../lib/$(PLATFORM) | 19 | #LIBS += -L../../lib/$(PLATFORM) |
20 | 20 | ||
21 | 21 | ||
22 | INTERFACES = \ | 22 | INTERFACES = \ |
23 | 23 | ||
24 | HEADERS = \ | 24 | HEADERS = \ |
25 | resourcesharpdtm.h \ | 25 | resourcesharpdtm.h \ |
26 | resourcesharpdtmconfig.h \ | 26 | resourcesharpdtmconfig.h \ |
27 | 27 | ||
28 | SOURCES = \ | 28 | SOURCES = \ |
29 | resourcesharpdtm.cpp \ | 29 | resourcesharpdtm.cpp \ |
30 | resourcesharpdtmconfig.cpp \ | 30 | resourcesharpdtmconfig.cpp \ |
31 | 31 | ||