/***************************************************************************
 *                                                                         *
 *   POLLMSG.H                                                             *
 *                                                                         *
 *   Copyright (c) 1997 Galacticomm, Inc.                                  *
 *                                                                         *
 *                                                                         *
 *   Poll Message Options Class.                                           *
 *                                                  - N.C. Osterc  9/11/98 *
 *                                                                         *
 ***************************************************************************/

#include "gcomm.h"
#include "gcspsrv.h"
#include "galpnqah.h"
#include "pollmsg.h"

#define FILREV "$Revision: 10 $"

CHAR *hpnqkey;
bool alwanon;
CHAR *accuimg;
CHAR *credimg;
CHAR *dateimg;
CHAR *delimg;
INT dftlstc;
CHAR *disimg;
CHAR *doneimg;
CHAR *multimg;
CHAR *newimg;
INT maxlstc;
CHAR *mntimg;
CHAR *numimg;
CHAR *onceimg;
CHAR *openimg;
GBOOL pfrmset;
CHAR *ptypimg;
CHAR *qtypimg;
CHAR *replimg;
CHAR *tfimg;
CHAR *uaccimg;
CHAR *ynimg;
CHAR *anchor;
CHAR *nopoll1;
CHAR *nopoll2;
CHAR *nopoll3;
CHAR *nopoll4;
CHAR *nopoll5;
CHAR *nopoll6;
CHAR *nopoll7;
CHAR *nopoll8;
CHAR *nopoll9;
CHAR *resnone;
CHAR *paacum;
CHAR *paonce;
CHAR *parepl;
CHAR *pcrdgrnt;
CHAR *pfilgrnt;
CHAR *pkeygrnt;
CHAR *pclsgrnt;
CHAR *psasc;
CHAR *psbth;
CHAR *psbtv;
CHAR *psnone;
CHAR *ptarget1;
CHAR *ptarget2;
CHAR *ptarget3;
CHAR *ptarget4;
CHAR *ptarget5;
CHAR *ptarget6;
CHAR *ptarget7;
CHAR *ptarget8;
CHAR *ptarget9;
CHAR *ptypep;
CHAR *ptypeq;
CHAR *qcredit;
CHAR *qdate;
CHAR *qdisonly;
CHAR *qmulti;
CHAR *qnumeric;
CHAR *qopen;
CHAR *qparam;
CHAR *qtf;
CHAR *quacc;
CHAR *qyn;
INT timslc;
CHAR *valtrue;
CHAR *valfalse;
CHAR *valyes;
CHAR *valno;
CHAR *valmc1;
CHAR *valmc2;
CHAR *valmc3;
CHAR *valmc4;
CHAR *valmc5;
CHAR *valmc6;
CHAR *valmc7;
CHAR *valmc8;
CHAR *valmc9;
CHAR *valmc10;
CHAR *valmc11;
CHAR *valmc12;
CHAR *valmc13;
CHAR *valmc14;
CHAR *valmc15;
CHAR *valmc16;

HMCVFILE pAHmsg;

bool messagesInited=FALSE;             // have message options been initialized

MARKSOURCE(pollmsg);

pollMsg::pollMsg()                     // default constructor
{
     if (messagesInited) {
          return;
     }
     pAHmsg=opnmsg("GALPNQAH.MCV");
     setmbk(pAHmsg);
     hpnqkey=stgopt(HPNQKEY);
     alwanon=ynopt(ALWANON);
     accuimg=stpans(stgopt(ACCUIMG));
     credimg=stpans(stgopt(CREDIMG));
     dateimg=stpans(stgopt(DATEIMG));
     delimg=stpans(stgopt(DELIMG));
     dftlstc=numopt(DFTLSTC,0,32767);
     disimg=stpans(stgopt(DISIMG));
     doneimg=stpans(stgopt(DONEIMG));
     multimg=stpans(stgopt(MULTIMG));
     newimg=stpans(stgopt(NEWIMG));
     maxlstc=numopt(MAXLSTC,0,32767);
     mntimg=stpans(stgopt(MNTIMG));
     numimg=stpans(stgopt(NUMIMG));
     onceimg=stpans(stgopt(ONCEIMG));
     openimg=stpans(stgopt(OPENIMG));
     pfrmset=ynopt(PFRMSET);
     ptypimg=stpans(stgopt(PTYPIMG));
     qtypimg=stpans(stgopt(QTYPIMG));
     replimg=stpans(stgopt(REPLIMG));
     tfimg=stpans(stgopt(TFIMG));
     uaccimg=stpans(stgopt(UACCIMG));
     ynimg=stpans(stgopt(YNIMG));
     anchor=stpans(stgopt(ANCHOR));
     nopoll1=stpans(stgopt(NOPOLL1));
     nopoll2=stpans(stgopt(NOPOLL2));
     nopoll3=stpans(stgopt(NOPOLL3));
     nopoll4=stpans(stgopt(NOPOLL4));
     nopoll5=stpans(stgopt(NOPOLL5));
     nopoll6=stpans(stgopt(NOPOLL6));
     nopoll7=stpans(stgopt(NOPOLL7));
     nopoll8=stpans(stgopt(NOPOLL8));
     nopoll9=stpans(stgopt(NOPOLL9));
     paacum=stpans(stgopt(PAACUM));
     paonce=stpans(stgopt(PAONCE));
     parepl=stpans(stgopt(PAREPL));
     pcrdgrnt=stpans(stgopt(PCRDGRNT));
     pfilgrnt=stpans(stgopt(PFILGRNT));
     pkeygrnt=stpans(stgopt(PKEYGRNT));
     pclsgrnt=stpans(stgopt(PCLSGRNT));
     psasc=stpans(stgopt(PSASC));
     psbth=stpans(stgopt(PSBTH));
     psbtv=stpans(stgopt(PSBTV));
     psnone=stpans(stgopt(PSNONE));
     ptarget1=stpans(stgopt(PTARGET1));
     ptarget2=stpans(stgopt(PTARGET2));
     ptarget3=stpans(stgopt(PTARGET3));
     ptarget4=stpans(stgopt(PTARGET4));
     ptarget5=stpans(stgopt(PTARGET5));
     ptarget6=stpans(stgopt(PTARGET6));
     ptarget7=stpans(stgopt(PTARGET7));
     ptarget8=stpans(stgopt(PTARGET8));
     ptarget9=stpans(stgopt(PTARGET9));
     resnone=stpans(stgopt(RESNONE));
     ptypep=stpans(stgopt(PTYPEP));
     ptypeq=stpans(stgopt(PTYPEQ));
     qcredit=stpans(stgopt(QCREDIT));
     qdate=stpans(stgopt(QDATE));
     qdisonly=stpans(stgopt(QDISONLY));
     qmulti=stpans(stgopt(QMULTI));
     qnumeric=stpans(stgopt(QNUMERIC));
     qopen=stpans(stgopt(QOPEN));
     qparam=stpans(stgopt(QPARAM));
     qtf=stpans(stgopt(QTF));
     quacc=stpans(stgopt(QUACC));
     qyn=stpans(stgopt(QYN));
     timslc=numopt(TIMSLC,1,1000);
     valtrue=stgopt(VALTRUE);
     valfalse=stgopt(VALFALSE);
     valyes=stgopt(VALYES);
     valno=stgopt(VALNO);
     valmc1=stgopt(VALMC1);
     valmc2=stgopt(VALMC2);
     valmc3=stgopt(VALMC3);
     valmc4=stgopt(VALMC4);
     valmc5=stgopt(VALMC5);
     valmc6=stgopt(VALMC6);
     valmc7=stgopt(VALMC7);
     valmc8=stgopt(VALMC8);
     valmc9=stgopt(VALMC9);
     valmc10=stgopt(VALMC10);
     valmc11=stgopt(VALMC11);
     valmc12=stgopt(VALMC12);
     valmc13=stgopt(VALMC13);
     valmc14=stgopt(VALMC14);
     valmc15=stgopt(VALMC15);
     valmc16=stgopt(VALMC16);
     rstmbk();
     messagesInited=TRUE;
}

pollMsg::~pollMsg()                    // destructor
{
     free(hpnqkey);
     free(accuimg);
     free(credimg);
     free(dateimg);
     free(delimg);
     free(disimg);
     free(doneimg);
     free(multimg);
     free(newimg);
     free(mntimg);
     free(numimg);
     free(onceimg);
     free(openimg);
     free(ptypimg);
     free(qtypimg);
     free(replimg);
     free(tfimg);
     free(uaccimg);
     free(ynimg);
     free(anchor);
     free(nopoll1);
     free(nopoll2);
     free(nopoll3);
     free(nopoll4);
     free(nopoll5);
     free(nopoll6);
     free(nopoll7);
     free(nopoll8);
     free(nopoll9);
     free(paacum);
     free(paonce);
     free(parepl);
     free(pcrdgrnt);
     free(pfilgrnt);
     free(pkeygrnt);
     free(pclsgrnt);
     free(psasc);
     free(psbth);
     free(psbtv);
     free(psnone);
     free(ptarget1);
     free(ptarget2);
     free(ptarget3);
     free(ptarget4);
     free(ptarget5);
     free(ptarget6);
     free(ptarget7);
     free(ptarget8);
     free(ptarget9);
     free(resnone);
     free(ptypep);
     free(ptypeq);
     free(qcredit);
     free(qdate);
     free(qdisonly);
     free(qmulti);
     free(qnumeric);
     free(qopen);
     free(qparam);
     free(qtf);
     free(quacc);
     free(qyn);
     free(valtrue);
     free(valfalse);
     free(valyes);
     free(valno);
     free(valmc1);
     free(valmc2);
     free(valmc3);
     free(valmc4);
     free(valmc5);
     free(valmc6);
     free(valmc7);
     free(valmc8);
     free(valmc9);
     free(valmc10);
     free(valmc11);
     free(valmc12);
     free(valmc13);
     free(valmc14);
     free(valmc15);
     free(valmc16);
     clsmsg(pAHmsg);
     messagesInited=FALSE;
}
