This commit is contained in:
Ren RenJuan 2014-01-18 23:09:39 +00:00
parent 6d22522e75
commit 5207d03fac
3 changed files with 41 additions and 10 deletions

View File

@ -1,6 +1,5 @@
#include <ncurses.h>
#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<n> - make <n> the current command");
mvprintw(12,10," E<n> - display/edit <n> ");
mvprintw(13,10," W<n> - write <n> to the AC watched folder");
mvprintw(13,10," W<n> - write <n> to ./acInputQueue*");
mvprintw(14,10," X<n> - discard ");
mvprintw(15,10," <n> - make <n> 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<letter> - load XSD for 1 above");
mvprintw(21,10," A - load all above");
mvprintw(19,10,"IO");
mvprintw(22,10," v<letter> - vi/xmledit the schema ");
mvprintw(23,10," w<letter> - 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.");

View File

@ -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;
}

View File

@ -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() {}