/*------------------------------------------------------------------------*
  Filename....: manf.h


		 COPYRIGHT (C) 2001.  All Rights Reserved.
		 auto*des*sys, Inc., Columbus, Ohio, USA.
 *------------------------------------------------------------------------*/

#ifndef _MANF_H
#define _MANF_H 1

#include <math.h>
#include <float.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#include <errno.h>

#include "fzrt_api.h"
#include "fz_api.h"

#include "fz_fuim_api.h"
#include "fz_objt_attr_api.h"
#include "fz_type_api.h"
#include "fz_iost_api.h"
#include "formz_vendor.h"

#include "fzpl_plugin.h"


/* Attribute Plugin Identification */
/* UUID : {5887e381-f6f5-4c8e-a06e-409ddd53cbaa} */

#define MANF_ATTR_PLUGIN_ID				"\x58\x87\xe3\x81\xf6\xf5\x4c\x8e\xa0\x6e\x40\x9d\xdd\x53\xcb\xaa"
#define MANF_ATTR_PLUGIN_VERSION		FZPL_VERS_MAKE(6,1,0,0)
#define MANF_ATTR_PLUGIN_NAME			"Product Info Attribute Plugin - SDK Sample"
#define MANF_ATTR_PLUGIN_VENDOR			FORMZ_VENDOR
#define MANF_ATTR_PLUGIN_ATTR_STR		"FFMT=OTYP;FVERS=1.0"
#define MANF_ATTR_PLUGIN_URL			FORMZ_VENDOR_URL

/* Attribute Identification */
/* UUID :  {1c64c44a-cece-4508-9c23-2c143da6a9b0} */
#define MANF_ATTR_ID					"\x1c\x64\xc4\x4a\xce\xce\x45\x08\x9c\x23\x2c\x14\x3d\xa6\xa9\xb0"


#define MANF_STRINGS		1


enum
{	MANF_ATTR_PLUGIN_NAME_STR = 1,
	MANF_ATTR_NAME_STR,
	MANF_ATTR_MANUFACTURER_STR,
	MANF_ATTR_PRODUCT_STR,
	MANF_ATTR_COST_TYPE_STR,
	MANF_ATTR_COST_STR,
	MANF_ATTR_COST_PER_UNIT_STR,
	MANF_ATTR_COST_PER_VOLUME_STR,
	MANF_ATTR_COST_PER_SURFACE_STR,
	MANF_ATTR_DOLLAR_STR,
	MANF_ATTR_DEFAULT_MANF_STR,
	MANF_ATTR_DEFAULT_PROD_STR
	
};	

typedef struct manf_attr_data_td
{
	fz_string_td	manufacturer;
	fz_string_td	product;
	
	fzrt_int			cost_type;
	
	double			cost_per_unit;
	double			cost_per_volume;
	double			cost_per_surface;

} manf_attr_data_td;


fzrt_error_td manf_attr_get_callback_fset ( const fzpl_fset_def_ptr fset_def, fzpl_fset_td * const fset );


/*************************************************************************
						PLUGIN STUFF
**************************************************************************/

typedef struct
{
	const fzpl_fset_glue_fset *fsf;

	/* application provided function sets to hold on to */
	
	fz_type_fset			type_funcs;
	fz_fuim_fset			fuim_funcs;
	fz_iost_fset			iost_funcs;

	fz_fzrt_base_fset		fzrt_base_funcs;
	fz_fzrt_mem_fset		fzrt_mem_funcs;
	fz_fzrt_file_fset		fzrt_file_funcs;

	fzrt_unsigned_int			manf_attr_plugin_runtime_id;
	fzrt_fzr_ref_td			rsrc_ref;
	fzrt_floc_ptr			floc;
		
}  manf_plugin_stuff;

extern manf_plugin_stuff		plugin_stuff;

#endif /* _MANF_H */
