Class: AastraXmlApi::PhoneExecute

Inherits:
Phone
  • Object
show all
Defined in:
lib/aastra_xml_api/phone_execute.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(url, interruptCall = nil) ⇒ Object

Add a url (action to be performed). If interruptCall is not nil, then then if a dial action is given, the current call will be put on hold. Default behavior is to not allow a current active call to be interrupted.



36
37
38
# File 'lib/aastra_xml_api/phone_execute.rb', line 36

def addEntry(url, interruptCall=nil)
  @entries += [PhoneExecuteEntry.new(url, interruptCall)]
end

#renderObject

Create XML text output.



47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/aastra_xml_api/phone_execute.rb', line 47

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

#setTriggerDestroyOnExitObject

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



42
43
44
# File 'lib/aastra_xml_api/phone_execute.rb', line 42

def setTriggerDestroyOnExit
  @triggerDestroyOnExit = "yes"
end