/* @(#)59    1.9  src/examples/bank/bnk_util.h, examples.src, os2dce21.dss, 960602a.1  7/8/94  10:30:13 */
/*
 * COMPONENT_NAME:  examples.src
 *
 * FUNCTIONS:
 *
 * ORIGINS: 2, 27
 *
 * (C) COPYRIGHT International Business Machines Corp. 1990, 1994
 * All Rights Reserved
 * Licensed Materials - Property of IBM
 *
 * US Government Users Restricted Rights - Use, duplication or
 * disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 *
 */
/*
 *      Copyright  1987 by Apollo Computer Inc., Chelmsford, Massachusetts
 */
/*
 *   	DESCRIPTION:
 *
 *		This file contains defines used by the function check_status
 *              and prototypes of functions in ary_util.c.  The defines allow
 *              check_status() to process status codes and handle message
 *              displaying and types of error handling to be done in a flex-
 *              able manner.
 *
 *		The defines for the four type of account objects as well as 
 *		their object uuids and type uuids are included.  The uuid
 *		strings where obtained by executing uuid_gen and saving the
 *		output.
 *
 *   	HISTORY:
 *      	5/01/91         Modified original util.h	Gerald Cantor
 *	       10/19/91		Incorperated util.c and 
 *				bnk_util.c together, thsu
 *				facilitating a change from 
 *				util.h to bnk_util.h.		Gerald Cantor
 *	       10/20/91		ANSIfied functions and updated
 *				comments and prologs.		Gerald Cantor
 */

#include <dce/uuid.h>

#define CHECKING	0
#define SAVINGS		1
#define CD		2
#define IRA		3
#define CK_UUID	 	"cdc79674-f5ad-11c9-912a-02608c2ea88e"
#define SV_UUID	 	"fa1ecda0-229e-11ca-8698-02608c2c688e"
#define CD_UUID  	"971a9d20-f5ad-11c9-bceb-02608c2ea88e"
#define IRA_UUID 	"d83f9aac-f5ad-11c9-aa6d-02608c2ea88e"
#define RES_UUID 	"d9803f8e-f5ab-11c9-851b-02608c2ea88e"
#define UNRES_UUID 	"805f8846-22a0-11ca-bc8c-02608c2c688e"
#define ACCOUNT_EXISTS		100
#define ACCT_NOT_FOUND		200
#define BAD_DEPOSIT_AMOUNT	300
#define UNMATURE_ACCOUNT	400
#define INSUFFICIENT_FUNDS	500
#define EMPTY_BANK		600
#define FAIL			700
#define RPC			5 /* status originating from a RPC call */
#define NOT_RPC			6 /* status originating from a any other call */
#define EQUAL		10
#define NOT_EQUAL	11
#define GR_THAN		12
#define LS_THAN		13

int BankNameToID(char *, uuid_t *);
void get_uuids(uuid_t *, uuid_t *, uuid_t *, uuid_t *, uuid_t *, uuid_t *);
void set_objects(uuid_t *, uuid_t *, uuid_t *, uuid_t *, uuid_t *, uuid_t *);
void build_object_vector(uuid_vector_p_t, uuid_p_t);
char *SAlloc(char *);
uuid_t *get_handle_obj(handle_t);
void make_header(char *);
int check_status(error_status_t, error_status_t, int, char *, boolean32, int);
