Diffstat (limited to 'libkdepim/externalapphandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/externalapphandler.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h index 7c8de4e..a74080f 100644 --- a/libkdepim/externalapphandler.h +++ b/libkdepim/externalapphandler.h | |||
@@ -42,23 +42,27 @@ class ExternalAppHandler; | |||
42 | class QCopTransferItem : public QObject | 42 | class QCopTransferItem : public QObject |
43 | { | 43 | { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | public: | 45 | public: |
46 | QCopTransferItem(const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); | 46 | QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); |
47 | QCopTransferItem(); | 47 | QCopTransferItem(); |
48 | 48 | ||
49 | bool sendMessageToTarget(const QString& uid, const QString& param1); | 49 | bool sendMessageToTarget(const QString& uid, const QString& param1 = QString::null, const QString& param2 = QString::null, const QString& param3 = QString::null); |
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, 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); | ||
60 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2, const QString& param3); | ||
58 | 61 | ||
59 | 62 | ||
60 | public: | 63 | public: |
64 | int _usedSourceParameters; | ||
61 | QString _sourceChannel; | 65 | QString _sourceChannel; |
62 | QString _sourceMessage; | 66 | QString _sourceMessage; |
63 | QString _sourceMessageParameters; | 67 | QString _sourceMessageParameters; |
64 | QString _targetChannel; | 68 | QString _targetChannel; |
@@ -74,9 +78,9 @@ class QCopTransferItem : public QObject | |||
74 | class QCopMapTransferItem : public QCopTransferItem | 78 | class QCopMapTransferItem : public QCopTransferItem |
75 | { | 79 | { |
76 | Q_OBJECT | 80 | Q_OBJECT |
77 | public: | 81 | public: |
78 | QCopMapTransferItem(const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); | 82 | QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); |
79 | 83 | ||
80 | bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap); | 84 | bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap); |
81 | 85 | ||
82 | 86 | ||
@@ -95,9 +99,9 @@ class QCopMapTransferItem : public QCopTransferItem | |||
95 | class QCopListTransferItem : public QCopTransferItem | 99 | class QCopListTransferItem : public QCopTransferItem |
96 | { | 100 | { |
97 | Q_OBJECT | 101 | Q_OBJECT |
98 | public: | 102 | public: |
99 | QCopListTransferItem(const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); | 103 | QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); |
100 | 104 | ||
101 | bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3); | 105 | bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3); |
102 | 106 | ||
103 | 107 | ||
@@ -200,8 +204,10 @@ class ExternalAppHandler : public QObject | |||
200 | 204 | ||
201 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& uid, const QString& email); | 205 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& uid, const QString& email); |
202 | 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& uid, const QStringList& name, const QStringList& email, const QStringList& uid); |
203 | 207 | ||
208 | bool requestDetailsFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | ||
209 | |||
204 | 210 | ||
205 | //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 |
206 | void loadConfig(); | 212 | void loadConfig(); |
207 | 213 | ||
@@ -213,17 +219,19 @@ class ExternalAppHandler : public QObject | |||
213 | 219 | ||
214 | 220 | ||
215 | signals: | 221 | signals: |
216 | // 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 |
217 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid, const QString& param1); | 223 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); |
218 | 224 | ||
219 | // 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 |
220 | // 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 |
221 | 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); |
222 | 228 | ||
223 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); | 229 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); |
224 | 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); |
225 | 231 | ||
232 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | ||
233 | |||
226 | 234 | ||
227 | private: | 235 | private: |
228 | ExternalAppHandler(); | 236 | ExternalAppHandler(); |
229 | QList<DefaultAppItem> mDefaultItems; | 237 | QList<DefaultAppItem> mDefaultItems; |
@@ -235,8 +243,9 @@ class ExternalAppHandler : public QObject | |||
235 | Availability mPagerAppAvailable; | 243 | Availability mPagerAppAvailable; |
236 | 244 | ||
237 | QCopListTransferItem* mNameEmailUidListFromKAPITransfer; | 245 | QCopListTransferItem* mNameEmailUidListFromKAPITransfer; |
238 | QCopListTransferItem* mFindByEmailFromKAPITransfer; | 246 | QCopListTransferItem* mFindByEmailFromKAPITransfer; |
247 | QCopTransferItem* mDisplayDetails; | ||
239 | 248 | ||
240 | 249 | ||
241 | 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); |
242 | 251 | ||