/usr/include/akonadi/calendar/itiphandler.h is in kdepimlibs5-dev 4:4.14.10-1ubuntu7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | /*
Copyright (c) 2002-2004 Klarälvdalens Datakonsult AB
<info@klaralvdalens-datakonsult.se>
Copyright (C) 2010 Bertjan Broeksema <broeksema@kde.org>
Copyright (C) 2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
Copyright (C) 2012 SĂ©rgio Martins <iamsergio@gmail.com>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef _AKONADI_CALENDAR_ITIP_HANDLER_H
#define _AKONADI_CALENDAR_ITIP_HANDLER_H
#include "akonadi-calendar_export.h"
#include "etmcalendar.h"
#include <kcalcore/incidence.h>
#include <kcalcore/schedulemessage.h>
#include <QString>
#include <QWidget>
namespace Akonadi {
/**
* @short Ui delegate for editing counter proposals.
* @since 4.11
*/
class AKONADI_CALENDAR_EXPORT GroupwareUiDelegate
{
public:
virtual ~GroupwareUiDelegate();
virtual void requestIncidenceEditor(const Akonadi::Item &item) = 0;
virtual void setCalendar(const Akonadi::ETMCalendar::Ptr &calendar) = 0;
virtual void createCalendar() = 0;
};
/**
* @short Handles sending of iTip messages aswell as processing incoming ones.
* @since 4.11
*/
class AKONADI_CALENDAR_EXPORT ITIPHandler : public QObject
{
Q_OBJECT
public:
enum Result {
ResultError, /**< An unexpected error occurred */
ResultSuccess, /**< The invitation was successfuly handled. */
ResultCancelled /**< User cancelled the operation. @since 4.12 */
};
/**
* Creates a new ITIPHandler instance.
*/
explicit ITIPHandler(QObject *parent = 0);
/**
* Destroys this instance.
*/
~ITIPHandler();
/**
* Processes a received iTip message.
*
* @param receiver
* @param iCal
* @param type
*
* @see iTipMessageProcessed()
*/
void processiTIPMessage(const QString &receiver, const QString &iCal, const QString &type);
/**
* Sends an iTip message.
*
* @param method iTip method
* @param incidence Incidence for which we're sending the iTip message.
* Should contain a list of attendees.
* @param parentWidget
*/
void sendiTIPMessage(KCalCore::iTIPMethod method,
const KCalCore::Incidence::Ptr &incidence,
QWidget *parentWidget = 0);
/**
* Publishes incidence @p incidence.
* A publish dialog will prompt the user to input recipients.
* @see rfc2446 3.2.1
*/
void publishInformation(const KCalCore::Incidence::Ptr &incidence, QWidget *parentWidget = 0);
/**
* Sends an e-mail with the incidence attached as iCalendar source.
* A dialog will prompt the user to input recipients.
*/
void sendAsICalendar(const KCalCore::Incidence::Ptr &incidence, QWidget *parentWidget = 0);
/**
* Sets the UI delegate to edit counter proposals.
*/
void setGroupwareUiDelegate(GroupwareUiDelegate *);
/**
* Sets the calendar that the itip handler should use.
* The calendar should already be loaded.
*
* If none is set, a FetchJobCalendar will be created internally.
*/
void setCalendar(const Akonadi::CalendarBase::Ptr &);
/**
* Sets if the ITIP handler should show dialogs on error.
* Default is true, for compatibility reasons, but this will change in KDE5.
* TODO_KDE5: use message delegates
*
* @since 4.12
*/
void setShowDialogsOnError(bool enable);
/**
* Returns the calendar used by this itip handler.
*/
Akonadi::CalendarBase::Ptr calendar() const;
Q_SIGNALS:
/**
* Sent after processing an incoming iTip message.
*
* @param result success of the operation.
* @param errorMessage translated error message suitable for user dialogs.
* Empty if the operation was successul
*/
void iTipMessageProcessed(Akonadi::ITIPHandler::Result result,
const QString &errorMessage);
/**
* Signal emitted after an iTip message was sent through sendiTIPMessage()
*/
void iTipMessageSent(Akonadi::ITIPHandler::Result, const QString &errorMessage);
/**
* Signal emitted after an incidence was published with publishInformation()
*/
void informationPublished(Akonadi::ITIPHandler::Result, const QString &errorMessage);
/**
* Signal emitted after an incidence was sent with sendAsICalendar()
*/
void sentAsICalendar(Akonadi::ITIPHandler::Result, const QString &errorMessage);
private:
Q_DISABLE_COPY(ITIPHandler)
class Private;
Private *const d;
};
}
#endif
|