/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * CORBA interface for the SelectNames dialog.
 *
 * Authors:
 *   Ettore Perazzoli <ettore@ximian.com>
 *
 * Copyright (C) 2000 Ximian, Inc.
 */

#include <Bonobo.idl>

module GNOME {
module Evolution {
module Addressbook {

	interface SimpleCard : Bonobo::Unknown {
		struct Arbitrary {
			string key;
			string type;
			string value;
		};

		enum Field {
			FileAs,
			FullName,
			Email,
			PhonePrimary,
			PhoneAssistant,
			PhoneBusiness,
			PhoneCallback,
			PhoneCompany,
			PhoneHome,
			Org,
			AddressBusiness,
			AddressHome,
			PhoneMobile,
			PhoneCar,
			PhoneBusinessFax,
			PhoneHomeFax,
			PhoneBusiness2,
			PhoneHome2,
			PhoneIsdn,
			PhoneOther,
			PhoneOtherFax,
			PhonePager,
			PhoneRadio,
			PhoneTelex,
			PhoneTtytdd,
			AddressOther,
			Email2,
			Email3,
			Url,
			OrgUnit,
			Office,
			Title,
			Role,
			Manager,
			Assistant,
			Nickname,
			Spouse,
			Note,
			Caluri,
			Fburl,
			Anniversary,
			BirthDate,
			Mailer,
			NameOrOrg,
			Categories,
			FamilyName,
			GivenName,
			AdditionalName,
			NameSuffix,
			WantsHtml,
			IsList,
			Last
		};

		Arbitrary getArbitrary (in string key);
		void setArbitrary (in string key, in string type, in string value);

		string get (in Field field);
		void set (in Field field, in string value);
	};

	typedef sequence<SimpleCard> SimpleCardList;

	interface SelectNames : Bonobo::Unknown {
		struct Section {
			string id;
			string title;
		};

		typedef sequence<Section> SectionList;

		exception DuplicateID {};
		exception SectionNotFound {};

		void addSection (in string id, in string title)
			raises (DuplicateID);
		void addSectionWithLimit (in string id, in string title, in short limit)
			raises (DuplicateID);

		Bonobo::Control getEntryBySection (in string section_id)
			raises (SectionNotFound);

		void activateDialog (in string section_id);
	};


};
};
};
