#ifndef BANK_H
#define BANK_H
/* @(#)50        1.9  src/examples/bank/pm/bank.h, examples.src, os2dce21.dss, 960602a.1  1/11/96  09:35:03 */
/*******************************************************************

COMPONENT_NAME:  examples.src

FUNCTIONS:

ORIGINS: 27

PROGRAM NAME: bank.h

DESCRIPTIVE NAME: bank demo header file

(C) COPYRIGHT International Business Machines Corp. 1992, 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.

FUNCTION: provide constants, structures and includes for the bank demo

*******************************************************************/

#define INCL_GPIPRIMITIVES        /* Selectively include */
#define INCL_WINFRAMEMGR        /* relative parts of   */
#define INCL_WINSYS            /* the PM header file  */
#define INCL_PM
#define INCL_WINWINDOWMGR
#define INCL_WINSWITCHLIST
#define INCL_GPILCIDS
#define INCL_WINMESSAGEMGR
#define INCL_WINDIALOGS
#define INCL_WINBUTTONS

#include <os2.h>
#ifndef __WATCOMC__
#include <memory.h>
#endif
#include <string.h>
#include <ctype.h>
#include <time.h>
#include "bank.rch"
#include "uuid.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <signal.h>
#include <dce\rpc.h>
#include <dce\nbase.h>
#include <dce\sec_login.h>
#include <dce\pthread.h>
#include <dce\dce_error.h>
#include <sys\types.h>
#include "admin.h"
#include "trans.h"


#define STRINGLENGTH       80
#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
#define NOT_RPC              6
#define EQUAL               10
#define NOT_EQUAL           11
#define GR_THAN             12
#define LS_THAN             13

#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 MAX_BANKS 9

typedef struct
{
   CHAR bnkname[40];
   CHAR custname[30];
   INT acctype;
   INT sav_acctbal;
   INT chk_acctbal;
   INT ira_acctbal;
   INT cd_acctbal;
   INT oper;
   INT amt;
} CUSTINFO, *PCUSTINFO;

extern uuid_t uuid_nil;
/***********************************************************************
*  Function prototypes
************************************************************************/
#ifdef __IBMC__
extern int main(void);
#endif

#ifdef __WATCOMC__
extern int main(void);
#endif

#ifdef __BORLANDC__
extern int cdecl main(void);
#endif


extern int get_bank_names(void);

MRESULT EXPENTRY MainServProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
extern MRESULT EXPENTRY BankSelDlgProc(HWND, ULONG, MPARAM, MPARAM);
extern MRESULT EXPENTRY AuthDlgProc(HWND, ULONG, MPARAM, MPARAM);
extern MRESULT EXPENTRY OperDlgProc(HWND, ULONG, MPARAM, MPARAM);
extern MRESULT EXPENTRY AcctDlgProc(HWND, ULONG, MPARAM, MPARAM);
extern MRESULT EXPENTRY AmtDlgProc(HWND, ULONG, MPARAM, MPARAM);
extern MRESULT EXPENTRY BalDlgProc(HWND, ULONG, MPARAM, MPARAM);
VOID DisplayInfo(HWND);
void display_message(error_status_t,HWND);
VOID ErrorMsgDisplay(HWND hWnd, error_status_t st);
/************************************************************************
*  Global variables declaration
*************************************************************************/

extern HAB        hab;         /* Anchor block handel */
extern HWND        hwndFrame ;   /* Frame Window handel */
extern CHAR        szTITLE[STRINGLENGTH];
extern SWCNTRL        swctl;
extern HSWITCH        hswitch;
extern PID        pid;
extern LONG            CharHeight;
extern LONG        CharWidth;
extern short        image_stat;
extern CUSTINFO        CurCustomer;
extern char        *bank_names[MAX_BANKS];
extern BOOL        BANK_OPEN[MAX_BANKS];
extern int        bank;
extern rpc_binding_handle_t    admin_bh[MAX_BANKS];
extern rpc_binding_handle_t    trans_bh[MAX_BANKS];
extern sec_login_handle_t    lcontext;

#endif
