#ifndef __GNUMERIC_IDL__
#define __GNUMERIC_IDL__

#include <Bonobo.idl>

module GNOME {
	module Gnumeric {
		exception ErrorSystem  { string msg; };
		exception ErrorRead    { string msg; };
		exception ErrorSave    { string msg; };
		exception ErrorPlugin  { string msg; };
		exception ErrorInfo    { string msg; };
		exception ErrorInvalid { string msg; };
		exception ErrorSplitsArray { string msg; };

		interface Sheet : Bonobo::Unknown {
			attribute string name;
			attribute short  index;
		};
		typedef sequence<Sheet>	Sheets;

		interface Workbook {
			attribute string name;

			Sheet  sheet_by_index (in short i);
			Sheet  sheet_by_name  (in string name);
			Sheet  sheet_add      (in string name, in short pos);
			Sheets sheets         ();
		};
		typedef sequence<Workbook>	Workbooks;

		interface Application : Bonobo::Unknown {
			Workbook  workbook_open (in string file_name,
						 in boolean shared_view);
			Workbooks workbooks ();
		};
	};
};

#endif /* __GNUMERIC_IDL__ */
