#ifndef _profile_h_
#define _profile_h_ 1

#include "sysdep.h"
#include "bool.h"

#ifdef __STDC__
typedef enum AlProfile_Comp_Type_en {
  ALPROFT_VOID,			/* Unset */
  ALPROFT_CHAR_PTR,
  ALPROFT_INT,
  ALPROFT_UINT,			/* Unsigned int */
  ALPROFT_DOUBLE,
  ALPROFT_BOOL,
  ALPROFT_NUM_TYPES
} AlProfile_Comp_Type;

/* Adding a new component requires editing profile.h and profileP.h */

typedef enum AlProfile_Component_en {
  ALPROF_NONEXST,		/* Returned error value; not a component */
  ALPROF_MAILUA,		/* CHAR_PTR */
  ALPROF_LENSDIR,		/* CHAR_PTR */
  ALPROF_RULEDIR,		/* CHAR_PTR */
  ALPROF_ACTNDIR,		/* CHAR_PTR */
  ALPROF_MTRINIT,		/* CHAR_PTR */
  ALPROF_SAVSTAT,		/* BOOL */
  ALPROF_SAVPROP,		/* BOOL */
  ALPROF_DATADIR,		/* CHAR_PTR */
  ALPROF_DATASF,		/* CHAR_PTR */
  ALPROF_DATASSF,		/* CHAR_PTR */
  ALPROF_MSGDOUT,		/* CHAR_PTR */
  ALPROF_RADOUT,		/* CHAR_PTR */
  ALPROF_RLDOUT,		/* CHAR_PTR */
  ALPROF_MTRSNIT,		/* CHAR_PTR */
  ALPROF_SNAPOUT,		/* CHAR_PTR */
  ALPROF_DEFRMT,		/* CHAR_PTR */
  ALPROF_DEFSMT,		/* CHAR_PTR */
  ALPROF_VERBORD,		/* CHAR_PTR */
  ALPROF_FTORD,			/* CHAR_PTR */
  ALPROF_NEXTPTH,		/* CHAR_PTR */
  ALPROF_DEF_FIELD_TYPE,        /* CHAR_PTR */
  ALPROF_ANYONE_DROP_DIR,       /* CHAR_PTR */
  ALPROF_ANYONE_LIB_DIR,        /* CHAR_PTR */
  ALPROF_ANYONE_LOG_FILE,       /* CHAR_PTR */
  ALPROF_ANYONE_RET_ADDR,       /* CHAR_PTR */
  ALPROF_ANYONE_NAME,		/* CHAR_PTR */
  ALPROF_DEF_RULE_VERBS,        /* CHAR_PTR */
  ALPROF_DEF_ANYONE,		/* CHAR_PTR */
  ALPROF_SYS_MTR,		/* CHAR_PTR */
  ALPROF_APP_XRESOURCES,        /* CHAR_PTR */
  ALPROF_FTS_THAT_SHOW_OPS,     /* CHAR_PTR */
  ALPROF_EASY_ACCESS_FTS,       /* CHAR_PTR */
  ALPROF_ADD_TEXT_FIELD_TYPE,   /* CHAR_PTR */
  ALPROF_DEFAULT_RE_MODE,       /* CHAR_PTR */
  ALPROF_MESSAGES_DIR,          /* CHAR_PTR */
  ALPROF_NUM_COMPS		/* Array dimension; not a component 
				 * DO NOT ADD ANY COMPONENTS AFTER THIS */
} AlProfile_Component;

extern NORET AlProfile_init(NOARGS);
extern NORET AlProfile_setup(NOARGS);
extern AlProfile_Component AlProfile_get_code(const char *);
extern AlProfile_Comp_Type AlProfile_get_type(AlProfile_Component);
extern Bool AlProfile_has_value(AlProfile_Component);
extern const char *AlProfile_get_name(AlProfile_Component);
extern const char *AlProfile_get_CP_val(AlProfile_Component);
extern Bool AlProfile_get_BL_val(AlProfile_Component);
extern unsigned int AlProfile_get_UI_val(AlProfile_Component);
extern int AlProfile_get_IN_val(AlProfile_Component);
extern double AlProfile_get_DB_val(AlProfile_Component);

extern NORET AlProfile_unset_val(AlProfile_Component);
extern NORET AlProfile_set_CP_val(AlProfile_Component, const char *);
extern NORET AlProfile_set_BL_val(AlProfile_Component, Bool);
extern NORET AlProfile_set_UI_val(AlProfile_Component, unsigned int);
extern NORET AlProfile_set_IN_val(AlProfile_Component, int);
extern NORET AlProfile_set_DB_val(AlProfile_Component, double);
#else
typedef int AlProfile_Comp_Type;
#define ALPROFT_VOID 0
#define ALPROFT_CHAR_PTR 1
#define ALPROFT_INT 2
#define ALPROFT_UINT 3
#define ALPROFT_DOUBLE 4
#define ALPROFT_BOOL 5
#define ALPROFT_NUM_TYPES 6
typedef int AlProfile_Component;
#define ALPROF_NONEXST 0
#define ALPROF_MAILUA 1
#define ALPROF_LENSDIR 2
#define ALPROF_RULEDIR 3
#define ALPROF_ACTNDIR 4
#define ALPROF_MTRINIT 5
#define ALPROF_SAVSTAT 6
#define ALPROF_SAVPROP 7
#define ALPROF_DATADIR 8
#define ALPROF_DATASF 9
#define ALPROF_DATASSF 10
#define ALPROF_MSGDOUT 11
#define ALPROF_RADOUT 12
#define ALPROF_RLDOUT 13
#define ALPROF_MTRSNIT 14
#define ALPROF_SNAPOUT 15
#define ALPROF_DEFRMT 16
#define ALPROF_DEFSMT 17
#define ALPROF_VERBORD 18
#define ALPROF_FTORD 19
#define ALPROF_NEXTPTH 20
#define ALPROF_DEF_FIELD_TYPE 21
#define ALPROF_ANYONE_DROP_DIR 22
#define ALPROF_ANYONE_LIB_DIR 23
#define ALPROF_ANYONE_LOG_FILE 24
#define ALPROF_ANYONE_RET_ADDR 25
#define ALPROF_ANYONE_NAME 26
#define ALPROF_DEF_RULE_VERBS 27        /* CHAR_PTR */
#define ALPROF_DEF_ANYONE 28
#define ALPROF_SYS_MTR 29
#define ALPROF_APP_XRESOURCES 30
#define ALPROF_FTS_THAT_SHOW_OPS 31     /* CHAR_PTR */
#define ALPROF_EASY_ACCESS_FTS   32       /* CHAR_PTR */
#define ALPROF_ADD_TEXT_FIELD_TYPE 33   /* CHAR_PTR */
#define ALPROF_DEFAULT_RE_MODE 34      /* CHAR_PTR */
#define ALPROF_MESSAGES_DIR 35
#define ALPROF_NUM_COMPS 36	/* Array dimension; not a component
				 * DO NOT ADD ANY COMPONENTS AFTER THIS */

extern NORET AlProfile_init();
extern NORET AlProfile_setup();
extern AlProfile_Component AlProfile_get_code();
extern AlProfile_Comp_Type AlProfile_get_type();
extern Bool AlProfile_has_value();
extern char *AlProfile_get_name();
extern char *AlProfile_get_CP_val();
extern Bool AlProfile_get_BL_val();
extern unsigned int AlProfile_get_UI_val();
extern int AlProfile_get_IN_val();
extern double AlProfile_get_DB_val();

extern NORET AlProfile_unset_val();
extern NORET AlProfile_set_CP_val();
extern NORET AlProfile_set_BL_val();
extern NORET AlProfile_set_UI_val();
extern NORET AlProfile_set_IN_val();
extern NORET AlProfile_set_DB_val();
#endif /* __STDC__ */

#endif /* ifndef _profile_h_ */
