summaryrefslogtreecommitdiffabout
path: root/libkdepim/externalapphandler.h
Unidiff
Diffstat (limited to 'libkdepim/externalapphandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index 6f5d345..52a64e1 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -140,152 +140,153 @@ class DefaultAppItem
140}; 140};
141 141
142/********************************************************************************* 142/*********************************************************************************
143 * 143 *
144 ********************************************************************************/ 144 ********************************************************************************/
145 145
146class ExternalAppHandler : public QObject 146class ExternalAppHandler : public QObject
147{ 147{
148 Q_OBJECT 148 Q_OBJECT
149 public: 149 public:
150 virtual ~ExternalAppHandler(); 150 virtual ~ExternalAppHandler();
151 151
152 static ExternalAppHandler *instance(); 152 static ExternalAppHandler *instance();
153 153
154 enum Types { 154 enum Types {
155 EMAIL = 0, 155 EMAIL = 0,
156 PHONE = 1, 156 PHONE = 1,
157 SMS = 2, 157 SMS = 2,
158 FAX = 3, 158 FAX = 3,
159 PAGER = 4, 159 PAGER = 4,
160 SIP = 5 160 SIP = 5
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 //calls the sipapplication with the number 193 //calls the sipapplication with the number
194 bool callBySIP( const QString& sipnumber ); 194 bool callBySIP( const QString& sipnumber );
195 195
196 bool isEmailAppAvailable(); 196 bool isEmailAppAvailable();
197 bool isSMSAppAvailable(); 197 bool isSMSAppAvailable();
198 bool isPhoneAppAvailable(); 198 bool isPhoneAppAvailable();
199 bool isFaxAppAvailable(); 199 bool isFaxAppAvailable();
200 bool isPagerAppAvailable(); 200 bool isPagerAppAvailable();
201 bool isSIPAppAvailable(); 201 bool isSIPAppAvailable();
202 202
203 203
204 //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
205 bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); 205 bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid);
206 //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).
207 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);
208 208
209 209
210 210
211 bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); 211 bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email);
212 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);
213 213
214 bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); 214 bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid);
215 215
216 216
217 217
218 bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid); 218 bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid);
219 bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, 219 bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid,
220 const QStringList& birthdayList, const QStringList& anniversaryList, 220 const QStringList& birthdayList, const QStringList& anniversaryList,
221 const QStringList& realNameList, const QStringList& emailList, 221 const QStringList& realNameList, const QStringList& emailList,
222 const QStringList& assembledNameList, const QStringList& uidList); 222 const QStringList& assembledNameList, const QStringList& uidList);
223 223
224 224
225 //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
226 void loadConfig(); 226 void loadConfig();
227 227
228 QList<DefaultAppItem> getAvailableDefaultItems(Types); 228 QList<DefaultAppItem> getAvailableDefaultItems(Types);
229 DefaultAppItem* getDefaultItem(Types, int); 229 DefaultAppItem* getDefaultItem(Types, int);
230 230
231 public slots: 231 public slots:
232 void appMessage( const QCString& msg, const QByteArray& data ); 232 void appMessage( const QCString& msg, const QByteArray& data );
233 233
234 234
235 signals: 235 signals:
236 void nextView();
236 // Emmitted when the target app receives a request from the source app 237 // Emmitted when the target app receives a request from the source app
237 void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); 238 void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid);
238 239
239 // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi 240 // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi
240 // The first parameter is a uniqueid. It can be used to identify the event 241 // The first parameter is a uniqueid. It can be used to identify the event
241 void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); 242 void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList);
242 243
243 void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); 244 void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email);
244 void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); 245 void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList);
245 246
246 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); 247 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
247 248
248 249
249 // Emmitted when the target app receives a request from the source app 250 // Emmitted when the target app receives a request from the source app
250 void requestForBirthdayList(const QString& sourceChannel, const QString& uid); 251 void requestForBirthdayList(const QString& sourceChannel, const QString& uid);
251 252
252 // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi 253 // 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 // The first parameter is a uniqueid. It can be used to identify the event
254 void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList, 255 void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList,
255 const QStringList& anniversaryList, const QStringList& realNameList, 256 const QStringList& anniversaryList, const QStringList& realNameList,
256 const QStringList& emailList, const QStringList& assembledNameList, 257 const QStringList& emailList, const QStringList& assembledNameList,
257 const QStringList& uidList); 258 const QStringList& uidList);
258 259
259 260
260 private: 261 private:
261 ExternalAppHandler(); 262 ExternalAppHandler();
262 QList<DefaultAppItem> mDefaultItems; 263 QList<DefaultAppItem> mDefaultItems;
263 264
264 Availability mEmailAppAvailable; 265 Availability mEmailAppAvailable;
265 Availability mPhoneAppAvailable; 266 Availability mPhoneAppAvailable;
266 Availability mFaxAppAvailable; 267 Availability mFaxAppAvailable;
267 Availability mSMSAppAvailable; 268 Availability mSMSAppAvailable;
268 Availability mPagerAppAvailable; 269 Availability mPagerAppAvailable;
269 Availability mSIPAppAvailable; 270 Availability mSIPAppAvailable;
270 271
271 QCopListTransferItem* mNameEmailUidListFromKAPITransfer; 272 QCopListTransferItem* mNameEmailUidListFromKAPITransfer;
272 QCopListTransferItem* mFindByEmailFromKAPITransfer; 273 QCopListTransferItem* mFindByEmailFromKAPITransfer;
273 QCopTransferItem* mDisplayDetails; 274 QCopTransferItem* mDisplayDetails;
274 QCopListTransferItem* mBirthdayListFromKAPITransfer; 275 QCopListTransferItem* mBirthdayListFromKAPITransfer;
275 276
276 277
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); 278 void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2);
278 279
279 QString& translateMessage(QString& message, const QString& param1, const QString& param2) const; 280 QString& translateMessage(QString& message, const QString& param1, const QString& param2) const;
280 void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const; 281 void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const;
281 282
282 283
283 static ExternalAppHandler *sInstance; 284 static ExternalAppHandler *sInstance;
284 285
285 private slots: 286 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 void receivedNameEmailUidList_Slot(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList, const QStringList&, const QStringList&, const QStringList& );
287 288
288}; 289};
289 290
290 291
291#endif 292#endif