Grandstream GXP-2000 User Manual

XML Based Customizable Screen
XML Based Customizable Screen
Rev 1.3
1. Introduction
Starting from release version 1.0.2.X, GXP-2000 supports the idle screen customization. The designs of the displayed information and layout depend highly upon personal preferences and requirements and have since been req uested by various customers for an API to be able to customize the screen.
This document specifies the Grandstream XML Customizable Screen API design that will be used on GXP-2000.
2. How It Works and Configuration
A new set of configuration options will be introduced as fo llowing:
Enable Idle Screen XML Download (P340): NO/YES-HTTP/YES-TFTP
(default NO). Possible values 0 (NO)/1 (HTTP)/2 (TFTP), other values ignored.
Idle Screen XML Server Path (P341): Thi s is a string of up to 128 ch aracters
that should contain a path to the XML file. It MUST be in the host/path format. For example: “directory.grandstream.com/engineering”
The feature will be activated when “Enable Idle Screen XML Download” is set to YES (HTTP or TFTP) AND a valid “Idle Screen XML Server Path” is set.
This feature do es not auto matically download the XML file in th e path even wh en activate d. The following 2 options are added to the Preference LCD GUI subm enu:
Download SCR XML Erase Custom SCR
User shall select Download SCR XML under Preference Keypad men u to start the download process. The phone will attempt to download the gs_screen.xml file specified in “Idle Screen XML Server Path”. Once the XML is successfully downloaded it will be parsed and be effective right away. The file should also be saved for future use. Please note that the Idle Screen file name is fixed, so you can not alter the fil e na me based on you r prefere nce .
www.grandstream.com
XML Based Customizable Screen
3. XML Syntax
The XSD file tells the user what the XML file should look like. User does not need to check the structure of the file manually as this process can be automated. One such websites that does this is: http://www.xmlme.com/Validator.aspx
This paragraph will explain how to u s e t he website mentioned above to do the syntax checking.
1. Clear the XML schema and XML document fields on the website.
2. Copy the lines below to the XSD file into the XML schema field.
3. Copy the user idle screen file into the XML document fi eld on the website.
4. click validate
5. Verify if the validation result is successful. If not, there is structure error in the user
idle screen file.
XSD file
<?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="Screen"> <xsd:complexType> <xsd:sequence> <xsd:element name="IdleScreen" minOccurs="1" maxOccurs="1"> <xsd:complexType> <xsd:sequence> <xsd:element name="ShowStatusLine" type="xsd:boolean" minOccurs="1" maxOccurs="1" default="true"/> <xsd:element name="DisplayBitmap <xsd:complexType> <xsd:sequence> <!-- We only accept Windows Monochrome Bitmap, max 130x64 pixels encoded by base64
--> <xsd:element name="Bitmap" type="xsd:base64Binary" minOccurs="1" maxOccurs="1"/> <xsd:element name="X" type="xsd:integer" minOccurs="1" maxOccurs="1" default="0"/> <xsd:element name="Y" type </xsd:sequence> <xsd:attribute name="a1reg" type="xsd:boolean"/> </xsd:complexType> </xsd:element> <xsd:element name="DisplayString" minOccurs="0" maxOccurs="unbounded" nillable="true"> <xsd:complexType> <xsd:sequence> <xsd:element name="DisplayStr" type="xsd:string" minOccurs="1" <xsd:element name="X" type="xsd:integer" minOccurs="1" maxOccurs="1" default="0"/> <xsd:element name="Y" type="xsd:integer" minOccurs="1" maxOccurs="1" default="0"/> </xsd:sequence> <xsd:attribute name="a1reg" type="xsd:boolean"/> <xsd:attribute name="font"> <xsd:simpleType <xsd:restriction base="xsd:string"> <xsd:enumeration value="f8"/> <xsd:enumeration value="f10"/> <xsd:enumeration value="f13h"/> <xsd:enumeration value="f13b"/> <xsd:enumeration value="f16"/> <xsd:enumeration value="f16b"/> <!-- f18c is a 18 point Comic font --> <xsd:enumeration value="f18c"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="halign"> <xsd:simpleType>
>
" minOccurs="0" maxOccurs="unbounded" nillable="true">
="xsd:integer" minOccurs="1" maxOccurs="1" default="0"/>
maxOccurs="1"/>
www.grandstream.com
XML Based Customizable Screen
<xsd:restriction base="xsd:string"> <xsd:enumeration value="Left"/> <xsd:enumeration value="Center"/> <xsd:enumeration value="Right"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="valign"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Top"/> <xsd:enumeration value="Center"/> <xsd:enumeration value="Bottom"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
>
4. Example Idle Screen File
<?xml version="1.0"?> <!-- This file creates identical result to GXP-2000 default behavior --> <Screen> <IdleScreen> <ShowStatusLine>true</ShowStatusLine> <DisplayString font="f8"> <DisplayStr>$W, $M $d</DisplayStr> <X>0</X> <Y>0</Y> </DisplayString> <DisplayString font="f13h" halign="Center" a1reg="false"> <DisplayStr>$N</DisplayStr> <X>65</X> <Y>12</Y> </ <DisplayString font="f13b" halign="Center" a1reg="true"> <DisplayStr>$N</DisplayStr> <X>65</X> <Y>12</Y> </DisplayString> <DisplayString font="f13h" halign="Center" a1reg="false"> <DisplayStr>$X</DisplayStr> <X>65</X> <Y>26</Y> </DisplayString> <DisplayString font="f13b" <DisplayStr>$X</DisplayStr> <X>65</X> <Y>26</Y> </DisplayString> <DisplayString halign="Center" valign="Bottom"> <DisplayStr>$I</DisplayStr> <X>65</X> <Y>48</Y> </DisplayString> </IdleScreen> </Screen>
DisplayString>
halign="Center" a1reg="true">
5. XML Explanation
www.grandstream.com
Loading...
+ 5 hidden pages