XBMC Event Client Class.
More...
|
class | PingThread |
| Implements a PingThread which tells XBMC EventServer that the Client is alive (this should be done at least every 60 seconds!
|
|
|
| XBMCClient (InetAddress hostAddress, int hostPort, String deviceName, String iconFile) throws IOException |
| Starts a XBMC EventClient. More...
|
|
| XBMCClient (InetAddress hostAddress, int hostPort, String deviceName, byte iconType, byte[] iconData) throws IOException |
| Starts a XBMC EventClient. More...
|
|
| XBMCClient (InetAddress hostAddress, int hostPort, String deviceName) throws IOException |
| Starts a XBMC EventClient without an icon. More...
|
|
void | stopClient () throws IOException |
| Stops the XBMC EventClient (especially the Ping-Thread) More...
|
|
void | sendNotification (String title, String message) throws IOException |
| Displays a notification window in XBMC. More...
|
|
void | sendButton (short code, boolean repeat, boolean down, boolean queue, short amount, byte axis) throws IOException |
| Sends a Button event. More...
|
|
void | sendButton (String map_name, String button_name, boolean repeat, boolean down, boolean queue, short amount, byte axis) throws IOException |
| Sends a Button event. More...
|
|
void | sendMouse (int x, int y) throws IOException |
| Sets the mouse position in XBMC. More...
|
|
void | ping () throws IOException |
| Sends a ping to the XBMC EventServer. More...
|
|
void | sendLog (byte loglevel, String logmessage) throws IOException |
| Tells XBMC to log the message to xbmc.log with the loglevel as specified. More...
|
|
void | sendAction (String actionmessage) throws IOException |
| Tells XBMC to do the action specified, based on the type it knows were it needs to be sent. More...
|
|
XBMC Event Client Class.
Implements an XBMC-Client. This class can be used to implement your own application which should act as a Input device for XBMC. Also starts a Ping-Thread, which tells the XBMC EventServer that the client is alive. Therefore if you close your application you SHOULD call stopClient()!
- Author
- Stefan Agner
◆ XBMCClient() [1/3]
org.xbmc.eventclient.XBMCClient.XBMCClient |
( |
InetAddress |
hostAddress, |
|
|
int |
hostPort, |
|
|
String |
deviceName, |
|
|
String |
iconFile |
|
) |
| throws IOException |
|
inline |
Starts a XBMC EventClient.
- Parameters
-
hostAddress | Address of the Host running XBMC |
hostPort | Port of the Host running XBMC (default 9777) |
deviceName | Name of the Device |
iconFile | Path to the Iconfile (PNG, JPEG or GIF) |
- Exceptions
-
◆ XBMCClient() [2/3]
org.xbmc.eventclient.XBMCClient.XBMCClient |
( |
InetAddress |
hostAddress, |
|
|
int |
hostPort, |
|
|
String |
deviceName, |
|
|
byte |
iconType, |
|
|
byte [] |
iconData |
|
) |
| throws IOException |
|
inline |
Starts a XBMC EventClient.
- Parameters
-
hostAddress | Address of the Host running XBMC |
hostPort | Port of the Host running XBMC (default 9777) |
deviceName | Name of the Device |
iconType | Type of the icon file (see Packet.ICON_PNG, Packet.ICON_JPEG or Packet.ICON_GIF) |
iconData | The icon itself as a Byte-Array |
- Exceptions
-
◆ XBMCClient() [3/3]
org.xbmc.eventclient.XBMCClient.XBMCClient |
( |
InetAddress |
hostAddress, |
|
|
int |
hostPort, |
|
|
String |
deviceName |
|
) |
| throws IOException |
|
inline |
Starts a XBMC EventClient without an icon.
- Parameters
-
hostAddress | Address of the Host running XBMC |
hostPort | Port of the Host running XBMC (default 9777) |
deviceName | Name of the Device |
- Exceptions
-
◆ ping()
void org.xbmc.eventclient.XBMCClient.ping |
( |
| ) |
throws IOException |
|
inline |
Sends a ping to the XBMC EventServer.
- Exceptions
-
◆ sendAction()
void org.xbmc.eventclient.XBMCClient.sendAction |
( |
String |
actionmessage | ) |
throws IOException |
|
inline |
Tells XBMC to do the action specified, based on the type it knows were it needs to be sent.
- Parameters
-
actionmessage | Actionmessage (as in scripting/skinning) |
◆ sendButton() [1/2]
void org.xbmc.eventclient.XBMCClient.sendButton |
( |
short |
code, |
|
|
boolean |
repeat, |
|
|
boolean |
down, |
|
|
boolean |
queue, |
|
|
short |
amount, |
|
|
byte |
axis |
|
) |
| throws IOException |
|
inline |
Sends a Button event.
- Parameters
-
code | raw button code (default: 0) |
repeat | this key press should repeat until released (default: 1) Note that queued pressed cannot repeat. |
down | if this is 1, it implies a press event, 0 implies a release event. (default: 1) |
queue | a queued key press means that the button event is executed just once after which the next key press is processed. It can be used for macros. Currently there is no support for time delays between queued presses. (default: 0) |
amount | unimplemented for now; in the future it will be used for specifying magnitude of analog key press events |
axis | |
◆ sendButton() [2/2]
void org.xbmc.eventclient.XBMCClient.sendButton |
( |
String |
map_name, |
|
|
String |
button_name, |
|
|
boolean |
repeat, |
|
|
boolean |
down, |
|
|
boolean |
queue, |
|
|
short |
amount, |
|
|
byte |
axis |
|
) |
| throws IOException |
|
inline |
Sends a Button event.
- Parameters
-
map_name | a combination of map_name and button_name refers to a mapping in the user's Keymap.xml or Lircmap.xml. map_name can be one of the following:
-
"KB" => standard keyboard map ( <keyboard> section )
-
"XG" => xbox gamepad map ( <gamepad> section )
-
"R1" => xbox remote map ( <remote> section )
-
"R2" => xbox universal remote map ( <universalremote> section )
-
"LI:devicename" => LIRC remote map where 'devicename' is the actual device's name
|
button_name | a button name defined in the map specified in map_name. For example, if map_name is "KB" referring to the <keyboard> section in Keymap.xml then, valid button_names include "printscreen", "minus", "x", etc. |
repeat | this key press should repeat until released (default: 1) Note that queued pressed cannot repeat. |
down | if this is 1, it implies a press event, 0 implies a release event. (default: 1) |
queue | a queued key press means that the button event is executed just once after which the next key press is processed. It can be used for macros. Currently there is no support for time delays between queued presses. (default: 0) |
amount | unimplemented for now; in the future it will be used for specifying magnitude of analog key press events |
axis | |
◆ sendLog()
void org.xbmc.eventclient.XBMCClient.sendLog |
( |
byte |
loglevel, |
|
|
String |
logmessage |
|
) |
| throws IOException |
|
inline |
Tells XBMC to log the message to xbmc.log with the loglevel as specified.
- Parameters
-
loglevel | the loglevel, follows XBMC standard.
-
0 = DEBUG
-
1 = INFO
-
2 = NOTICE
-
3 = WARNING
-
4 = ERROR
-
5 = SEVERE
|
logmessage | the message to log |
◆ sendMouse()
void org.xbmc.eventclient.XBMCClient.sendMouse |
( |
int |
x, |
|
|
int |
y |
|
) |
| throws IOException |
|
inline |
Sets the mouse position in XBMC.
- Parameters
-
x | horizontal position ranging from 0 to 65535 |
y | vertical position ranging from 0 to 65535 |
◆ sendNotification()
void org.xbmc.eventclient.XBMCClient.sendNotification |
( |
String |
title, |
|
|
String |
message |
|
) |
| throws IOException |
|
inline |
Displays a notification window in XBMC.
- Parameters
-
title | Message title |
message | The actual message |
◆ stopClient()
void org.xbmc.eventclient.XBMCClient.stopClient |
( |
| ) |
throws IOException |
|
inline |
Stops the XBMC EventClient (especially the Ping-Thread)
- Exceptions
-
The documentation for this class was generated from the following file:
- tools/EventClients/lib/java/src/org/xbmc/eventclient/XBMCClient.java