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 @@ -105,157 +105,157 @@ class QCopListTransferItem : public QCopTransferItem bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3); virtual bool appMessage( const QCString& msg, const QByteArray& data ); signals: void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3); }; /********************************************************************************* * ********************************************************************************/ class DefaultAppItem { public: DefaultAppItem(int type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2) : _type(type), _id(id), _label(label), _channel(channel), _message(message), _parameters(parameters), _message2(message2), _parameters2(parameters2) { } DefaultAppItem() { } public: int _type; int _id; QString _label; QString _channel; QString _message; QString _parameters; // a list of parameters in stringrepresentation. Delimiter is ; QString _message2; QString _parameters2; // a list of parameters in stringrepresentation. Delimiter is ; }; /********************************************************************************* * ********************************************************************************/ class ExternalAppHandler : public QObject { Q_OBJECT public: virtual ~ExternalAppHandler(); static ExternalAppHandler *instance(); enum Types { EMAIL = 0, PHONE = 1, SMS = 2, FAX = 3, PAGER = 4 }; enum Availability { UNDEFINED = -1, UNAVAILABLE = 0, AVAILABLE = 1 }; //calls the emailapplication with a number of attachments that need to be send. //either parameter can be left empty. bool mailToMultipleContacts( const QString& recipients, const QString& attachmenturls ); //calls the emailapplication and creates a mail with parameter emailadress as recipients bool mailToOneContact( const QString& name, const QString& emailadress ); //calls the emailapplication and creates a mail with parameter as recipients // parameters format is // NAME <EMAIL>:SUBJECT bool mailToOneContact( const QString& adressline ); //calls the phoneapplication with the number bool callByPhone( const QString& phonenumber ); //calls the smsapplication with the number bool callBySMS( const QString& phonenumber ); //calls the pagerapplication with the number bool callByPager( const QString& pagernumber ); //calls the faxapplication with the number bool callByFax( const QString& faxnumber ); bool isEmailAppAvailable(); bool isSMSAppAvailable(); bool isPhoneAppAvailable(); bool isFaxAppAvailable(); bool isPagerAppAvailable(); //Call this method on the source when you want to select names from the addressbook by using QCop - bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& uid); + bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); //Call this method on the target when you want to return the name/email map to the source (client). - bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& uid, const QStringList& name, const QStringList& email, const QStringList& uid); + bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); - bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& uid, const QString& email); - bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& uid, const QStringList& name, const QStringList& email, const QStringList& uid); + bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); + bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); - bool requestDetailsFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); + bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); //loadConfig clears the cache and checks again if the applications are available or not void loadConfig(); QList<DefaultAppItem> getAvailableDefaultItems(Types); DefaultAppItem* getDefaultItem(Types, int); public slots: void appMessage( const QCString& msg, const QByteArray& data ); signals: // Emmitted when the target app receives a request from the source app void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi // The first parameter is a uniqueid. It can be used to identify the event void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); void receivedFindBbyEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); private: ExternalAppHandler(); QList<DefaultAppItem> mDefaultItems; Availability mEmailAppAvailable; Availability mPhoneAppAvailable; Availability mFaxAppAvailable; Availability mSMSAppAvailable; Availability mPagerAppAvailable; QCopListTransferItem* mNameEmailUidListFromKAPITransfer; QCopListTransferItem* mFindByEmailFromKAPITransfer; QCopTransferItem* mDisplayDetails; void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2); QString& translateMessage(QString& message, const QString& param1, const QString& param2) const; void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const; static ExternalAppHandler *sInstance; }; #endif |