servicehandlerif.h
Go to the documentation of this file.
1#ifndef SERVICEHANDLERIF_H
2#define SERVICEHANDLERIF_H
3/*
4 This file is part of the kcal library.
5
6 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
7 Contact: Alvaro Manera <alvaro.manera@nokia.com>
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public
11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with this library; see the file COPYING.LIB. If not, write to
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA.
23*/
24
25#include <QtCore/QtPlugin>
26
27#include "notebook.h"
28
29class QString;
30
51{
52
53public:
54
56 //Be aware that they are different to the ones in ServiceHandler
57 //but they might need to be in sync
58 enum ErrorCode {
65 };
66
70 virtual QString icon() const = 0;
71
72
76 virtual QString uiName() const = 0;
77
82 virtual bool multiCalendar() const = 0;
83
89 virtual QString emailAddress(const mKCal::Notebook::Ptr &notebook) = 0;
90
95 virtual QString displayName(const mKCal::Notebook::Ptr &notebook) const = 0;
96
115 virtual bool downloadAttachment(const mKCal::Notebook::Ptr &notebook, const QString &uri, const QString &path) = 0;
116
123 virtual bool deleteAttachment(const mKCal::Notebook::Ptr &notebook, const KCalendarCore::Incidence::Ptr &incidence,
124 const QString &uri) = 0;
125
131 virtual bool shareNotebook(const mKCal::Notebook::Ptr &notebook, const QStringList &sharedWith) = 0;
132
137 virtual QStringList sharedWith(const mKCal::Notebook::Ptr &notebook) = 0;
138
144 virtual QString serviceName() const = 0;
145
152 virtual QString defaultNotebook() const = 0;
153
163 virtual bool checkProductId(const QString &prodId) const = 0;
164
170 virtual ErrorCode error() const = 0;
171
172 virtual ~ServiceInterface() { }
173};
174
175Q_DECLARE_INTERFACE(ServiceInterface,
176 "com.nokia.Organiser.ServiceInterface/1.0")
177
178#endif // SERVICEHANDLERIF_H
Interface implemented by plugins for handling services.
Definition: servicehandlerif.h:51
virtual ErrorCode error() const =0
In case of error, more detailed information can be provided Sometimes the true/false is not enough,...
virtual QString icon() const =0
returns icon of service.
ErrorCode
Error Codes that can be returned by the plugins.
Definition: servicehandlerif.h:58
@ ErrorInvalidParameters
Definition: servicehandlerif.h:63
@ ErrorInternal
Definition: servicehandlerif.h:64
@ ErrorNoAccount
Definition: servicehandlerif.h:60
@ ErrorNoConnectivity
Definition: servicehandlerif.h:62
@ ErrorOk
Definition: servicehandlerif.h:59
@ ErrorNotSupported
Definition: servicehandlerif.h:61
virtual bool multiCalendar() const =0
is this service supporting multiple calendars.
virtual bool shareNotebook(const mKCal::Notebook::Ptr &notebook, const QStringList &sharedWith)=0
Share notebook.
virtual QString displayName(const mKCal::Notebook::Ptr &notebook) const =0
returns the display name of account of service.
virtual QString defaultNotebook() const =0
A service might have a default Notebook in the set of notebooks supported It can be a null value.
virtual QString serviceName() const =0
The name of this service.
virtual bool deleteAttachment(const mKCal::Notebook::Ptr &notebook, const KCalendarCore::Incidence::Ptr &incidence, const QString &uri)=0
start the deletion of an attachment.
virtual QStringList sharedWith(const mKCal::Notebook::Ptr &notebook)=0
Returns list of emails, phones# of the persons that a notebook is shared with.
virtual QString uiName() const =0
returns name of service.
virtual bool checkProductId(const QString &prodId) const =0
Checks if a give Product Id obtained in an iCal file is handled by this plugin.
virtual bool downloadAttachment(const mKCal::Notebook::Ptr &notebook, const QString &uri, const QString &path)=0
Start the download of an attachment.
virtual QString emailAddress(const mKCal::Notebook::Ptr &notebook)=0
returns the email address that is currently configured in the service, it can be different per accoun...
virtual ~ServiceInterface()
Definition: servicehandlerif.h:172
QSharedPointer< Notebook > Ptr
A shared pointer to a Notebook object.
Definition: notebook.h:51
This file is part of the API for handling calendar data and defines the Notebook class.

Generated on Mon Sep 13 2021 12:08:02 for libextendedkcal by doxygen 1.9.2