2 * Copyright (C) 2008-2013 Team XBMC
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 package org.xbmc.eventclient;
21 * XBMC Event Client Class
23 * An ACTION packet tells XBMC to do the action specified, based on the type it knows were it needs to be sent.
24 * The idea is that this will be as in scripting/skining and keymapping, just triggered from afar.
25 * @author Stefan Agner
28 public class PacketACTION extends Packet {
30 public final static byte ACTION_EXECBUILTIN = 0x01;
31 public final static byte ACTION_BUTTON = 0x02;
35 * An ACTION packet tells XBMC to do the action specified, based on the type it knows were it needs to be sent.
36 * @param actionmessage Actionmessage (as in scripting/skinning)
38 public PacketACTION(String actionmessage)
41 byte actiontype = ACTION_EXECBUILTIN;
42 appendPayload(actionmessage, actiontype);
46 * An ACTION packet tells XBMC to do the action specified, based on the type it knows were it needs to be sent.
47 * @param actionmessage Actionmessage (as in scripting/skinning)
48 * @param actiontype Actiontype (ACTION_EXECBUILTIN or ACTION_BUTTON)
50 public PacketACTION(String actionmessage, byte actiontype)
53 appendPayload(actionmessage, actiontype);
56 private void appendPayload(String actionmessage, byte actiontype)
58 appendPayload(actiontype);
59 appendPayload(actionmessage);