"Fossies" - the Fresh Open Source Software archive

Member "evolution-brutus-1.2.35/calendar/e-cal-backend-brutus.h" of archive evolution-brutus-1.2.35.tar.gz:


/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/*
 *    Brutus e-cal backend class.
 *
 *    Authors:
 *        Jules Colding <colding@42tools.com>
 *
 *    Copyright (C) 2006-2007 OMC Denmark ApS.
 *
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 2 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 General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with this program; if not, write to the Free Software
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *    MA 02111-1307 USA
 */

#ifndef E_CAL_BACKEND_BRUTUS_H
#define E_CAL_BACKEND_BRUTUS_H

#include <libedata-cal/e-cal-backend-sync.h>
#include <libedata-cal/e-cal-backend-cache.h>

#include <idl_output/IMAPISession.h>
#include <idl_output/IMAPIFolder.h>

#include <session/brutus-proxy.h>
#include <session/brutusd-util.h>
#include <server/brutus.h>

G_BEGIN_DECLS

#define E_TYPE_CAL_BACKEND_BRUTUS            (e_cal_backend_brutus_get_type ())
#define E_CAL_BACKEND_BRUTUS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_BACKEND_BRUTUS, ECalBackendBrutus))
#define E_CAL_BACKEND_BRUTUS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_BACKEND_BRUTUS, ECalBackendBrutusClass))
#define E_IS_CAL_BACKEND_BRUTUS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_BACKEND_BRUTUS))
#define E_IS_CAL_BACKEND_BRUTUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_BACKEND_BRUTUS))

/* Private part of the ECalBackendBrutus structure */
typedef struct _ECalBackendBrutusPrivate {
	BrutusBaseClass base_class;      // basic data required to connect to Brutus server

	BRUTUS_IMAPIFolder mapi_folder;  // MAPI calendar/tasks folder

	long auto_check_timeout;         // auto check timeout interval in minutes
	guint timeout_id;                // ID of timing source

	gboolean constructed;            // initialized with ORB, POA and all
	gboolean read_only;              // read-only mode if TRUE
	
	CalMode mode;                    // local or remote

	GMutex *poll_mutex;              // protecting polls of calendar/tasks folder

	ECalBackendCache *cache;         // local calender cache
	gchar *email_address;            // eamil address of account owner
	icaltimezone *default_timezone;  // default timezone of client

#if (EDS_EPOCH >= 18)
	ECalSourceType ecal_source_type; // EVENT or TASK
#endif
} ECalBackendBrutusPrivate;

typedef struct _ECalBackendBrutus {
	ECalBackendSync backend;

	/* Private data */
	ECalBackendBrutusPrivate *priv;
} ECalBackendBrutus;

typedef struct _ECalBackendBrutusClass {
	ECalBackendSyncClass parent_class;
} ECalBackendBrutusClass;

extern GType e_cal_backend_brutus_get_type(void);

G_END_DECLS

#endif