27 lines
882 B
Plaintext
27 lines
882 B
Plaintext
|
1. Parse the first the 2 commands:
|
||
|
(i.e. ADMIN SHOW
|
||
|
VOLUME MANAGE
|
||
|
etc.) Translate the 2 keywords into appropriate subinterface.
|
||
|
|
||
|
2. Next:
|
||
|
take the rest of the commandline,
|
||
|
and separate the switches from the regular arguments.
|
||
|
|
||
|
Compile the switches into a list of 2 LPWSTRS:
|
||
|
1. Switch itself.
|
||
|
2. Argument to the switch (supplied by a colon separator)
|
||
|
|
||
|
Compile the regular arguments into another array
|
||
|
|
||
|
While compiling these - if double quotes appear, the string that is supplied
|
||
|
should be considered as one token delimted by a matching double quote.
|
||
|
Double quotes should be removed however when compiling it into the array.
|
||
|
|
||
|
3. Now validate the switches (duplicates should not be provided,
|
||
|
arguments should be supplied etc.)
|
||
|
|
||
|
4. Now call the appropriate subinterface with the list of switches
|
||
|
and the list of arguments.
|
||
|
|
||
|
5.
|