Chapter 3 CiscoIPPhone XML Objects

XML Object Definitions

Example

The following XML code defines a CiscoIPPhoneImage object that displays the sequence of pixels shown in Figure 3-3as a graphic positioned at the center of the phone display:

<CiscoIPPhoneImage>

<Title/>

<LocationX>-1</LocationX>

<LocationY>-1</LocationY>

<Width>4</Width>

<Height>1</Height>

<Depth>2</Depth>

<Data>2D</Data>

<Prompt/>

</CiscoIPPhoneImage>

The graphic display comprises a contiguous stream of hexadecimal digits, with no spaces or other separators. If the number of pixels to be displayed does not represent an even multiple of four, pad the end of the pixel data with blank (zero value) pixels, so the data is packed correctly. The phone ignores the padded data.

Tip Before displaying a graphic image on a Cisco Unified IP Phone, the software clears the pane dedicated to services. If a service has text or other information that must be preserved (including the title area), the information must get redrawn as part of the graphic. If the title is to be hidden, the graphic must be large enough to cover it.

CiscoIPPhoneImageFile

The latest generation of Cisco Unified IP Phones have higher-resolution displays with more color depth. The Cisco Unified IP Phone 7970G, for example, has a display area of 298x168 pixels available to the Services pane and renders images in 12-bit color.

To support these more advanced displays, a new XML object allows the use of color PNG images in addition to the grayscale CiscoIPPhoneImage objects. The CiscoIPPhoneImageFile object behaves like the CiscoIPPhoneImage object, except for the image data. Instead of using the <Data> tag to embed the image data, the <URL> tag points to the PNG image file.

The web server must deliver the PNG image to the phone with an appropriate MIME Content-Type header, such as image/png, so the phone recognizes the content as a compressed, binary PNG image. The PNG image can be either palettized or RGB, and the maximum image size and color depth are model dependent (see Table 3-2).

Table 3-2

Cisco Unified IP Phones Display Image Sizes and Color Depths

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Resolution1

Color/Grayscale

 

 

 

 

 

 

Model

 

(width x height)

/Monochrome

Color Depth (bits)

 

 

 

 

 

 

 

 

 

 

Cisco Unified IP Phones 7905G, 7906G,

N/A

Grayscale

1

 

 

 

 

 

7911G, 7912G2, 7931G

 

 

 

 

 

 

 

 

Cisco Unified IP Phone 7920

128 x 59

Grayscale

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Cisco Unified IP Phone 7921G, 7925G

176 x 140

Color

16

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Cisco Unified IP Phones 7940G/60G

133 x 65

Grayscale

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Cisco Unified IP Phones 7941G, 7941G-GE,

298 x 144

Grayscale

4

 

 

 

 

 

7942G, 7961G, 7961G-GE, 7962G

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Cisco Unified IP Phone Services Application Development Notes

 

 

 

 

 

 

 

OL-20949-01

 

 

 

 

 

 

3-9

 

 

 

 

 

 

 

 

 

Page 27
Image 27
Cisco Systems OL-20949-01 manual CiscoIPPhoneImageFile, Example, Resolution1, Model, Monochrome Color Depth bits