Você está na página 1de 4

1 Getting Started

This API document is intent for Syabas platform development and provide the access to the services available in this platform.

1.1 Request Sample


http://<hostname>:<port>/<module>?arg0=<param0>&arg1=<param1>&......&argn=<paramn>

Field
<hostname> <port> <module> <param{0..n}>

Value
127.0.0.1 8008 system module dependent

Description
Fixed for local server IP address Fixed for local service port number Command module(s) Arguments

Note: Maximun HTTP GET query length: 4095 bytes

1.2 Response Sample


All the responses are formatted in UTF-8 XML as below

1.2.1 Success Response


<?xml version="1.0" encoding="UTF-8" ?> <theDavidBox> <request> <arg0>...</arg0> <arg1>...</arg1> ... <module>system</module> </request> <response> ... </response> <returnValue>0</returnValue> </theDavidBox>

1.2.2 Failed Response


<?xml version="1.0" encoding="UTF-8" ?> <theDavidBox> <response></response> <returnValue>1</returnValue> </theDavidBox>

SDK API Draft

2011 by Syabas Technology Inc.

2 list_key :public
List all available remote control key.

Parameter Description
arg0 Function name

Data Type
String

Request Example
http://<hostname>:<port>/system?arg0=list_key

Success Response Example <?xml version="1.0" encoding="UTF-8" ?> <theDavidBox> <request> <arg0>list_key</arg0> <module>system</module> </request> <response> <key>power</key> <key>filemode</key> <key>up</key> <key>down</key> <key>left</key> <key>right</key> <key>enter</key> <key>menu</key> <key>title</key> <key>info</key> <key>audio</key> <key>angle</key> <key>subtitle</key> <key>play</key> <key>stop</key> <key>pause</key> <key>eject</key> <key>rewind</key> <key>fwd</key> <key>slow</key> <key>repeat</key> <key>prev</key> <key>next</key> <key>pageup</key> <key>pagedown</key> <key>mute</key> <key>one</key> <key>two</key>
SDK API Draft

2011 by Syabas Technology Inc.

<key>three</key> <key>four</key> <key>five</key> <key>six</key> <key>seven</key> <key>eight</key> <key>nine</key> <key>zero</key> <key>caps/num</key> <key>setup</key> <key>delete</key> <key>tvmode</key> <key>source</key> <key>return</key> <key>suspend</key> <key>time seek</key> <key>zoom</key> <key>home</key> <key>red</key> <key>green</key> <key>yellow</key> <key>blue</key> </response> <returnValue>0</returnValue> </theDavidBox> Error Codes The following errors may be returned: 0: Success 1: Fail

SDK API Draft

2011 by Syabas Technology Inc.

3 send_key :public
Send remote control key to command server.

Parameter Description
arg0 arg1 arg2 Function name Any options returns from list_key function above Optional. Specify key receiving module. Possible value: playback photo screen_saver browser flashlite

Data Type
String String String

Request Example
http://<hostname>:<port>/system?arg0=send_key&arg1=power

Success Response Example <?xml version="1.0" encoding="UTF-8" ?> <theDavidBox> <request> <arg0>send_key</arg0> <arg1>power</arg1> <module>system</module> </request> <response> </response> <returnValue>0</returnValue> </theDavidBox> Error Codes The following errors may be returned: 0: Success 1: Fail

SDK API Draft

2011 by Syabas Technology Inc.