summaryrefslogtreecommitdiffabout
path: root/libkdepim/externalapphandler.h
authorulf69 <ulf69>2004-08-17 00:09:26 (UTC)
committer ulf69 <ulf69>2004-08-17 00:09:26 (UTC)
commitab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb (patch) (unidiff)
treea9f62469297dda2981807b5235e7812cac72f44c /libkdepim/externalapphandler.h
parent0e46d151bca931ff5c69a637d91cfcc381094e0b (diff)
downloadkdepimpi-ab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb.zip
kdepimpi-ab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb.tar.gz
kdepimpi-ab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb.tar.bz2
QCop implementation for KOrganizer to access Ka/pi directly
Diffstat (limited to 'libkdepim/externalapphandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.h111
1 files changed, 109 insertions, 2 deletions
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index 3cf9e06..7c8de4e 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -33,3 +33,5 @@ $Id$
33 33
34#include <qobject.h>
34#include <qlist.h> 35#include <qlist.h>
36#include <qmap.h>
35 37
@@ -39,2 +41,76 @@ class QCopEnvelope;
39class ExternalAppHandler; 41class ExternalAppHandler;
42class QCopTransferItem : public QObject
43{
44 Q_OBJECT
45 public:
46 QCopTransferItem(const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
47 QCopTransferItem();
48
49 bool sendMessageToTarget(const QString& uid, const QString& param1);
50
51 void setSourceChannel(const QString& sourceChannel);
52
53 virtual bool appMessage( const QCString& msg, const QByteArray& data );
54
55
56 signals:
57 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1);
58
59
60 public:
61 QString _sourceChannel;
62 QString _sourceMessage;
63 QString _sourceMessageParameters;
64 QString _targetChannel;
65 QString _targetMessage;
66 QString _targetMessageParameters;
67
68};
69
70/*********************************************************************************
71 *
72 ********************************************************************************/
73
74class QCopMapTransferItem : public QCopTransferItem
75{
76 Q_OBJECT
77 public:
78 QCopMapTransferItem(const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
79
80 bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap);
81
82
83 virtual bool appMessage( const QCString& msg, const QByteArray& data );
84
85
86 signals:
87 void receivedMessageFromTarget(const QString& uid, const QMap<QString,QString>& nameEmailMap);
88
89};
90
91/*********************************************************************************
92 *
93 ********************************************************************************/
94
95class QCopListTransferItem : public QCopTransferItem
96{
97 Q_OBJECT
98 public:
99 QCopListTransferItem(const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
100
101 bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3);
102
103
104 virtual bool appMessage( const QCString& msg, const QByteArray& data );
105
106
107 signals:
108 void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3);
109
110};
111
112/*********************************************************************************
113 *
114 ********************************************************************************/
115
40 116
@@ -62,4 +138,9 @@ class DefaultAppItem
62 138
63class ExternalAppHandler 139/*********************************************************************************
140 *
141 ********************************************************************************/
142
143class ExternalAppHandler : public QObject
64{ 144{
145 Q_OBJECT
65 public: 146 public:
@@ -114,2 +195,10 @@ class ExternalAppHandler
114 195
196 //Call this method on the source when you want to select names from the addressbook by using QCop
197 bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& uid);
198 //Call this method on the target when you want to return the name/email map to the source (client).
199 bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& uid, const QStringList& name, const QStringList& email, const QStringList& uid);
200
201 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);
203
115 204
@@ -121,2 +210,17 @@ class ExternalAppHandler
121 210
211 public slots:
212 void appMessage( const QCString& msg, const QByteArray& data );
213
214
215 signals:
216 // Emmitted when the target app receives a request from the source app
217 void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid, const QString& param1);
218
219 // 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
221 void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList);
222
223 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);
225
122 226
@@ -132,2 +236,5 @@ class ExternalAppHandler
132 236
237 QCopListTransferItem* mNameEmailUidListFromKAPITransfer;
238 QCopListTransferItem* mFindByEmailFromKAPITransfer;
239
133 240
@@ -141,5 +248,5 @@ class ExternalAppHandler
141 248
142
143}; 249};
144 250
251
145#endif 252#endif