Avaya Client Services API Reference (OS X)
|
CSSettingsFileParserDelegate is registered as an observer of setting file parser. More...
#import <CSSettingsFileParser.h>
Inherits <NSObjectNSObject>.
Instance Methods | |
(NSString *) | - parser:getVariable: |
Called when the settings file requires the value of a variable. More... | |
(void) | - parser:setVariable:value: |
Called when the settings file specifies a new value for a variable. More... | |
(void) | - parser:requestAdditionalSettingsFile: |
Called when an additional settings file is requested. More... | |
CSSettingsFileParserDelegate is registered as an observer of setting file parser.
- (NSString *) parser: | (CSSettingsFileParser *) | parser | |
getVariable: | (NSString *) | name | |
Called when the settings file requires the value of a variable.
When the parser encounters an statement like:
IF $VARIABLE SEQ 1 GOTO JUMP
This method will be called to retrieve the value of VARIABLE. If the variable exists the value should be returned. If the value does not exist, this method should return nil and the test will be skipped.
parser | The parser object. |
name | The variable name. |
- (void) parser: | (CSSettingsFileParser *) | parser | |
requestAdditionalSettingsFile: | (NSString *) | path | |
Called when an additional settings file is requested.
This method is called for statements like:
GET 46xxsettings.txt
This specifies that parsing of the current settings file should stop and the specified file be parsed instead. However, if the requested file cannot be obtained (for example, does not exist on the server) then parsing of the current file should resume.
To accomplish this an application should attempt to retrieve the requested file and if successful update the data property with the contents of the new file and call parse. If unsuccessful, call continueParse to continue parsing the current buffer.
parser | The parser object. |
path | Relative path to the requested file on the server. |
- (void) parser: | (CSSettingsFileParser *) | parser | |
setVariable: | (NSString *) | name | |
value: | (NSString *) | value | |
Called when the settings file specifies a new value for a variable.
parser | The parser object. |
name | The name of the variable in upper case. |
value | The value of the variable. |