author | ulf69 <ulf69> | 2004-10-07 01:04:18 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-10-07 01:04:18 (UTC) |
commit | 0406c1ac252f2fa631f7a486e73b0a97d09874f9 (patch) (unidiff) | |
tree | 72de99490603b5913a39a101ef571ba74acd6798 /libkdepim/externalapphandler.h | |
parent | 0afcfa29ace7bc5e42a11fae44301e1e8230a376 (diff) | |
download | kdepimpi-0406c1ac252f2fa631f7a486e73b0a97d09874f9.zip kdepimpi-0406c1ac252f2fa631f7a486e73b0a97d09874f9.tar.gz kdepimpi-0406c1ac252f2fa631f7a486e73b0a97d09874f9.tar.bz2 |
added functionality for Birthdaylookup from kopi via qCop
Diffstat (limited to 'libkdepim/externalapphandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/externalapphandler.h | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h index cfe577b..4c6f1ea 100644 --- a/libkdepim/externalapphandler.h +++ b/libkdepim/externalapphandler.h | |||
@@ -50,25 +50,24 @@ class QCopTransferItem : public QObject | |||
50 | 50 | ||
51 | void setSourceChannel(const QString& sourceChannel); | 51 | void setSourceChannel(const QString& sourceChannel); |
52 | 52 | ||
53 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); | 53 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); |
54 | 54 | ||
55 | 55 | ||
56 | signals: | 56 | signals: |
57 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid); | 57 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid); |
58 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1); | 58 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1); |
59 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2); | 59 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2); |
60 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2, const QString& param3); | 60 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2, const QString& param3); |
61 | 61 | ||
62 | |||
63 | public: | 62 | public: |
64 | int _usedSourceParameters; | 63 | int _usedSourceParameters; |
65 | QString _sourceChannel; | 64 | QString _sourceChannel; |
66 | QString _sourceMessage; | 65 | QString _sourceMessage; |
67 | QString _sourceMessageParameters; | 66 | QString _sourceMessageParameters; |
68 | QString _targetChannel; | 67 | QString _targetChannel; |
69 | QString _targetMessage; | 68 | QString _targetMessage; |
70 | QString _targetMessageParameters; | 69 | QString _targetMessageParameters; |
71 | 70 | ||
72 | }; | 71 | }; |
73 | 72 | ||
74 | /********************************************************************************* | 73 | /********************************************************************************* |
@@ -93,32 +92,32 @@ class QCopMapTransferItem : public QCopTransferItem | |||
93 | }; | 92 | }; |
94 | 93 | ||
95 | /********************************************************************************* | 94 | /********************************************************************************* |
96 | * | 95 | * |
97 | ********************************************************************************/ | 96 | ********************************************************************************/ |
98 | 97 | ||
99 | class QCopListTransferItem : public QCopTransferItem | 98 | class QCopListTransferItem : public QCopTransferItem |
100 | { | 99 | { |
101 | Q_OBJECT | 100 | Q_OBJECT |
102 | public: | 101 | public: |
103 | QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); | 102 | QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); |
104 | 103 | ||
105 | bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3); | 104 | bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6); |
106 | 105 | ||
107 | 106 | ||
108 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); | 107 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); |
109 | 108 | ||
110 | 109 | ||
111 | signals: | 110 | signals: |
112 | void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3); | 111 | void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6); |
113 | 112 | ||
114 | }; | 113 | }; |
115 | 114 | ||
116 | /********************************************************************************* | 115 | /********************************************************************************* |
117 | * | 116 | * |
118 | ********************************************************************************/ | 117 | ********************************************************************************/ |
119 | 118 | ||
120 | 119 | ||
121 | class DefaultAppItem | 120 | class DefaultAppItem |
122 | { | 121 | { |
123 | public: | 122 | public: |
124 | DefaultAppItem(int type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2) | 123 | DefaultAppItem(int type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2) |
@@ -198,70 +197,95 @@ class ExternalAppHandler : public QObject | |||
198 | bool isSMSAppAvailable(); | 197 | bool isSMSAppAvailable(); |
199 | bool isPhoneAppAvailable(); | 198 | bool isPhoneAppAvailable(); |
200 | bool isFaxAppAvailable(); | 199 | bool isFaxAppAvailable(); |
201 | bool isPagerAppAvailable(); | 200 | bool isPagerAppAvailable(); |
202 | bool isSIPAppAvailable(); | 201 | bool isSIPAppAvailable(); |
203 | 202 | ||
204 | 203 | ||
205 | //Call this method on the source when you want to select names from the addressbook by using QCop | 204 | //Call this method on the source when you want to select names from the addressbook by using QCop |
206 | bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); | 205 | bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); |
207 | //Call this method on the target when you want to return the name/email map to the source (client). | 206 | //Call this method on the target when you want to return the name/email map to the source (client). |
208 | bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); | 207 | bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); |
209 | 208 | ||
209 | |||
210 | |||
210 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); | 211 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); |
211 | bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); | 212 | bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); |
212 | 213 | ||
213 | bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); | 214 | bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); |
214 | 215 | ||
215 | 216 | ||
217 | |||
218 | bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid); | ||
219 | bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, | ||
220 | const QStringList& birthdayList, const QStringList& anniversaryList, | ||
221 | const QStringList& realNameList, const QStringList& emailList, | ||
222 | const QStringList& assembledNameList, const QStringList& uidList); | ||
223 | |||
224 | |||
216 | //loadConfig clears the cache and checks again if the applications are available or not | 225 | //loadConfig clears the cache and checks again if the applications are available or not |
217 | void loadConfig(); | 226 | void loadConfig(); |
218 | 227 | ||
219 | QList<DefaultAppItem> getAvailableDefaultItems(Types); | 228 | QList<DefaultAppItem> getAvailableDefaultItems(Types); |
220 | DefaultAppItem* getDefaultItem(Types, int); | 229 | DefaultAppItem* getDefaultItem(Types, int); |
221 | 230 | ||
222 | public slots: | 231 | public slots: |
223 | void appMessage( const QCString& msg, const QByteArray& data ); | 232 | void appMessage( const QCString& msg, const QByteArray& data ); |
224 | 233 | ||
225 | 234 | ||
226 | signals: | 235 | signals: |
227 | // Emmitted when the target app receives a request from the source app | 236 | // Emmitted when the target app receives a request from the source app |
228 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); | 237 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); |
229 | 238 | ||
230 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi | 239 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi |
231 | // The first parameter is a uniqueid. It can be used to identify the event | 240 | // The first parameter is a uniqueid. It can be used to identify the event |
232 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); | 241 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); |
233 | 242 | ||
234 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); | 243 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); |
235 | void receivedFindBbyEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); | 244 | void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); |
236 | 245 | ||
237 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | 246 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); |
238 | 247 | ||
239 | 248 | ||
249 | // Emmitted when the target app receives a request from the source app | ||
250 | void requestForBirthdayList(const QString& sourceChannel, const QString& uid); | ||
251 | |||
252 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi | ||
253 | // The first parameter is a uniqueid. It can be used to identify the event | ||
254 | void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList, | ||
255 | const QStringList& anniversaryList, const QStringList& realNameList, | ||
256 | const QStringList& emailList, const QStringList& assembledNameList, | ||
257 | const QStringList& uidList); | ||
258 | |||
259 | |||
240 | private: | 260 | private: |
241 | ExternalAppHandler(); | 261 | ExternalAppHandler(); |
242 | QList<DefaultAppItem> mDefaultItems; | 262 | QList<DefaultAppItem> mDefaultItems; |
243 | 263 | ||
244 | Availability mEmailAppAvailable; | 264 | Availability mEmailAppAvailable; |
245 | Availability mPhoneAppAvailable; | 265 | Availability mPhoneAppAvailable; |
246 | Availability mFaxAppAvailable; | 266 | Availability mFaxAppAvailable; |
247 | Availability mSMSAppAvailable; | 267 | Availability mSMSAppAvailable; |
248 | Availability mPagerAppAvailable; | 268 | Availability mPagerAppAvailable; |
249 | Availability mSIPAppAvailable; | 269 | Availability mSIPAppAvailable; |
250 | 270 | ||
251 | QCopListTransferItem* mNameEmailUidListFromKAPITransfer; | 271 | QCopListTransferItem* mNameEmailUidListFromKAPITransfer; |
252 | QCopListTransferItem* mFindByEmailFromKAPITransfer; | 272 | QCopListTransferItem* mFindByEmailFromKAPITransfer; |
253 | QCopTransferItem* mDisplayDetails; | 273 | QCopTransferItem* mDisplayDetails; |
274 | QCopListTransferItem* mBirthdayListFromKAPITransfer; | ||
254 | 275 | ||
255 | 276 | ||
256 | void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2); | 277 | void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2); |
257 | 278 | ||
258 | QString& translateMessage(QString& message, const QString& param1, const QString& param2) const; | 279 | QString& translateMessage(QString& message, const QString& param1, const QString& param2) const; |
259 | void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const; | 280 | void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const; |
260 | 281 | ||
261 | 282 | ||
262 | static ExternalAppHandler *sInstance; | 283 | static ExternalAppHandler *sInstance; |
263 | 284 | ||
285 | private slots: | ||
286 | void receivedNameEmailUidList_Slot(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList, const QStringList&, const QStringList&, const QStringList& ); | ||
287 | |||
264 | }; | 288 | }; |
265 | 289 | ||
266 | 290 | ||
267 | #endif | 291 | #endif |