/* Evolution calendar interface
 *
 * Copyright (C) 2000 Eskil Heyn Olsen
 * Copyright (C) 2000 Ximian, Inc.
 * Copyright (C) 2000 Ximian, Inc.
 *
 * Authors: Eskil Heyn Olsen <deity@eskil.dk>
 *          Federico Mena-Quintero <federico@ximian.com>
 */

#ifndef _EVOLUTION_CALENDAR_IDL_
#define _EVOLUTION_CALENDAR_IDL_

#include <Bonobo.idl>
#include <Evolution-DataServer-Calendar.idl>

module GNOME {
module Evolution {

module Calendar {
	/* Factory to centralize calendar component editor dialogs */
	interface CompEditorFactory : Bonobo::Unknown {
		exception InvalidURI {};
		exception BackendContactError {};
		exception UnsupportedType {};

		typedef long CompEditorMode;
		const CompEditorMode EDITOR_MODE_EVENT        = 1 << 0;
		const CompEditorMode EDITOR_MODE_ALLDAY_EVENT = 1 << 1;
		const CompEditorMode EDITOR_MODE_MEETING      = 1 << 2;
		const CompEditorMode EDITOR_MODE_TODO         = 1 << 3;

		/* Loads a calendar and opens an editor for the specified object */
		/* FIXME Its nasty to use CompEditorMode to pass event/todo source type
		   but it saves adding yet another corba type - only MODE_EVENT or 
		   MODE_TODO should be passed here */
		void editExisting (in string uri, in CalObjUID uid, in CompEditorMode mode)
			raises (InvalidURI, BackendContactError);

		/* Loads a calendar and creates a new component of the specified type */
		void editNew (in string uri, in CompEditorMode mode)
			raises (InvalidURI, BackendContactError, UnsupportedType);
	};

	interface AlarmNotify : Bonobo::Unknown {
	};
};

};
};

#endif
