Class: AastraXmlApi::PhoneTextScreen
- Defined in:
- lib/aastra_xml_api/phone_text_screen.rb
Constant Summary
Constants inherited from Phone
AastraXmlApi::Phone::HIGHASCII
Instance Method Summary collapse
-
#render ⇒ Object
Create XML text output.
-
#setAllowDTMF ⇒ Object
When set allows DTMF tones to be sent while viewing this screen.
-
#setDoneAction(uri) ⇒ Object
Set the URI to be called when done viewing this screen.
-
#setText(text) ⇒ Object
Set the text to be displayed on this screen.
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
#render ⇒ Object
Create XML text output.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/aastra_xml_api/phone_text_screen.rb', line 64 def render xml = "<PhoneTextScreen" 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 += "</PhoneTextScreen>\n" return xml end |
#setAllowDTMF ⇒ Object
When set allows DTMF tones to be sent while viewing this screen.
59 60 61 |
# File 'lib/aastra_xml_api/phone_text_screen.rb', line 59 def setAllowDTMF @allowDTMF = "yes" end |
#setDoneAction(uri) ⇒ Object
Set the URI to be called when done viewing this screen.
54 55 56 |
# File 'lib/aastra_xml_api/phone_text_screen.rb', line 54 def setDoneAction(uri) @doneAction = uri end |
#setText(text) ⇒ Object
Set the text to be displayed on this screen.
49 50 51 |
# File 'lib/aastra_xml_api/phone_text_screen.rb', line 49 def setText(text) @text = text end |