From 5207d03facd9b7453040ef5d6503db454e6cb76e Mon Sep 17 00:00:00 2001 From: Ren RenJuan Date: Sat, 18 Jan 2014 23:09:39 +0000 Subject: [PATCH] * --- APIG/client/commander.cpp | 23 +++++++++++++---------- APIG/include/eppargs.h | 5 +++++ APIG/include/mdCommander.h | 23 +++++++++++++++++++++++ 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/APIG/client/commander.cpp b/APIG/client/commander.cpp index d2c82ff..5ed2369 100644 --- a/APIG/client/commander.cpp +++ b/APIG/client/commander.cpp @@ -1,6 +1,5 @@ #include #include "ausreg-cd.h" -#include "eppargs.h" #define ASSERT(expr) \ if (!(expr)) { \ @@ -10,12 +9,18 @@ const char *banner = CD_NAME " " CD_VERSION " compiled on " __DATE__ " @ " __TI char theBanner[256]; int targetHost = 0; +const char *xsdPath = "./resources"; +const char *xmlPath = "./acInputQueue"; +const char *xmlWork = "./xml"; + mdDG mdg; using namespace boost::interprocess; extern shared_memory_object shm; +#include "eppargs.h" + int is_numeric(const char *p) { int i = strlen(p),j=0; if (*p) { char c; @@ -303,7 +308,7 @@ void mdCommander::help() { mvprintw(10,10," !! - run all active"); mvprintw(11,10," C - make the current command"); mvprintw(12,10," E - display/edit "); - mvprintw(13,10," W - write to the AC watched folder"); + mvprintw(13,10," W - write to ./acInputQueue*"); mvprintw(14,10," X - discard "); mvprintw(15,10," - make the target device"); mvprintw(16,10," loG - display this cd UI log"); @@ -334,18 +339,16 @@ void mdCommander::eppMainMenu() { mvprintw(15,10," U - update"); mvprintw(16,10," D - delete"); mvprintw(17,10," T - transfer"); - mvprintw(19,10,"Meta"); - mvprintw(20,10," x - load XSD for 1 above"); - mvprintw(21,10," A - load all above"); + mvprintw(19,10,"IO"); mvprintw(22,10," v - vi/xmledit the schema "); mvprintw(23,10," w - write blank XML form for 1 above"); mvprintw(24,10," W - write blank forms for all"); - mvprintw(8,50, "Commands are defined"); - mvprintw(9,50, "by the xsd in ./resources."); - mvprintw(11,50,"These reflect what's in"); - mvprintw(12,50,"the SourceForge 2007 "); - mvprintw(13,50,"toolkit and AC now."); + mvprintw(8,50, "Commands are defined by the XSDs"); + mvprintw(9,50, "in ./resources. These are migrating to"); + mvprintw(11,50,"a what's at 'XML TO USE IN AC' @"); + mvprintw(12,50,"dnseppus.meansofproduction.biz/doc, currently"); + mvprintw(13,50,"a mix of that and those in the 2007 toolkit."); mvprintw(15,50,"If no XSD loaded you'll see"); mvprintw(16,50,"stubs in the internal editor."); diff --git a/APIG/include/eppargs.h b/APIG/include/eppargs.h index dc27f0c..865ddf6 100644 --- a/APIG/include/eppargs.h +++ b/APIG/include/eppargs.h @@ -30,6 +30,8 @@ void initEPPArgs() { + // Load stubs + eppArgs[0].n = 3; eppArgs[0].names = checkArgs; eppArgs[1].n = 8; @@ -49,6 +51,9 @@ void initEPPArgs() { eppArgs[8].n = 2; eppArgs[8].names = transferArgs; + } + + diff --git a/APIG/include/mdCommander.h b/APIG/include/mdCommander.h index 8cedcf6..0cc31d1 100644 --- a/APIG/include/mdCommander.h +++ b/APIG/include/mdCommander.h @@ -10,6 +10,15 @@ } eppArgDef; + + typedef + struct { + void *schema; + char *xml; // For the ad-hoc write, the internals store uses a convention + } + eppXML; + + class mdCommander { bool acceptingInput,deleted[MAX_CMDS]; @@ -17,11 +26,25 @@ class mdCommander { int row,col, thisArg; int commandsNow[MAX_CMDS]; // type index into cmdNames eppArgDef *commandArgs[MAX_CMDS][MAX_CMD_ARGS]; + eppXML xmlIO[9]; char wwork[1024]; + char* schemaFileaName="epp-1.0.xsd"; public: mdCommander() {mdStdDevIdx=0; cmdsNow=0; cmdNow = 0; + xmlIO[0].xml = "check.xml" ; + xmlIO[1].xml = "info.xml" ; + xmlIO[2].xml = "tranq.xml" ; + xmlIO[3].xml = "poll.xml" ; + xmlIO[4].xml = "create.xml"; + xmlIO[5].xml = "renew.xml" ; + xmlIO[6].xml = "update.xml"; + xmlIO[7].xml = "delete.xml"; + xmlIO[8].xml = "transf.xml"; + + + memset(commandArgs,0,sizeof(commandArgs)); } ~mdCommander() {}