From 24d167af3b7e0b0449e1de62583da4d76b1e8032 Mon Sep 17 00:00:00 2001 From: "guilhem.duche" Date: Tue, 12 Feb 2008 15:43:14 +0000 Subject: [PATCH] save version 0.1. Last version working on wiiuse 0.9 API. git-svn-id: http://wiiusej.googlecode.com/svn/trunk@51 ae48ae66-6a45-0410-b38e-211266189506 --- .../WiiUseJ/src/wiiusej/WiiUseApiRequest.java | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 tag1/WiiUseJ/src/wiiusej/WiiUseApiRequest.java diff --git a/tag1/WiiUseJ/src/wiiusej/WiiUseApiRequest.java b/tag1/WiiUseJ/src/wiiusej/WiiUseApiRequest.java new file mode 100644 index 0000000..56998c7 --- /dev/null +++ b/tag1/WiiUseJ/src/wiiusej/WiiUseApiRequest.java @@ -0,0 +1,82 @@ +package wiiusej; + +/** + * Represents a request we could do to the WiiUse API. + * @author gduche + * + */ +public class WiiUseApiRequest { + + public static int WIIUSE_STATUS_REQUEST=1; + public static int WIIUSE_ACTIVATE_SMOOTHING_REQUEST=2; + public static int WIIUSE_DEACTIVATE_SMOOTHING_REQUEST=-2; + public static int WIIUSE_ACTIVATE_IR_TRACKING_REQUEST=3; + public static int WIIUSE_DEACTIVATE_IR_TRACKING_REQUEST=-3; + public static int WIIUSE_ACTIVATE_MOTION_SENSING_REQUEST=4; + public static int WIIUSE_DEACTIVATE_MOTION_SENSING_REQUEST=-4; + public static int WIIUSE_CLOSE_CONNECTION_REQUEST=5; + public static int WIIUSE_ACTIVATE_CONTINUOUS_REQUEST=6; + public static int WIIUSE_DEACTIVATE_CONTINUOUS_REQUEST=-6; + public static int WIIUSE_ACTIVATE_RUMBLE_REQUEST=7; + public static int WIIUSE_DEACTIVATE_RUMBLE_REQUEST=-7; + public static int WIIUSE_LEDS_REQUEST=8; + public static int WIIUSE_ORIENT_THRESHOLHD_REQUEST=9; + + + private int wiimoteId=0; + private int requestType=0; + + /** + * Constructor setting the id of the wiimote concerned. + * @param id the id of the wiimote concerned. + */ + public WiiUseApiRequest(int id){ + wiimoteId = id; + } + + /** + * Constructor setting the id of the wiimote concerned. + * @param id the id of the wiimote concerned. + * + */ + public WiiUseApiRequest(int id, int type){ + wiimoteId = id; + requestType = type; + } + + /** + * Get id of the wiimote concerned by this request. + * @return id of the wiimote concerned + */ + public int getId(){ + return wiimoteId; + } + + /** + * Set id of the wiimote concerned by this request. + * @param id id fh the wiimote concernet + */ + public void setId(int id){ + wiimoteId = id; + } + + /** + * Get the request type. + * @return the requestType + */ + public int getRequestType() { + return requestType; + } + + /** + * Set the request type. + * @param requestType the requestType to set + */ + public void setRequestType(int requestType) { + this.requestType = requestType; + } + + + +} +