class AastraXmlApi::PhoneStatus
Public Instance Methods
addEntry(index, message, type=nil, timeout=nil)
click to toggle source
Adds a new status message to be displayed at index. The type can only be nothing (default) or alert which shows the message for 3 seconds. The timeout can override the default 3 seconds for an alert message.
# File lib/aastra_xml_api/phone_status.rb, line 52 def addEntry(index, message, type=nil, timeout=nil) @entries += [PhoneStatusEntry.new(index, message, type, timeout)] end
render()
click to toggle source
Create XML text output.
# File lib/aastra_xml_api/phone_status.rb, line 57 def render xml = "<AastraIPPhoneStatus" xml += " Beep=\"yes\"" if @beep == "yes" xml += " triggerDestroyOnExit=\"yes\"" if @triggerDestroyOnExit == "yes" xml += ">\n" xml += "<Session>#{@session}</Session>\n" @entries.each { |entry| xml += entry.render } xml += "</AastraIPPhoneStatus>\n" return xml end
setSession(session)
click to toggle source
Sets the session associated with this status message. Only important if more than one application is sending status messages.
# File lib/aastra_xml_api/phone_status.rb, line 39 def setSession(session) @session = session end
setTriggerDestroyOnExit()
click to toggle source
When set, the previous user interface XML object is destroyed if its destroyOnExit tag is also set to yes.
# File lib/aastra_xml_api/phone_status.rb, line 45 def setTriggerDestroyOnExit @triggerDestroyOnExit = "yes" end