* Copyright (C) 2012 Christian Mollekopf <mollekopf@kolabsys.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EVENT_H
#define EVENT_H
#include<kolabevent.h>
#ifndef SWIG
#include"kolab_export.h"
#include<icalendar/icalendar.h>
#else
/* No export/import SWIG interface files */
#define KOLAB_EXPORT
#endif
namespaceKolab{
namespaceCalendaring{
classKOLAB_EXPORTEvent:publicKolab::Event
{
public:
Event();
Event(constKolab::Event&);
~Event();
boolread(conststd::string&);
/**
* Convert to kolab xml format.
*/
std::stringwrite()const;
boolfromMime(conststd::string&);
/**
* Convert to kolab mime format.
*/
std::stringtoMime()const;
enumITipMethod{
iTIPPublish,/**< Event, to-do, journal or freebusy posting */
iTIPRequest,/**< Event, to-do or freebusy scheduling request */
iTIPReply,/**< Event, to-do or freebusy reply to request */
iTIPAdd,/**< Event, to-do or journal additional property request */
iTIPCancel,/**< Event, to-do or journal cancellation notice */
iTIPRefresh,/**< Event or to-do description update request */
iTIPCounter,/**< Event or to-do submit counter proposal */
iTIPDeclineCounter,/**< Event or to-do decline a counter proposal */
iTIPNoMethod/**< No method */
};
boolfromICal(conststd::string&);
std::stringtoICal()const;
boolfromIMip(conststd::string&);
std::stringtoIMip(ITipMethodmethod)const;
/**
* Returns the scheduling method from the last fromIMip call
*/
ITipMethodgetSchedulingMethod()const;
/**
* Updates the delegators and delegatees of the event.
*
* Creates a new attendee for each missing delegatee (delegators are expected to be existing), and then updates each delegatee with the delegator (delegatedFrom).
* Delegators delegatedTo is updated accordingly.
* Existing attendees are tried to be found by uid/email/name (in this order).