/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#ifndef _ECS_H_RPCGEN
#define	_ECS_H_RPCGEN

#include <rpc/rpc.h>
/* 
 * fichier genere par RPCGEN a partir de ecs.x
 *
 *    Declaration des structures & prototypes de l'extension client/serveur.
 *    Ce fichier est recu par rpcgen et ce dernier generera 4 fichiers pour
 *    pour l'extension client/serveur. Le "header" suivant doit ce retrouver
 *    dans tout les fichiers 
 */


/*
 * Copyright (C) 1995 Logiciels et Applications Scientifiques (L.A.S.) Inc
 * Permission to use, copy, modify and distribute this software and
 * its documentation for any purpose and without fee is hereby granted,
 * provided that the above copyright notice appear in all copies, that
 * both the copyright notice and this permission notice appear in
 * supporting documentation, and that the name of L.A.S. Inc not be used 
 * in advertising or publicity pertaining to distribution of the software 
 * without specific, written prior permission. L.A.S. Inc. makes no
 * representations about the suitability of this software for any purpose.
 * It is provided "as is" without express or implied warranty.
 */


#define	ECS_SUCCESS 0
#define	ECS_FAILURE 1
#define	ECS_RASTERSIZE 1000
#define	ECS_MTEXT 1024
#define	ECS_TRANSIENT_MIN 1073741824
#define	ECS_TRANSIENT_MAX 1610612735

enum ecs_Family {
	Area = 1,
	Line = 2,
	Point = 3,
	Matrix = 4,
	Image = 5,
	Text = 6,
	Edge = 7,
	Face = 8,
	Node = 9,
	Ring = 10
};
typedef enum ecs_Family ecs_Family;

struct ecs_Region {
	double north;
	double south;
	double east;
	double west;
	double ns_res;
	double ew_res;
};
typedef struct ecs_Region ecs_Region;

enum ecs_Resampling {
	nn = 1
};
typedef enum ecs_Resampling ecs_Resampling;

enum ecs_Transformation {
	projective = 1,
	affine = 2,
	similarity = 3
};
typedef enum ecs_Transformation ecs_Transformation;

struct ecs_RasterConversion {
	struct {
		u_int coef_len;
		double *coef_val;
	} coef;
	ecs_Resampling r_method;
	ecs_Transformation t_method;
};
typedef struct ecs_RasterConversion ecs_RasterConversion;

struct ecs_Coordinate {
	double x;
	double y;
};
typedef struct ecs_Coordinate ecs_Coordinate;

struct ecs_FeatureRing {
	ecs_Coordinate centroid;
	struct {
		u_int c_len;
		ecs_Coordinate *c_val;
	} c;
};
typedef struct ecs_FeatureRing ecs_FeatureRing;

struct ecs_Area {
	struct {
		u_int ring_len;
		ecs_FeatureRing *ring_val;
	} ring;
};
typedef struct ecs_Area ecs_Area;

struct ecs_Line {
	struct {
		u_int c_len;
		ecs_Coordinate *c_val;
	} c;
};
typedef struct ecs_Line ecs_Line;

struct ecs_Point {
	ecs_Coordinate c;
};
typedef struct ecs_Point ecs_Point;

struct ecs_Matrix {
	struct {
		u_int x_len;
		u_int *x_val;
	} x;
};
typedef struct ecs_Matrix ecs_Matrix;

struct ecs_Image {
	struct {
		u_int x_len;
		u_int *x_val;
	} x;
};
typedef struct ecs_Image ecs_Image;

struct ecs_Text {
	char *desc;
	ecs_Coordinate c;
};
typedef struct ecs_Text ecs_Text;

struct ecs_Node {
	int id;
	int containfaceid;
	ecs_Coordinate c;
};
typedef struct ecs_Node ecs_Node;

struct ecs_Edge {
	int id;
	int startnodeid;
	int endnodeid;
	int rightfaceid;
	int leftfaceid;
	int rightfedgeid;
	int leftfedgeid;
	struct {
		u_int c_len;
		ecs_Coordinate *c_val;
	} c;
};
typedef struct ecs_Edge ecs_Edge;

enum ecs_TopoLevel {
	Level012 = 1,
	Level3 = 2
};
typedef enum ecs_TopoLevel ecs_TopoLevel;

struct ecs_Face {
	int id;
	struct {
		u_int edgeid_len;
		int *edgeid_val;
	} edgeid;
};
typedef struct ecs_Face ecs_Face;

struct ecs_AreaPrim {
	ecs_TopoLevel level;
	union {
		struct {
			u_int edgeid_len;
			int *edgeid_val;
		} edgeid;
		struct {
			u_int fedgeid_len;
			ecs_Face *fedgeid_val;
		} fedgeid;
	} ecs_AreaPrim_u;
};
typedef struct ecs_AreaPrim ecs_AreaPrim;

struct ecs_Geometry {
	ecs_Family family;
	union {
		ecs_Area area;
		ecs_Line line;
		ecs_Point point;
		ecs_Matrix matrix;
		ecs_Image image;
		ecs_Text text;
		ecs_Node node;
		ecs_Edge edge;
		ecs_AreaPrim ring;
	} ecs_Geometry_u;
};
typedef struct ecs_Geometry ecs_Geometry;

struct ecs_Object {
	char *Id;
	ecs_Geometry geom;
	char *attr;
	double xmin;
	double ymin;
	double xmax;
	double ymax;
};
typedef struct ecs_Object ecs_Object;

enum ecs_AttributeFormat {
	Char = 1,
	Varchar = 2,
	Longvarchar = 3,
	Decimal = 4,
	Numeric = 5,
	Smallint = 6,
	Integer = 7,
	Real = 8,
	Float = 9,
	Double = 10
};
typedef enum ecs_AttributeFormat ecs_AttributeFormat;

struct ecs_ObjAttribute {
	char *name;
	ecs_AttributeFormat type;
	int lenght;
	int precision;
	int nullable;
};
typedef struct ecs_ObjAttribute ecs_ObjAttribute;

struct ecs_ObjAttributeFormat {
	struct {
		u_int oa_len;
		ecs_ObjAttribute *oa_val;
	} oa;
};
typedef struct ecs_ObjAttributeFormat ecs_ObjAttributeFormat;

struct ecs_Category {
	long no_cat;
	u_int r;
	u_int g;
	u_int b;
	char *label;
	u_long qty;
};
typedef struct ecs_Category ecs_Category;

struct ecs_RasterInfo {
	long mincat;
	long maxcat;
	int width;
	int height;
	struct {
		u_int cat_len;
		ecs_Category *cat_val;
	} cat;
};
typedef struct ecs_RasterInfo ecs_RasterInfo;

enum ecs_ResultType {
	Object = 1,
	GeoRegion = 2,
	objAttributeFormat = 3,
	RasterInfo = 4,
	AText = 5
};
typedef enum ecs_ResultType ecs_ResultType;

struct ecs_ResultUnion {
	ecs_ResultType type;
	union {
		ecs_Object dob;
		ecs_Region gr;
		ecs_ObjAttributeFormat oaf;
		ecs_RasterInfo ri;
		char *s;
	} ecs_ResultUnion_u;
};
typedef struct ecs_ResultUnion ecs_ResultUnion;

struct ecs_Result {
	int error;
	char *message;
	ecs_ResultUnion res;
};
typedef struct ecs_Result ecs_Result;

struct ecs_LayerSelection {
	char *Select;
	ecs_Family F;
};
typedef struct ecs_LayerSelection ecs_LayerSelection;

#include <ecs_util.h> /* Outils pour l'aide a ecs */


#define	ECSPROG ((unsigned long)(0x20000001))
#define	ECSVERS ((unsigned long)(1))
#define	CREATESERVER ((unsigned long)(1))
extern  ecs_Result * createserver_1();
#define	DESTROYSERVER ((unsigned long)(2))
extern  ecs_Result * destroyserver_1();
#define	SELECTLAYER ((unsigned long)(3))
extern  ecs_Result * selectlayer_1();
#define	RELEASELAYER ((unsigned long)(4))
extern  ecs_Result * releaselayer_1();
#define	SELECTREGION ((unsigned long)(5))
extern  ecs_Result * selectregion_1();
#define	GETDICTIONNARY ((unsigned long)(6))
extern  ecs_Result * getdictionnary_1();
#define	GETATTRIBUTEFORMAT ((unsigned long)(7))
extern  ecs_Result * getattributeformat_1();
#define	GETNEXTOBJECT ((unsigned long)(8))
extern  ecs_Result * getnextobject_1();
#define	GETRASTERINFO ((unsigned long)(9))
extern  ecs_Result * getrasterinfo_1();
#define	GETOBJECT ((unsigned long)(10))
extern  ecs_Result * getobject_1();
#define	GETOBJECTIDFROMCOORD ((unsigned long)(11))
extern  ecs_Result * getobjectidfromcoord_1();
#define	UPDATEDICTIONARY ((unsigned long)(12))
extern  ecs_Result * updatedictionary_1();
#define	GETSERVERPROJECTION ((unsigned long)(13))
extern  ecs_Result * getserverprojection_1();
#define	GETGLOBALBOUND ((unsigned long)(14))
extern  ecs_Result * getglobalbound_1();
#define	SETSERVERLANGUAGE ((unsigned long)(15))
extern  ecs_Result * setserverlanguage_1();
#define	SETRASTERCONVERSION ((unsigned long)(17))
extern  ecs_Result * setrasterconversion_1();
extern int ecsprog_1_freeresult();

/* the xdr functions */
extern bool_t xdr_ecs_Family();
extern bool_t xdr_ecs_Region();
extern bool_t xdr_ecs_Resampling();
extern bool_t xdr_ecs_Transformation();
extern bool_t xdr_ecs_RasterConversion();
extern bool_t xdr_ecs_Coordinate();
extern bool_t xdr_ecs_FeatureRing();
extern bool_t xdr_ecs_Area();
extern bool_t xdr_ecs_Line();
extern bool_t xdr_ecs_Point();
extern bool_t xdr_ecs_Matrix();
extern bool_t xdr_ecs_Image();
extern bool_t xdr_ecs_Text();
extern bool_t xdr_ecs_Node();
extern bool_t xdr_ecs_Edge();
extern bool_t xdr_ecs_TopoLevel();
extern bool_t xdr_ecs_Face();
extern bool_t xdr_ecs_AreaPrim();
extern bool_t xdr_ecs_Geometry();
extern bool_t xdr_ecs_Object();
extern bool_t xdr_ecs_AttributeFormat();
extern bool_t xdr_ecs_ObjAttribute();
extern bool_t xdr_ecs_ObjAttributeFormat();
extern bool_t xdr_ecs_Category();
extern bool_t xdr_ecs_RasterInfo();
extern bool_t xdr_ecs_ResultType();
extern bool_t xdr_ecs_ResultUnion();
extern bool_t xdr_ecs_Result();
extern bool_t xdr_ecs_LayerSelection();

#endif /* !_ECS_H_RPCGEN */
