Class: AastraXmlApi::PhoneConfiguration

Inherits:
Phone
  • Object
show all
Defined in:
lib/aastra_xml_api/phone_configuration.rb

Constant Summary

Constants inherited from Phone

AastraXmlApi::Phone::HIGHASCII

Instance Method Summary collapse

Methods inherited from Phone

#addIcon, #addSoftkey, #convert_high_ascii, #escape, #getRefreshTimeout, #getRefreshURL, #initialize, #setAllowAnswer, #setBeep, #setCancelAction, #setDestroyOnExit, #setLockIn, #setRefresh, #setTimeout, #setTitle, #setTitleWrap

Constructor Details

This class inherits a constructor from AastraXmlApi::Phone

Instance Method Details

#addEntry(parameter, value) ⇒ Object

Adds a parameter and value entry to the list.



33
34
35
# File 'lib/aastra_xml_api/phone_configuration.rb', line 33

def addEntry(parameter, value)
  @entries += [PhoneConfigurationEntry.new(parameter, value)]
end

#renderObject

Create XML text output.



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/aastra_xml_api/phone_configuration.rb', line 44

def render
  out = "<AastraIPPhoneConfiguration"
  out += " Beep=\"yes\"" if @beep == "yes"
  out += " triggerDestroyOnExit=\"yes\"" if @triggerDestroyOnExit == "yes"
  out += ">\n"
  @entries.each do |entry|
    out += entry.render
  end
  out += "</AastraIPPhoneConfiguration>\n"
  return out
end

#setTriggerDestroyOnExitObject

When set, the previous user interface XML object is destroyed if its destroyOnExit tag is also set to yes.



39
40
41
# File 'lib/aastra_xml_api/phone_configuration.rb', line 39

def setTriggerDestroyOnExit
  @triggerDestroyOnExit = "yes"
end