3.3.1 SP3 version.
This commit is contained in:
@ -1,24 +1,31 @@
|
||||
<?php
|
||||
|
||||
########################################################################################################
|
||||
# Aastra XML API Classes - AastraIPPhoneStatus
|
||||
# Copyright Aastra Telecom 2007
|
||||
# Copyright Aastra Telecom 2006-2010
|
||||
#
|
||||
# AastraIPPhoneStatus object.
|
||||
#
|
||||
# Public methods
|
||||
#
|
||||
# Inherited from AastraIPPhone
|
||||
# output() to display the object
|
||||
# generate() to return the object content
|
||||
# setBeep() to enable a notification beep with the object (optional)
|
||||
# setEncodingUTF8() to change encoding from default ISO-8859-1 to UTF-8 (optional)
|
||||
# generate() to return the generated XML for the object
|
||||
# output(flush) to display the object
|
||||
# @flush boolean optional, output buffer to be flushed out or not.
|
||||
#
|
||||
# Specific to the object
|
||||
# setSession(session) to setup the session ID
|
||||
# setTriggerDestroyOnExit() to set the triggerDestroyOnExit tag to
|
||||
# "yes" (optional)
|
||||
# addEntry(index,message,type,timeout) to add a message to be displayed
|
||||
# on the idle screen.
|
||||
# @session string
|
||||
# setTriggerDestroyOnExit() to set the triggerDestroyOnExit tag to "yes" (optional)
|
||||
# addEntry(index,message,type,timeout,uri,icon,color) to add a message to be displayed on the idle screen.
|
||||
# @index integer
|
||||
# @message string
|
||||
# @type enum ("alert","icon") optional
|
||||
# @timeout integer (seconds) optional
|
||||
# @uri uri to call when message/alert pressed optional, only for 6739i
|
||||
# @icon icon index 6739i only, optional
|
||||
# @color label color, 6739i only, optional
|
||||
#
|
||||
# Example
|
||||
# require_once('AastraIPPhoneStatus.class.php');
|
||||
@ -48,21 +55,55 @@ class AastraIPPhoneStatus extends AastraIPPhone {
|
||||
$this->_triggerDestroyOnExit="yes";
|
||||
}
|
||||
|
||||
function addEntry($index, $message, $type='', $timeout=NULL)
|
||||
function addEntry($index, $message, $type='', $timeout=NULL, $uri='', $icon=0, $color='')
|
||||
{
|
||||
$this->_entries[] = new AastraIPPhoneStatusEntry($index, $message, $type, $timeout);
|
||||
$this->_entries[] = new AastraIPPhoneStatusEntry($index, $message, $type, $timeout, $uri, $icon, $color);
|
||||
}
|
||||
|
||||
function render()
|
||||
{
|
||||
$session = $this->escape($this->_session);
|
||||
# Beginning of root tag
|
||||
$out = "<AastraIPPhoneStatus";
|
||||
|
||||
# Beep
|
||||
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
|
||||
|
||||
# TriggerDestroyOnExit
|
||||
if($this->_triggerDestroyOnExit=='yes') $out .= " triggerDestroyOnExit=\"yes\"";
|
||||
|
||||
# End of root tag
|
||||
$out .= ">\n";
|
||||
|
||||
# Session
|
||||
$session = $this->escape($this->_session);
|
||||
$out .= "<Session>".$session."</Session>\n";
|
||||
foreach ($this->_entries as $entry) $out .= $entry->render();
|
||||
|
||||
# Status Items
|
||||
if (isset($this->_entries) && is_array($this->_entries))
|
||||
{
|
||||
foreach ($this->_entries as $entry) $out .= $entry->render();
|
||||
}
|
||||
|
||||
# Icons
|
||||
if (isset($this->_icons) && is_array($this->_icons))
|
||||
{
|
||||
$IconList=False;
|
||||
foreach ($this->_icons as $icon)
|
||||
{
|
||||
if(!$IconList)
|
||||
{
|
||||
$out .= "<IconList>\n";
|
||||
$IconList=True;
|
||||
}
|
||||
$out .= $icon->render();
|
||||
}
|
||||
if($IconList) $out .= "</IconList>\n";
|
||||
}
|
||||
|
||||
# End tag
|
||||
$out .= "</AastraIPPhoneStatus>\n";
|
||||
|
||||
# Return XML object
|
||||
return($out);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user