class AastraXmlApi::PhoneFormattedTextScreen
Public Instance Methods
addLine(text, size=nil, align=nil)
click to toggle source
Add a line of formatted text. size can only be ‘normal’ (default) or ‘double’. align can be one of ‘left’ (default), ‘center’, or ‘right’.
# File lib/aastra_xml_api/phone_formatted_text_screen.rb, line 55 def addLine(text, size=nil, align=nil) @entries += [PhoneFormattedTextScreenEntry.new(text, size, align, 'normal')] end
render()
click to toggle source
Create XML text output.
# File lib/aastra_xml_api/phone_formatted_text_screen.rb, line 83 def render out = "<AastraIPPhoneFormattedTextScreen" out += " destroyOnExit=\"yes\"" if @destroyOnExit == "yes" if not @cancelAction.nil? then cancelAction = escape(@cancelAction) out += " cancelAction=\"#{cancelAction}\"" end if not @doneAction.nil? then doneAction = escape(@doneAction) out += " doneAction=\"#{doneAction}\"" end out += " Beep=\"yes\"" if @beep == "yes" out += " LockIn=\"yes\"" if @lockin == "yes" out += " allowAnswer=\"yes\"" if @allowAnswer == "yes" out += " Timeout=\"#{@timeout}\"" if @timeout != 0 out += " allowDTMF=\"#{yes}\"" if @allowDTMF == "yes" out += ">\n" @entries.each do |entry| out += entry.render end @softkeys.each do |softkey| out += softkey.render end iconList = 0 @icons.each do |icon| if iconList == 0 then out += "<IconList>\n" iconList = 1 end out += icon.render end out += "</IconList>\n" if iconList != 0 out += "</AastraIPPhoneFormattedTextScreen>\n" return out end
setAllowDTMF()
click to toggle source
Allows keypad strokes to generate DTMF when a call is in progress while this object is displayed.
# File lib/aastra_xml_api/phone_formatted_text_screen.rb, line 78 def setAllowDTMF @allowDTMF = "yes" end
setDoneAction(uri)
click to toggle source
Defines URI to call when the user selects the ‘Done’ softkey.
# File lib/aastra_xml_api/phone_formatted_text_screen.rb, line 72 def setDoneAction(uri) @doneAction = uri end
setScrollEnd()
click to toggle source
Sets the end of a scrolling section on the display.
# File lib/aastra_xml_api/phone_formatted_text_screen.rb, line 67 def setScrollEnd @entries += [PhoneFormattedTextScreenEntry.new(nil, nil, nil, 'scrollend')] end
setScrollStart(height=nil)
click to toggle source
Starts the beginning of a scrolling section on the display. If height is not given, then all available space is used to display the scrolling section. Otherwise, height cannot be bigger than 2.
# File lib/aastra_xml_api/phone_formatted_text_screen.rb, line 62 def setScrollStart(height=nil) @entries += [PhoneFormattedTextScreenEntry.new(nil, height, nil, 'scrollstart')] end