File Name
Syntax
AppendOriginalBodyToOutput(REF commandData:SingleCommandRec, REF target:STRING );
Parameters
commandData - the command description block
Returns
Nothing
Side Effects
None
Description
This routine appends the original message body (if there is one) to the output field.
Dialog Forms Called
None
File Name
Syntax
CleanupMessage( REF msg:STRING );
Parameters
msg - new message content
Returns
Nothing
Side Effects
None
Description
This function scans a message for "bad characters" and replaces each occurrence with a blank character.
Dialog Forms Called
None
File Name
Syntax
CleanupUserReply( REF msg:STRING );
Parameters
str - string content
Returns
The modified input string
Side Effects
None
Description
This function scans a string for embedded "sentinel" text that indicates the beginning and end of the original user message. All text other than the original message is deleted.
Dialog Forms Called
None
File Name
Syntax
CLIBuildAlternateBody(REF commandData:SingleCommandRec,
Parameters
commandData - the command description block
Returns
Nothing
Side Effects
None
Description
This routine builds the message for the alternateBody field which becomes the main message when an attachment is sent (the outputBody becomes the attachment).
Dialog Forms Called
None
File Name
Syntax
CLIExecuteCommand( REF commandblock:CLIDataRec);
Parameters
commandBlock - block containing all user input
Essentially, the caller should fill in the command body sections; all others
will be reset here.
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user to register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs the execution of the command already parsed into this command block. You should call this function even if the ParseCommand function returned an error code.
Dialog Forms Called
None
File Name
Syntax
CLIInitialize( REF commandblock:CLIDataRec);
Parameters
commandBlock - block containing all user input
Returns
1 = success
0 = failure
Side Effects
None
Description
This routine performs initialization of the data structure to be used as the master command structure.
Dialog Forms Called
None
File Name
Syntax
CLIParseCommand( REF commandblock:CLIDataRec);
Parameters
commandBlock - block containing all user input
Essentially, the caller should fill in the command body sections; all others
will be reset here.
Returns
1 = success
CLI_ERR_USER_INPUT = some kind of user input error
Side Effects
None
Description
This routine performs general parsing of the command string as it exists in the command block.
Dialog Forms Called
None
File Name
Syntax
CLIProcessBrowseHelp(REF commandData:SingleCommandRec, VAL operation:INTEGER);
Parameters
commandData - the command description block
operation - operation to perform: PARSE, EXECUTE, HELP
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user to register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs all processing for Help.
Dialog Forms Called
None
File Name
Syntax
CLIProcessBrowseProb(REF commandData:SingleCommandRec, VAL operation:INTEGER);
Parameters
commandData - the command description block
operation - operation to perform: PARSE, EXECUTE, HELP
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user to register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs all processing for the Browse Problem user command.
Dialog Forms Called
None
File Name
Syntax
CLIProcessBrowseSoln(REF commandData:SingleCommandRec, VAL operation:INTEGER);
Parameters
commandData - the command description block
operation - op to perform: PARSE, EXECUTE, HELP
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user to register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs all processing for the Browse Solution user command.
Dialog Forms Called
None
File Name
Syntax
CLIProcessComment(REF commandData:SingleCommandRec, VAL operation:INTEGER);
Parameters
commandData - the command description block
operation- operation to perform: PARSE, EXECUTE, HELP
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user to register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs all processing for the Submit Comment user command.
Dialog Forms Called
None
File Name
Syntax
CLIProcessDiagnoseProb(REF commandData:SingleCommandRec, VAL operation:INTEGER);
Parameters
commandData - the command description block
operation - operation to perform: PARSE, EXECUTE, HELP
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs all processing for the Diagnose Problem user command.
Dialog Forms Called
None
File Name
Syntax
CLIProcessSubmitProb(REF commandData:SingleCommandRec, VAL operation:INTEGER);
Parameters
commandData - the command description block
operation - operation to perform: PARSE, EXECUTE, HELP
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user to register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs all processing for the Submit Problem user command.
Dialog Forms Called
None
File Name
Syntax
CLIProcessUpdateProb(REF commandData:SingleCommandRec, VAL operation:INTEGER);
Parameters
commandData - the command description block
operation - operation to perform: PARSE, EXECUTE, HELP
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs all processing for the Update Problem user command.
Dialog Forms Called
None
File Name
Syntax
CLIProcessUseSoln(REF commandData:SingleCommandRec, VAL operation:INTEGER);
Parameters
commandData - the command description block
operation - operation to perform: PARSE, EXECUTE, HELP
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user to register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs all processing for the Use Solution user command.
Dialog Forms Called
None
File Name
Syntax
CLIProcessViewProb(REF commandData:SingleCommandRec, VAL operation:INTEGER);
Parameters
commandData - the command description block
operation - operation to perform: PARSE, EXECUTE, HELP
Returns
1 = success
CLI_ERR_USER_INPUT - some kind of user input error
CLI_ERR_USER_NOT_REGISTERED - command required user register
ERR_NONFATAL - a non-fatal execution error occurred
ERR_FATAL - a fatal execution error occurred
CLI_ERR_INTERNAL - an internal error occurred
Side Effects
None
Description
This routine performs all processing for the View Problem user command.
Dialog Forms Called
None
File Name
Syntax
CLIShutDown;
Parameters
None
Returns
1 = success
-n = failure: return codes from TerminateADL
Side Effects
None
Description
This routine performs final shutdown operations. The call to this routine should be the last line of your main program.
Dialog Forms Called
None
File Name
Syntax
CLITest( VAL args:LIST OF STRING);
Parameters
args - command line argument list
Returns
None
Side Effects
None
Description
This routine is the interactive test for this module.
Dialog Forms Called
None
File Name
Syntax
ModuleTestEventHandler( REF eventData: CLIDataRec);
Parameters
eventData - instance data for this dialog box type
Returns
1 = success
0 = failure
Side Effects
None
Description
This routine updates the screen.
Dialog Forms Called
None
File Name
Syntax
ParseNextAsNoun(REF commandData:SingleCommandRec);
Parameters
commandData - block containing all user input
Returns
>0 = success
0 = there was nothing to parse (end of string?)
-1 = unrecongnized noun
Side Effects
None
Description
This routine determines which command noun was entered.
Dialog Forms Called
None
File Name
Syntax
ParseNextAsVerb(REF commandData:SingleCommandRec);
Parameters
commandData - block containing all user input
Returns
>0 = success
0 = there was nothing to parse (end of string?)
-1 = unrecongnized noun
Side Effects
None
Description
This routine determines which command verb was entered.
Dialog Forms Called
None
File Name
Syntax
ParseRemainder(REF commandData:SingleCommandRec, VAL operation:INTEGER );
Parameters
commandData - block containing all user input
operation - operation code for CLIProcessXxxx
Returns
>0 = success
-1 = unable to parse noun
-n = any error code from CLIProcessXxxx routine.
Side Effects
The .errorCode and .outputBody fields will be set in arg1
Description
This routine finishes the parsing beyond the command verb. Because some verbs take arguments and some do not, this routine dispatches to the parsing routine for the various verb types.
Dialog Forms Called
None
File Name
Syntax
RefreshTestFields( VAL dlgWindow:WINDOW, REF eventData: SingleCommandRec );
Parameters
eventData - instance data for this dialog box type
Returns
1 = success
0 = failure
Side Effects
None
Description
This routine updates the screen.
Dialog Forms Called
None