author | ulf69 <ulf69> | 2004-08-19 00:33:04 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-19 00:33:04 (UTC) |
commit | 00101d27c9305ac3163e1a0c8ed27408b41fa192 (patch) (unidiff) | |
tree | 3051c96ef71245c97fb18d0804749e7d04bd4ad2 /libkdepim/externalapphandler.h | |
parent | 05a1b5cbea6a7c1a7500632f8e7c1bf5be9328d8 (diff) | |
download | kdepimpi-00101d27c9305ac3163e1a0c8ed27408b41fa192.zip kdepimpi-00101d27c9305ac3163e1a0c8ed27408b41fa192.tar.gz kdepimpi-00101d27c9305ac3163e1a0c8ed27408b41fa192.tar.bz2 |
code cleanup
Diffstat (limited to 'libkdepim/externalapphandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/externalapphandler.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h index a74080f..1b04b2b 100644 --- a/libkdepim/externalapphandler.h +++ b/libkdepim/externalapphandler.h | |||
@@ -153,104 +153,104 @@ class ExternalAppHandler : public QObject | |||
153 | static ExternalAppHandler *instance(); | 153 | static ExternalAppHandler *instance(); |
154 | 154 | ||
155 | enum Types { | 155 | enum Types { |
156 | EMAIL = 0, | 156 | EMAIL = 0, |
157 | PHONE = 1, | 157 | PHONE = 1, |
158 | SMS = 2, | 158 | SMS = 2, |
159 | FAX = 3, | 159 | FAX = 3, |
160 | PAGER = 4 | 160 | PAGER = 4 |
161 | }; | 161 | }; |
162 | 162 | ||
163 | enum Availability { | 163 | enum Availability { |
164 | UNDEFINED = -1, | 164 | UNDEFINED = -1, |
165 | UNAVAILABLE = 0, | 165 | UNAVAILABLE = 0, |
166 | AVAILABLE = 1 | 166 | AVAILABLE = 1 |
167 | }; | 167 | }; |
168 | 168 | ||
169 | //calls the emailapplication with a number of attachments that need to be send. | 169 | //calls the emailapplication with a number of attachments that need to be send. |
170 | //either parameter can be left empty. | 170 | //either parameter can be left empty. |
171 | bool mailToMultipleContacts( const QString& recipients, const QString& attachmenturls ); | 171 | bool mailToMultipleContacts( const QString& recipients, const QString& attachmenturls ); |
172 | 172 | ||
173 | //calls the emailapplication and creates a mail with parameter emailadress as recipients | 173 | //calls the emailapplication and creates a mail with parameter emailadress as recipients |
174 | bool mailToOneContact( const QString& name, const QString& emailadress ); | 174 | bool mailToOneContact( const QString& name, const QString& emailadress ); |
175 | 175 | ||
176 | //calls the emailapplication and creates a mail with parameter as recipients | 176 | //calls the emailapplication and creates a mail with parameter as recipients |
177 | // parameters format is | 177 | // parameters format is |
178 | // NAME <EMAIL>:SUBJECT | 178 | // NAME <EMAIL>:SUBJECT |
179 | bool mailToOneContact( const QString& adressline ); | 179 | bool mailToOneContact( const QString& adressline ); |
180 | 180 | ||
181 | //calls the phoneapplication with the number | 181 | //calls the phoneapplication with the number |
182 | bool callByPhone( const QString& phonenumber ); | 182 | bool callByPhone( const QString& phonenumber ); |
183 | 183 | ||
184 | //calls the smsapplication with the number | 184 | //calls the smsapplication with the number |
185 | bool callBySMS( const QString& phonenumber ); | 185 | bool callBySMS( const QString& phonenumber ); |
186 | 186 | ||
187 | //calls the pagerapplication with the number | 187 | //calls the pagerapplication with the number |
188 | bool callByPager( const QString& pagernumber ); | 188 | bool callByPager( const QString& pagernumber ); |
189 | 189 | ||
190 | //calls the faxapplication with the number | 190 | //calls the faxapplication with the number |
191 | bool callByFax( const QString& faxnumber ); | 191 | bool callByFax( const QString& faxnumber ); |
192 | 192 | ||
193 | bool isEmailAppAvailable(); | 193 | bool isEmailAppAvailable(); |
194 | bool isSMSAppAvailable(); | 194 | bool isSMSAppAvailable(); |
195 | bool isPhoneAppAvailable(); | 195 | bool isPhoneAppAvailable(); |
196 | bool isFaxAppAvailable(); | 196 | bool isFaxAppAvailable(); |
197 | bool isPagerAppAvailable(); | 197 | bool isPagerAppAvailable(); |
198 | 198 | ||
199 | 199 | ||
200 | //Call this method on the source when you want to select names from the addressbook by using QCop | 200 | //Call this method on the source when you want to select names from the addressbook by using QCop |
201 | bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& uid); | 201 | bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); |
202 | //Call this method on the target when you want to return the name/email map to the source (client). | 202 | //Call this method on the target when you want to return the name/email map to the source (client). |
203 | bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& uid, const QStringList& name, const QStringList& email, const QStringList& uid); | 203 | bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); |
204 | 204 | ||
205 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& uid, const QString& email); | 205 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); |
206 | bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& uid, const QStringList& name, const QStringList& email, const QStringList& uid); | 206 | bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); |
207 | 207 | ||
208 | bool requestDetailsFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | 208 | bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); |
209 | 209 | ||
210 | 210 | ||
211 | //loadConfig clears the cache and checks again if the applications are available or not | 211 | //loadConfig clears the cache and checks again if the applications are available or not |
212 | void loadConfig(); | 212 | void loadConfig(); |
213 | 213 | ||
214 | QList<DefaultAppItem> getAvailableDefaultItems(Types); | 214 | QList<DefaultAppItem> getAvailableDefaultItems(Types); |
215 | DefaultAppItem* getDefaultItem(Types, int); | 215 | DefaultAppItem* getDefaultItem(Types, int); |
216 | 216 | ||
217 | public slots: | 217 | public slots: |
218 | void appMessage( const QCString& msg, const QByteArray& data ); | 218 | void appMessage( const QCString& msg, const QByteArray& data ); |
219 | 219 | ||
220 | 220 | ||
221 | signals: | 221 | signals: |
222 | // Emmitted when the target app receives a request from the source app | 222 | // Emmitted when the target app receives a request from the source app |
223 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); | 223 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); |
224 | 224 | ||
225 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi | 225 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi |
226 | // The first parameter is a uniqueid. It can be used to identify the event | 226 | // The first parameter is a uniqueid. It can be used to identify the event |
227 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); | 227 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); |
228 | 228 | ||
229 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); | 229 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); |
230 | void receivedFindBbyEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); | 230 | void receivedFindBbyEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); |
231 | 231 | ||
232 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | 232 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); |
233 | 233 | ||
234 | 234 | ||
235 | private: | 235 | private: |
236 | ExternalAppHandler(); | 236 | ExternalAppHandler(); |
237 | QList<DefaultAppItem> mDefaultItems; | 237 | QList<DefaultAppItem> mDefaultItems; |
238 | 238 | ||
239 | Availability mEmailAppAvailable; | 239 | Availability mEmailAppAvailable; |
240 | Availability mPhoneAppAvailable; | 240 | Availability mPhoneAppAvailable; |
241 | Availability mFaxAppAvailable; | 241 | Availability mFaxAppAvailable; |
242 | Availability mSMSAppAvailable; | 242 | Availability mSMSAppAvailable; |
243 | Availability mPagerAppAvailable; | 243 | Availability mPagerAppAvailable; |
244 | 244 | ||
245 | QCopListTransferItem* mNameEmailUidListFromKAPITransfer; | 245 | QCopListTransferItem* mNameEmailUidListFromKAPITransfer; |
246 | QCopListTransferItem* mFindByEmailFromKAPITransfer; | 246 | QCopListTransferItem* mFindByEmailFromKAPITransfer; |
247 | QCopTransferItem* mDisplayDetails; | 247 | QCopTransferItem* mDisplayDetails; |
248 | 248 | ||
249 | 249 | ||
250 | void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2); | 250 | void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2); |
251 | 251 | ||
252 | QString& translateMessage(QString& message, const QString& param1, const QString& param2) const; | 252 | QString& translateMessage(QString& message, const QString& param1, const QString& param2) const; |
253 | void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const; | 253 | void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const; |
254 | 254 | ||
255 | 255 | ||
256 | static ExternalAppHandler *sInstance; | 256 | static ExternalAppHandler *sInstance; |