class AastraXmlApi::PhoneSoftkeyEntry

Public Class Methods

new(index, label, uri, icon) click to toggle source

Create new softkey entry at index showing on screen with label. When pressed will call URI. Next to the label text the given icon will be shown.

# File lib/aastra_xml_api/phone_softkey_entry.rb, line 21
def initialize(index, label, uri, icon)
  @index = index
  @label = label
  @uri = uri
  @icon = icon
end

Public Instance Methods

render() click to toggle source

Create XML text output for this entry.

# File lib/aastra_xml_api/phone_softkey_entry.rb, line 29
def render
  xml = "<SoftKey index=\"#{@index}\""
  xml += " icon=\"#{@icon}\"" if not @icon.nil?
  xml += ">\n"
  xml += "<Label>#{@label}</Label>\n"
  xml += "<URI>#{@uri}</URI>\n"
  xml += "</SoftKey>\n"
  return xml
end