Handle the EINTR error when doing a waitpid() in wvmagicloopback.
[wvapps.git] / evolution / calendaradaptor.h
blob80924c863718e8f2815aa035e71f0b5df0181532
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: s; c-basic-offset: 4 -*- */
2 /*
3 * Authors : Patrick Patterson <ppatters@nit.ca>
4 * Peter Colijn <pcolijn@nit.ca>
5 * Scott MacLean <scott@nit.ca>
6 * William Lachance <wlach@nit.ca>
8 * Copyright 2003-2004, Net Integration Technologies, Inc.
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU General Public
12 * License as published by the Free Software Foundation.
14 * This program 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
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
25 #ifndef __CALENDAR_ADAPTOR_H
26 #define __CALENDAR_ADAPTOR_H
27 #include "exchangeitadaptor.h"
29 extern "C"
31 #include <cal-client/cal-client.h>
34 #include "wvstring.h"
35 #include "wvstringlist.h"
37 #define CALENDAR_TYPE "IPF.Appointment"
39 class CalendarAdaptor : public ExchangeItAdaptor
41 public:
42 CalendarAdaptor(WvStringParm _key,
43 WvStringParm _path,
44 const UniConf parent);
45 virtual ~CalendarAdaptor();
47 const virtual bool add_item(WvTnef &tnef) {return true;}
48 const virtual bool update_item(WvTnef &tnef, WvStringParm uid);
49 const virtual bool delete_item(WvStringParm uid);
51 virtual void item_updated(WvStringParm uid);
52 virtual void item_removed(WvStringParm uid);
54 WvStringList * get_item_list() const;
56 virtual WvString get_type() const { return EXCHANGEIT_CALENDAR_TYPE; }
58 CalClient *get_client()
59 { return client; }
61 void merge_into_calendar(CalClient *local_client);
63 uint32_t version;
65 WvLog log;
67 protected:
68 const virtual bool _sync_local_items();
69 virtual WvStringList * get_all_uids();
70 virtual WvString get_item_type() const { return "IPM.Appointment"; }
72 CalendarAdaptor(WvStringParm _key,
73 WvStringParm _path,
74 const UniConf parent,
75 WvStringParm _file,
76 bool task);
78 bool is_task;
80 private:
81 void _initCalClient(WvStringParm path, WvStringParm file);
82 void merge_vcal2tnef(CalComponent *component, WvTnef &tnef,
83 WvString type, bool task);
84 mutable CalClient *client;
88 #endif