Go to the documentation of this file.00001 #ifndef SERVICEHANDLERIF_H
00002 #define SERVICEHANDLERIF_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <QtCore/QtPlugin>
00026 #include <Qt/qicon.h>
00027
00028 #include "notebook.h"
00029
00030 class QString;
00031
00051 class ServiceInterface {
00052
00053 public:
00054
00056
00057
00058 enum ErrorCode {
00059 ErrorOk = 0,
00060 ErrorNoAccount,
00061 ErrorNotSupported,
00062 ErrorNoConnectivity,
00063 ErrorInvalidParameters,
00064 ErrorInternal
00065 };
00066
00070 virtual QString icon() const = 0;
00071
00072
00076 virtual QString uiName() const = 0;
00077
00082 virtual bool multiCalendar() const = 0;
00083
00089 virtual QString emailAddress(const mKCal::Notebook::Ptr ¬ebook) = 0;
00090
00095 virtual QString displayName(const mKCal::Notebook::Ptr ¬ebook) const = 0;
00096
00115 virtual bool downloadAttachment(const mKCal::Notebook::Ptr ¬ebook, const QString &uri, const QString &path) = 0;
00116
00123 virtual bool deleteAttachment(const mKCal::Notebook::Ptr ¬ebook, const KCalCore::Incidence::Ptr &incidence, const QString &uri) = 0;
00124
00130 virtual bool shareNotebook(const mKCal::Notebook::Ptr ¬ebook, const QStringList &sharedWith) = 0;
00131
00136 virtual QStringList sharedWith(const mKCal::Notebook::Ptr ¬ebook) = 0;
00137
00143 virtual QString serviceName() const = 0;
00144
00151 virtual QString defaultNotebook() const = 0;
00152
00162 virtual bool checkProductId(const QString &prodId) const = 0;
00168 virtual bool responseClaimed(const QString &accountId, const KCalCore::Incidence::Ptr &response) {
00169 Q_UNUSED(accountId);
00170 Q_UNUSED(response);
00171 return true;
00172 }
00173
00179 virtual ErrorCode error() const = 0;
00180
00181 virtual ~ServiceInterface() { }
00182 };
00183
00184 Q_DECLARE_INTERFACE(ServiceInterface,
00185 "com.nokia.Organiser.ServiceInterface/1.0")
00186
00187 #endif // SERVICEHANDLERIF_H