OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

cliengine.c
This file contains method definition for processing CLI commands.
Return Type Method Summary
void AppendObjectAttributeUsage(CommandObject *objectAtt, StringBuffer **strBuf, INT32 level)
             Append object Attibute usage sting to string buffer.
CHAR* CLICompleteFormatTabString(CLIScroll **cliscrollPtr, CHAR *searchStr, CHAR **completeStr, CHAR **list, INT32 noOfList, U_CHAR mode, U_CHAR *status)
             Format response tab string.
CLIMessage* CLIEngineForCharacter(CLIMessage *cliMesgPtr, U_CHAR *status)
             Parse the message to the parser ,Calls the corresponding action command method and formats the output Message.
CLIMessage* CLIEngineForString(CLIMessage **cliMesgPtr, U_CHAR *status)
             Parse the message to the parser ,Calls the corresponding action command method and formats the output Message.
U_CHAR CheckAndExit(CLIMessage *cliMesgPtr, CLIMessage **cliResMesgPtr, U_CHAR *errorStatus)
             It will check the given input message key is exit or not.
void CheckCommandRegGroup(CLIMessage *cliMesgPtr, U_CHAR access, U_CHAR *errorStatus)
             It will Check the given input message key is valid for Command group key.
U_CHAR CheckPreviousMenuAndExitMenu(CLIMessage *cliMesgPtr, CLIMessage **cliResMesgPtr, U_CHAR *errorStatus)
             It will check the given input message key is Valid for Previous Action key.
U_CHAR CheckPwd(CLIMessage *cliMesgPtr, U_CHAR *errorStatus)
             Checking input message is Current Working directory or not.
U_CHAR CheckRoleBasedSecurity(CHAR *userName , CHAR *command)
             It will check the given userId is valid for access the given commandReg.
CHAR* CompleteCommandTabKey(ClientSession *clientSesPtr, CHAR **completeStr, U_CHAR *status)
             It will create a complete Format command string.
void ExitFromSession(INT32 sessionID, U_CHAR *errorStatus)
             Delete client Session from the ServerSession if the session is not craft.
CHAR* GetAllCommand()
             Get all Reg command and format all command to display.
CHAR* *GetCommandList(ClientSession *clientSesPtr, INT32 *noOfList)
             It willl create a array list of command which the command are register.
U_CHAR* GetCommandUsage(CLICommandReg *refCommandReg)
             The funciton will create command usage string for the given commandReg.
CHAR GetOptionParamUsage(OptionParameterReg *optParamReg, StringBuffer *strBuf)
             Append optionparam usage sting to the sting buffer.
CHAR* *GetSubCommands(ClientSession *clientSesPtr, INT32 *noOfList, CHAR **tempStr)
             It will create an array list of sub commands of the command specified.
CLIMessage* ReadCommandAttribute(CLIMessage *cliMesgPtr, void *infoPtr, INT32 *index, U_CHAR *access)
             Read Attribute Value for the given mesgptr key.
CLIMessage* SetCommandAttribute(CLIMessage *cliMesgPtr, void *infoPtr, INT32 *index, U_CHAR *access)
             It will Set the command attribute value.
U_CHAR ValidPrivillege(CLICommandReg *cmdReg, CHAR *userID)
             It will check the given userId is valid for access the given commandReg.
   
Method Details

AppendObjectAttributeUsage

void AppendObjectAttributeUsage(CommandObject *objectAtt,StringBuffer **strBuf,INT32 level)

Append object Attibute usage sting to string buffer.

Arguments:
1.Reference of the objectAttibute.
2.Reference of the StringBuffer.
3.Level of the object.
Return type:
Nothing.
Bugs:
Bugs :

CLICompleteFormatTabString()

CHAR* CLICompleteFormatTabString(CLIScroll **cliscrollPtr,CHAR *searchStr,CHAR **completeStr,CHAR **list,INT32 noOfList,U_CHAR mode,U_CHAR *status)

Format response tab string.

Arguments:
1.Reference of the ScrollPtr.
2.Search String.
3.Reference of complete Str.
4.Array list of command.
5.count list.
6.Execution Mode.
7.Reference of errorStatus.
Return type:
Returns a complete tab string.
Bugs:
Bugs :

CLIEngineForCharacter().

CLIMessage* CLIEngineForCharacter(CLIMessage *cliMesgPtr,U_CHAR *status)

Parse the message to the parser ,Calls the corresponding action command method and formats the output Message. -1 default value (CLI_DEFAULT) {0.1.} index value -2 Exit operation (CLI_EXIT)

Arguments:
1. Reference of the Received Input Command Message.
2. Reference of the errorStatus.
Return type:
Returns CLI Reponse Message.
Bugs:
Bugs :

CLIEngineForString

CLIMessage* CLIEngineForString(CLIMessage **cliMesgPtr,U_CHAR *status)

Parse the message to the parser ,Calls the corresponding action command method and formats the output Message.

Arguments:
1. Reference of cliMessage.
2. Reference of errorStatus.
Return type:
Returns CLI Response Message.
Bugs:
Bugs :

CheckAndExit

U_CHAR CheckAndExit(CLIMessage *cliMesgPtr,CLIMessage **cliResMesgPtr,U_CHAR *errorStatus)

It will check the given input message key is exit or not.

Arguments:
1. Reference of the cli Message.
2. Reference of the cli Response Message.
3. Reference of errorStatus.
Return type:
SUCCESS/FAILURE
Bugs:
Bugs :

CheckCommandRegGroup().

void CheckCommandRegGroup(CLIMessage *cliMesgPtr,U_CHAR access,U_CHAR *errorStatus)

It will Check the given input message key is valid for Command group key.

Arguments:
1. Reference of the CLI Message.
2. access (SET /UNSET).
3. Reference of errorStatus.
Return type:
SUCCESS/FAILURE
Bugs:
Bugs :

CheckPreviousMenuAndExitMenu

U_CHAR CheckPreviousMenuAndExitMenu(CLIMessage *cliMesgPtr,CLIMessage **cliResMesgPtr,U_CHAR *errorStatus)

It will check the given input message key is Valid for Previous Action key.

Arguments:
1. Reference of the CLI Message.
2. Reference of the CLI Response Message.
3. Reference of errorStatus.
Return type:
SUCCESS/FAILURE
Bugs:
Bugs :

CheckPwd

U_CHAR CheckPwd(CLIMessage *cliMesgPtr,U_CHAR *errorStatus)

Checking input message is Current Working directory or not.

Arguments:
1. Reference of the Received Input Command Message.
2. Reference of errorStatus.
Return type:
SUCCESS/FAILURE
Bugs:
Bugs :

CheckRoleBasedSecurity()

U_CHAR CheckRoleBasedSecurity(CHAR *userName ,CHAR *command)

It will check the given userId is valid for access the given commandReg.

Arguments:
1. Reference the login userid.
2. Reference the Received Input Command.
Return type:
SUCCESS/FAILURE
Bugs:
Bugs :

CompleteCommandTabKey()

CHAR* CompleteCommandTabKey(ClientSession *clientSesPtr,CHAR **completeStr,U_CHAR *status)

It will create a complete Format command string.

Arguments:
1.Reference of clientSesPtr.
2.Reference of complete String.
3.Reference of errorStatus.
Return type:
Returns complete format command string.
Bugs:
Bugs :

ExitFromSession

void ExitFromSession(INT32 sessionID,U_CHAR *errorStatus)

Delete client Session from the ServerSession if the session is not craft.

Arguments:
1. SessionID (IN).
: 2. Error Status (OUT).
Return type:
No.
Bugs:
Bugs :

GetAllCommand()

CHAR* GetAllCommand()

Get all Reg command and format all command to display.

Arguments:
Nothing.
Return type:
Returns a command stirng.
Bugs:
Bugs :

GetCommandList()

CHAR* *GetCommandList(ClientSession *clientSesPtr, INT32 *noOfList)

It willl create a array list of command which the command are register.

Arguments:
1.Reference of clientSesPtr.
2.Reference of count list.
Return type:
Returns Array list of command.
Bugs:
Bugs :

GetCommandUsage().

U_CHAR* GetCommandUsage(CLICommandReg *refCommandReg)

The funciton will create command usage string for the given commandReg.

Arguments:
1. Reference to commandReg.
Return type:
Returns command usage string.
Bugs:
Bugs :

GetOptionParamUsage().

CHAR GetOptionParamUsage(OptionParameterReg *optParamReg,StringBuffer *strBuf)

Append optionparam usage sting to the sting buffer.

Arguments:
1. Reference of optional Param Reg.
2. Reference of StringBuffer.
Return type:
SUCCESS/FAILURE
Bugs:
Bugs :

GetSubCommands()

CHAR* *GetSubCommands(ClientSession *clientSesPtr, INT32 *noOfList,CHAR **tempStr)

It will create an array list of sub commands of the command specified.

Arguments:
1.Reference of clientSesPtr.
2.Reference of count list.
3.Reference of SearchStr.
Return type:
Returns Array list of command.
Bugs:
Bugs :

ReadCommandAttribute

CLIMessage* ReadCommandAttribute(CLIMessage *cliMesgPtr,void *infoPtr,INT32 *index,U_CHAR *access)

Read Attribute Value for the given mesgptr key.

Arguments:
1.Reference of the mesgptr.
2.Reference of the infoPtr.
3.Reference of the index of the attribute.
4.Reference of the access(WRITE /READ).
Return type:
Returns cli Response Message.
Bugs:
Bugs :

SetCommandAttribute

CLIMessage* SetCommandAttribute(CLIMessage *cliMesgPtr,void *infoPtr,INT32 *index,U_CHAR *access)

It will Set the command attribute value.

Arguments:
1.Reference of the mesgptr.
2.Reference of the infoPtr.
3.Reference of the index of the attribute.
4.Reference of the access(WRITE /READ).
Return type:
Reurns the response cliMessage.
Bugs:
Bugs :

ValidPrivillege()

U_CHAR ValidPrivillege(CLICommandReg *cmdReg,CHAR *userID)

It will check the given userId is valid for access the given commandReg.

Arguments:
1.Reference the Received Input Command.
2.Reference the login userid.
Return type:
SUCCESS/FAILURE
Bugs:
Bugs :


OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

Copyright (c) 2009 ZOHO Corp. All Rights Reserved.