summaryrefslogtreecommitdiffabout
path: root/libkdepim/externalapphandler.h
Unidiff
Diffstat (limited to 'libkdepim/externalapphandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index 3ecf1b1..efcdd89 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -70,16 +70,22 @@ class ExternalAppHandler
70 enum Types { 70 enum Types {
71 EMAIL = 0, 71 EMAIL = 0,
72 PHONE = 1, 72 PHONE = 1,
73 SMS = 2, 73 SMS = 2,
74 FAX = 3, 74 FAX = 3,
75 PAGER = 4 75 PAGER = 4
76 }; 76 };
77 77
78 enum Availability {
79 UNDEFINED = -1,
80 UNAVAILABLE = 0,
81 AVAILABLE = 1
82 };
83
78 //calls the emailapplication with a number of attachments that need to be send 84 //calls the emailapplication with a number of attachments that need to be send
79 bool mailAttachments( const QString& urls ); 85 bool mailAttachments( const QString& urls );
80 86
81 //calls the emailapplication and creates a mail with parameter emails as recipients 87 //calls the emailapplication and creates a mail with parameter emails as recipients
82 bool mailToContacts( const QString& emails ); 88 bool mailToContacts( const QString& emails );
83 89
84 //calls the phoneapplication with the number 90 //calls the phoneapplication with the number
85 bool callByPhone( const QString& phonenumber ); 91 bool callByPhone( const QString& phonenumber );
@@ -88,28 +94,41 @@ class ExternalAppHandler
88 bool callBySMS( const QString& phonenumber ); 94 bool callBySMS( const QString& phonenumber );
89 95
90 //calls the pagerapplication with the number 96 //calls the pagerapplication with the number
91 bool callByPager( const QString& pagernumber ); 97 bool callByPager( const QString& pagernumber );
92 98
93 //calls the faxapplication with the number 99 //calls the faxapplication with the number
94 bool callByFax( const QString& faxnumber ); 100 bool callByFax( const QString& faxnumber );
95 101
102 bool isEmailAppAvailable();
103 bool isSMSAppAvailable();
104 bool isPhoneAppAvailable();
105 bool isFaxAppAvailable();
106 bool isPagerAppAvailable();
107
108
96 109
97 //loadConfig clears the cache and checks again if the applications are available or not 110 //loadConfig clears the cache and checks again if the applications are available or not
98 void loadConfig(); 111 void loadConfig();
99 112
100 QList<DefaultAppItem> getAvailableDefaultItems(Types); 113 QList<DefaultAppItem> getAvailableDefaultItems(Types);
101 DefaultAppItem* getDefaultItem(Types, int); 114 DefaultAppItem* getDefaultItem(Types, int);
102 115
103 116
104 private: 117 private:
105 ExternalAppHandler(); 118 ExternalAppHandler();
106 QList<DefaultAppItem> mDefaultItems; 119 QList<DefaultAppItem> mDefaultItems;
107 120
121 Availability mEmailAppAvailable;
122 Availability mPhoneAppAvailable;
123 Availability mFaxAppAvailable;
124 Availability mSMSAppAvailable;
125 Availability mPagerAppAvailable;
126
108 127
109 void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2); 128 void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2);
110 129
111 QString& translateMessage(QString& message, const QString& emails) const; 130 QString& translateMessage(QString& message, const QString& emails) const;
112 void passParameter(QCopEnvelope* e, const QString& parameters, const QString& param1) const; 131 void passParameter(QCopEnvelope* e, const QString& parameters, const QString& param1) const;
113 132
114 133
115 static ExternalAppHandler *sInstance; 134 static ExternalAppHandler *sInstance;