class AastraXmlApi::PhoneTextScreen

Public Instance Methods

render() click to toggle source

Create XML text output.

# File lib/aastra_xml_api/phone_text_screen.rb, line 64
def render
  xml = "<AastraIPPhoneTextScreen"
  xml += " destroyOnExit=\"yes\"" if @destroyOnExit == "yes"
  xml += " cancelAction=\"#{escape(@cancelAction)}\"" if not @cancelAction.nil?
  xml += " doneAction=\"#{escape(@doneAction)}\"" if not @doneAction.nil?
  xml += " Beep=\"yes\"" if @beep == "yes"
  xml += " Timeout=\"#{@timeout}\"" if @timeout != 0
  xml += " LockIn=\"yes\"" if @lockin == "yes"
  xml += " allowAnswer=\"yes\"" if @allowAnswer == "yes"
  xml += " allowDTMF=\"yes\"" if @allowDTMF == "yes"
  xml += ">\n"
  if not @title.nil? then
    xml += "<Title"
    xml += " wrap=\"yes\"" if @title_wrap == "yes"
    xml += ">#{escape(@title)}</Title>\n"
  end
  xml += "<Text>#{escape(@text)}</Text>\n"
  @softkeys.each { |softkey| xml += softkey.render }
  iconList = 0
  @icons.each do |icon|
    if iconList == 0 then
      xml += "<IconList>\n"
      iconList = 1
    end
    xml += icon.render
  end
  xml += "</IconList>\n" if iconList != 0
  xml += "</AastraIPPhoneTextScreen>\n"
  return xml
end
setAllowDTMF() click to toggle source

When set allows DTMF tones to be sent while viewing this screen.

# File lib/aastra_xml_api/phone_text_screen.rb, line 59
def setAllowDTMF
  @allowDTMF = "yes"
end
setDoneAction(uri) click to toggle source

Set the URI to be called when done viewing this screen.

# File lib/aastra_xml_api/phone_text_screen.rb, line 54
def setDoneAction(uri)
  @doneAction = uri
end
setText(text) click to toggle source

Set the text to be displayed on this screen.

# File lib/aastra_xml_api/phone_text_screen.rb, line 49
def setText(text)
  @text = text
end