tux-droid-svn Mailing List for Tux Droid CE (Page 185)
Status: Beta
Brought to you by:
ks156
You can subscribe to this list here.
2007 |
Jan
|
Feb
(32) |
Mar
(108) |
Apr
(71) |
May
(38) |
Jun
(128) |
Jul
(1) |
Aug
(14) |
Sep
(77) |
Oct
(104) |
Nov
(90) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(81) |
Feb
(18) |
Mar
(40) |
Apr
(102) |
May
(151) |
Jun
(74) |
Jul
(151) |
Aug
(257) |
Sep
(447) |
Oct
(379) |
Nov
(404) |
Dec
(430) |
2009 |
Jan
(173) |
Feb
(236) |
Mar
(519) |
Apr
(300) |
May
(112) |
Jun
(232) |
Jul
(314) |
Aug
(58) |
Sep
(203) |
Oct
(293) |
Nov
(26) |
Dec
(109) |
2010 |
Jan
(19) |
Feb
(25) |
Mar
(33) |
Apr
(1) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: remi <c2m...@c2...> - 2008-07-29 07:55:11
|
Author: remi Date: 2008-07-29 09:55:18 +0200 (Tue, 29 Jul 2008) New Revision: 1409 Added: software_suite_v2/tuxware/java-api/ software_suite_v2/tuxware/java-api/branches/ software_suite_v2/tuxware/java-api/tags/ software_suite_v2/tuxware/java-api/trunk/ software_suite_v2/tuxware/java-api/trunk/.classpath software_suite_v2/tuxware/java-api/trunk/.project software_suite_v2/tuxware/java-api/trunk/.settings/ software_suite_v2/tuxware/java-api/trunk/src/ software_suite_v2/tuxware/java-api/trunk/src/TestAPI.java software_suite_v2/tuxware/java-api/trunk/src/com/ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/SLock.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/SThread.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPI.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAccess.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAttitune.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIButton.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIConst.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIDongleRadio.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIEvent.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIFlippers.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILed.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILedBase.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIMisc.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIMouthEyes.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIRemote.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIServer.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISoundFlash.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISpinning.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIStatus.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISwitch.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPITTS.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxEventHandler.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxEventHandlers.java software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxHTTPRequest.java Log: * added "java-api" project at version "0.0.1-ALPHA" Added: software_suite_v2/tuxware/java-api/trunk/.classpath =================================================================== --- software_suite_v2/tuxware/java-api/trunk/.classpath (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/.classpath 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: software_suite_v2/tuxware/java-api/trunk/.project =================================================================== --- software_suite_v2/tuxware/java-api/trunk/.project (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/.project 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>TuxAPI</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: software_suite_v2/tuxware/java-api/trunk/src/TestAPI.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/TestAPI.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/TestAPI.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,96 @@ +import com.tuxisalive.api.*; + +public class TestAPI +{ + public static void onAllEvent(String name, String value, Double delay) + { + //String str = String.format("onAllEvent : %s %s %f", name, value, delay); + //System.out.println(str); + } + + public static void remote_button(String value, Double delay){ + String str = String.format("onRemote : %s %f", value, delay); + System.out.println(str); + } + + /** + * @param args + */ + public static void main(String[] args) { + System.out.println("Create a TuxAPI object"); + TuxAPI tux = new TuxAPI("localhost", 270); + System.out.println("Register the 'all' events callback"); + tux.event.handler.register("all", new TestAPI(), "onAllEvent"); + tux.button.remote.registerEventOnPressed(new TestAPI(), "remote_button", null); + System.out.println("Connect to a Tuxdroid server"); + tux.server.autoConnect(TuxAPIConst.CLIENT_LEVEL_RESTRICTED, "Test", "myPasswd"); + System.out.println("Wait API connected (10 seconds )..."); + tux.server.waitConnected(10.0); + if (tux.server.getConnected()) + { + System.out.println("Wait Dongle connected (10 seconds )..."); + tux.dongle.waitConnected(10.0); + if (tux.dongle.getConnected()) + { + System.out.println("Wait Radio connected (10 seconds )..."); + tux.radio.waitConnected(10.0); + if (tux.radio.getConnected()) + { + System.out.println("Acquire the resource access :"); + System.out.println(tux.access.acquire(TuxAPIConst.ACCESS_PRIORITY_HIGH)); + System.out.println("Leds blink during 5 seconds."); + tux.led.both.blinkDuring(1, 5.0, TuxAPIConst.LFX_STEP); + TuxAPIMisc.sleep(5.); + System.out.println("Load an attitune."); + tux.attitune.load("http://www.tuxisalive.com/Members/remi/hammer.att"); + System.out.println("Play the attitune"); + tux.attitune.play(); + System.out.println("Wait 10 seconds"); + TuxAPIMisc.sleep(10.); + System.out.println("Stop the attitune."); + tux.attitune.stop(); + System.out.println("Open the mouth."); + tux.mouth.open(); + TuxAPIMisc.sleep(1.); + System.out.println("Close the mouth."); + tux.mouth.close(); + TuxAPIMisc.sleep(1.); + System.out.println("7 movements of mouth."); + tux.mouth.on(7, TuxAPIConst.SSV_CLOSE); + TuxAPIMisc.sleep(1.); + System.out.println("4 seconds of movement of mouth."); + tux.mouth.onDuring(4.0, TuxAPIConst.SSV_CLOSE); + System.out.println("Close the eyes."); + tux.eyes.close(); + TuxAPIMisc.sleep(1.); + System.out.println("Open the eyes."); + tux.eyes.open(); + TuxAPIMisc.sleep(1.); + System.out.println("7 movements of eyes."); + tux.eyes.on(7, TuxAPIConst.SSV_OPEN); + TuxAPIMisc.sleep(1.); + System.out.println("4 seconds of movement of eyes."); + tux.eyes.onDuring(4.0, TuxAPIConst.SSV_OPEN); + System.out.println("Set the flippers to up."); + tux.flippers.up(); + TuxAPIMisc.sleep(1.); + System.out.println("Set the flippers to down."); + tux.flippers.down(); + TuxAPIMisc.sleep(1.); + System.out.println("7 movements of flippers."); + tux.flippers.on(7, TuxAPIConst.SSV_DOWN, TuxAPIConst.SPV_VERYSLOW); + TuxAPIMisc.sleep(1.); + System.out.println("4 seconds of movement of flippers."); + tux.flippers.onDuring(4.0, TuxAPIConst.SSV_DOWN); + tux.spinning.rightOnDuring(1.); + System.out.println("Release the resource access :"); + System.out.println(tux.access.release()); + } + } + } + System.out.println("Destroy the TuxAPI ..."); + tux.destroy(); + System.out.println("... Finish"); + } + +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/SLock.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/SLock.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/SLock.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,65 @@ +package com.tuxisalive.api; + +public class SLock +{ + private Object mutex; + private Boolean locked; + + public SLock() + { + locked = false; + mutex = new Object(); + } + + public void acquire() + { + synchronized (mutex) + { + while (locked) + { + try + { + mutex.wait(); + } + catch (Exception e) {} + } + locked = true; + } + } + + public void acquireTimeout(Double timeout) + { + Double startTime = System.currentTimeMillis() / 1000.0; + Double currentTime; + + synchronized (mutex) + { + locked = true; + while (locked) + { + currentTime = System.currentTimeMillis() / 1000.0; + if (timeout <= (currentTime - startTime)) + { + break; + } + else + { + try + { + mutex.wait(100); + } + catch (Exception e) {} + } + } + } + } + + public void release() + { + synchronized (mutex) + { + mutex.notifyAll(); + locked = false; + } + } +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/SThread.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/SThread.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/SThread.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,48 @@ +package com.tuxisalive.api; + +import java.lang.reflect.Method; + +public class SThread extends Thread +{ + private Object pSender; + private String pMethod; + private Object[] pArgs; + + public SThread (Object sender, String method, Object... args) + { + pSender = sender; + pMethod = method; + pArgs = args; + } + + public void run() + { + Class<?> targetClass = pSender.getClass(); + Class<?> args[] = new Class[pArgs.length]; + + for (int i = 0; i < pArgs.length; i++) + { + args[i] = pArgs[i].getClass(); + + if (pArgs[i] != null) + { + args[i] = pArgs[i].getClass(); + } + else + { + args[i] = Object.class; + } + } + + try + { + Method targetMethod = targetClass.getDeclaredMethod(pMethod, args); + targetMethod.invoke(pSender, pArgs); + } + catch(Exception e) + { + System.out.println(String.format("Error when starting the thread : (%s)", + pMethod)); + } + } +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPI.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPI.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPI.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,152 @@ +package com.tuxisalive.api; + +/** + * Main module class to control Tuxdroid. + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public class TuxAPI +{ + /* + * Event handlers field + */ + private TuxEventHandlers eventHandlers; + + /* + * Public field + */ + public TuxAPIServer server; + public TuxAPIEvent event; + public TuxAPIAccess access; + public TuxAPIStatus status; + public TuxAPIMouthEyes mouth; + public TuxAPIMouthEyes eyes; + public TuxAPIFlippers flippers; + public TuxAPISpinning spinning; + public TuxAPIDongleRadio dongle; + public TuxAPIDongleRadio radio; + public TuxAPIAttitune attitune; + public TuxAPILed led; + public TuxAPITTS tts; + public TuxAPISoundFlash soundFlash; + public TuxAPIButton button; + + /** + * Constructor of the class. + * + * @param host host of the server. + * @param port port of the server. + */ + public TuxAPI(String host, Integer port) + { + // Event handlers + eventHandlers = new TuxEventHandlers(); + fillEventHandlers(); + // Client of server + server = new TuxAPIServer(this, host, port); + server.registerEventOnConnected(this, "onServerConnected"); + server.registerEventOnDisconnected(this, "onServerDisconnected"); + // Event + event = new TuxAPIEvent(this); + // Access + access = new TuxAPIAccess(this); + // Status + status = new TuxAPIStatus(this); + // Mouth + mouth = new TuxAPIMouthEyes(this, TuxAPIConst.ST_NAME_MOUTH_POSITION, + TuxAPIConst.ST_NAME_MOUTH_RM, "mouth"); + // Eyes + eyes = new TuxAPIMouthEyes(this, TuxAPIConst.ST_NAME_EYES_POSITION, + TuxAPIConst.ST_NAME_EYES_RM, "eyes"); + // Flippers + flippers = new TuxAPIFlippers(this); + // Spinning + spinning = new TuxAPISpinning(this); + // Dongle + dongle = new TuxAPIDongleRadio(this, TuxAPIConst.ST_NAME_DONGLE_PLUG); + // Radio + radio = new TuxAPIDongleRadio(this, TuxAPIConst.ST_NAME_RADIO_STATE); + // Attitune + attitune = new TuxAPIAttitune(this); + // Led + led = new TuxAPILed(this); + // TTS + tts = new TuxAPITTS(this); + // Sound flash + soundFlash = new TuxAPISoundFlash(this); + // Button + button = new TuxAPIButton(this); + } + + /** + * Destructor of the class. + */ + public void destroy() + { + button.destroy(); + soundFlash.destroy(); + tts.destroy(); + led.destroy(); + attitune.destroy(); + radio.destroy(); + dongle.destroy(); + spinning.destroy(); + flippers.destroy(); + eyes.destroy(); + mouth.destroy(); + status.destroy(); + access.destroy(); + event.destroy(); + server.destroy(); + eventHandlers.destroy(); + } + + /* + * + */ + private void fillEventHandlers() + { + int i; + + for (i = 0; i < TuxAPIConst.SW_NAME_DRIVER.length; i++) + { + eventHandlers.insert(TuxAPIConst.SW_NAME_DRIVER[i]); + } + for (i = 0; i < TuxAPIConst.SW_NAME_OSL.length; i++) + { + eventHandlers.insert(TuxAPIConst.SW_NAME_OSL[i]); + } + for (i = 0; i < TuxAPIConst.SW_NAME_API.length; i++) + { + eventHandlers.insert(TuxAPIConst.SW_NAME_API[i]); + } + } + + /** + * Get the event handlers of the API. + * + * @return the event handlers object. + */ + public TuxEventHandlers getEventHandlers() + { + return eventHandlers; + } + + /* + * + */ + protected void onServerConnected(Boolean value, Double delay) + { + event.start(); + } + + /* + * + */ + protected void onServerDisconnected(Boolean value, Double delay) + { + event.stop(); + } +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAccess.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAccess.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAccess.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,180 @@ +package com.tuxisalive.api; + +import java.util.*; + +/** + * Class to control the resource access. When your have your level to + * CLIENT_LEVEL_RESTRICTED, you need to acquiring and releasing the resource. + * It mechanism is needed for the synchronization of the resource access by the + * programs which want using Tuxdroid. + * CLIENT_LEVEL_FREE, CLIENT_LEVEL_ROOT and CLIENT_LEVEL_ANONYME don't have + * this restriction. + * When you make a tux gadget, you must to use the CLIENT_LEVEL_RESTRICTED level. + * (Only by convention ;) ) + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public class TuxAPIAccess +{ + /* + * Parent field + */ + private TuxAPI pParent; + + /** + * Constructor of the class. + */ + public TuxAPIAccess(TuxAPI parent) + { + pParent = parent; + } + + /** + * Destructor of the class. + */ + public void destroy() {} + + /* + * + */ + private Boolean cmdSimpleResult(String cmd) + { + Hashtable<Object,Object> varStruct = new Hashtable<Object,Object>(); + Hashtable<Object,Object> varResult = new Hashtable<Object,Object>(); + + return pParent.server.request(cmd, varStruct, varResult, false); + } + + /** + * To acquiring the resource access. + * Need for CLIENT_LEVEL_RESTRICTED level. + * Don't forget to release the access after !!! + * + * @param priorityLevel (ACCESS_PRIORITY_LOW|ACCESS_PRIORITY_NORMAL| + * ACCESS_PRIORITY_HIGH|ACCESS_PRIORITY_CRITICAL) + * @return the success of the acquiring. + */ + public Boolean acquire(Integer priorityLevel) + { + String cmd; + cmd = String.format("access/acquire?priority_level=%d", priorityLevel); + return cmdSimpleResult(cmd); + } + + /** + * To acquiring the resource access. + * Need for CLIENT_LEVEL_RESTRICTED level. + * Don't forget to release the access after !!! + * + * @return the success of the acquiring. + */ + public Boolean acquire() + { + return acquire(TuxAPIConst.ACCESS_PRIORITY_NORMAL); + } + + /** + * Wait that the resource can be acquired. + * Need for CLIENT_LEVEL_RESTRICTED level. + * Don't forget to release the access after !!! + * + * @param timeout maximal delay to wait. + * @param priorityLevel (ACCESS_PRIORITY_LOW|ACCESS_PRIORITY_NORMAL| + * ACCESS_PRIORITY_HIGH|ACCESS_PRIORITY_CRITICAL) + * @return the success of the acquiring. + */ + public Boolean waitAcquire(Double timeout, Integer priorityLevel) + { + Double tBegin = System.currentTimeMillis() / 1000.0; + Double currentTime; + + while (!acquire(priorityLevel)) + { + currentTime = System.currentTimeMillis() / 1000.0; + if ((currentTime - tBegin) >= timeout) + { + return false; + } + TuxAPIMisc.sleep(0.25); + } + return true; + } + + /** + * Wait that the resource can be acquired. + * Need for CLIENT_LEVEL_RESTRICTED level. + * Don't forget to release the access after !!! + * + * @param timeout maximal delay to wait. + * @return the success of the acquiring. + */ + public Boolean waitAcquire(Double timeout) + { + return waitAcquire(timeout, TuxAPIConst.ACCESS_PRIORITY_NORMAL); + } + + /** + * To releasing the resource access. + * Need for CLIENT_LEVEL_RESTRICTED level. + * + * @return the success of the command. + */ + public Boolean release() + { + String cmd = "access/release?"; + return cmdSimpleResult(cmd); + } + + /** + * To force the acquisition of the resource by a specified client. + * Only available for CLIENT_LEVEL_ROOT level. + * + * @param idClient idx of the client. + * @return the success of the command. + */ + public Boolean forcingAcquire(Integer idClient) + { + String cmd; + cmd = String.format("access/forcing_acquire?id_client=%d", idClient); + return cmdSimpleResult(cmd); + } + + /** + * To force the releasing of the resource. + * Only available for CLIENT_LEVEL_ROOT level. + * + * @return the success of the command. + */ + public Boolean forcingRelease() + { + String cmd = "access/forcing_release?"; + return cmdSimpleResult(cmd); + } + + /** + * To lock the resource access. After it, nobody will can acquiring + * the resource. + * Only available for CLIENT_LEVEL_ROOT level. + * + * @return the success of the command. + */ + public Boolean lock() + { + String cmd = "access/lock?"; + return cmdSimpleResult(cmd); + } + + /** + * To unlock the resource access. + * Only available for CLIENT_LEVEL_ROOT level. + * + * @return the success of the command. + */ + public Boolean unlock() + { + String cmd = "access/unlock?"; + return cmdSimpleResult(cmd); + } +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAttitune.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAttitune.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAttitune.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,88 @@ +package com.tuxisalive.api; + +import java.util.Hashtable; + +/** + * Class to control the attitune files. + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public class TuxAPIAttitune +{ + /* + * Parent field + */ + private TuxAPI pParent; + + /** + * Constructor of the class. + * @param parent parent object as TuxAPI + */ + public TuxAPIAttitune(TuxAPI parent) + { + pParent = parent; + } + + /** + * Destructor of the class. + */ + public void destroy() {} + + /* + * + */ + private Boolean cmdSimpleResult(String cmd) + { + Hashtable<Object,Object> varStruct = new Hashtable<Object,Object>(); + Hashtable<Object,Object> varResult = new Hashtable<Object,Object>(); + + return pParent.server.request(cmd, varStruct, varResult, false); + } + + /** + * Load an attitune file. + * + * @param path path of the attitune file. + * @return the success of the command. + */ + public Boolean load(String path) + { + String cmd = String.format("attitune/load?path=%s", path); + return cmdSimpleResult(cmd); + } + + /** + * Play the loaded attitune. + * + * @param begin starting second. + * @return the success of the command. + */ + public Boolean play(Double begin) + { + String cmd = String.format("attitune/play?begin=%g", begin); + return cmdSimpleResult(cmd); + } + + /** + * Play the loaded attitune. + * + * @return the success of the command. + */ + public Boolean play() + { + return play(0.0); + } + + /** + * Stop the current attitune. + * + * @return the success of the command. + */ + public Boolean stop() + { + String cmd = String.format("attitune/stop?"); + return cmdSimpleResult(cmd); + } +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIButton.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIButton.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIButton.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,36 @@ +package com.tuxisalive.api; + +/** + * Class to control the buttons. + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public class TuxAPIButton +{ + /* + * Public field + */ + public TuxAPISwitch left; + public TuxAPISwitch right; + public TuxAPISwitch head; + public TuxAPIRemote remote; + + /** + * Constructor of the class. + * @param parent parent object as TuxAPI + */ + public TuxAPIButton(TuxAPI parent) + { + left = new TuxAPISwitch(parent, TuxAPIConst.ST_NAME_LEFT_BUTTON); + right = new TuxAPISwitch(parent, TuxAPIConst.ST_NAME_RIGHT_BUTTON); + head = new TuxAPISwitch(parent, TuxAPIConst.ST_NAME_HEAD_BUTTON); + remote = new TuxAPIRemote(parent); + } + + /** + * Destructor of the class. + */ + public void destroy() {} +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIConst.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIConst.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIConst.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,358 @@ +package com.tuxisalive.api; + +/** + * Interface which contains all constants of the API. + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public interface TuxAPIConst { + /* + * Client levels + */ + public static final Integer CLIENT_LEVEL_ANONYME = -1; + public static final Integer CLIENT_LEVEL_FREE = 0; + public static final Integer CLIENT_LEVEL_RESTRICTED = 1; + public static final Integer CLIENT_LEVEL_ROOT = 2; + public static final Integer[] CLIENT_LEVELS = { + CLIENT_LEVEL_ANONYME, + CLIENT_LEVEL_FREE, + CLIENT_LEVEL_RESTRICTED, + CLIENT_LEVEL_ROOT + }; + /* + * Access priority levels + */ + public static final Integer ACCESS_PRIORITY_LOW = 0; + public static final Integer ACCESS_PRIORITY_NORMAL = 1; + public static final Integer ACCESS_PRIORITY_HIGH = 2; + public static final Integer ACCESS_PRIORITY_CRITICAL = 3; + public static final Integer[] ACCESS_PRIORITIES = { + ACCESS_PRIORITY_LOW, + ACCESS_PRIORITY_NORMAL, + ACCESS_PRIORITY_HIGH, + ACCESS_PRIORITY_CRITICAL + }; + /* + * Statuses declaration + */ + // From libtuxdriver + public static final String ST_NAME_HEAD_BUTTON = "head_button"; + public static final String ST_NAME_LEFT_BUTTON = "left_wing_button"; + public static final String ST_NAME_RIGHT_BUTTON = "right_wing_button"; + public static final String ST_NAME_REMOTE_BUTTON = "remote_button"; + public static final String ST_NAME_MOUTH_POSITION = "mouth_position"; + public static final String ST_NAME_MOUTH_RM = "mouth_remaining_movements"; + public static final String ST_NAME_EYES_POSITION = "eyes_position"; + public static final String ST_NAME_EYES_RM = "eyes_remaining_movements"; + public static final String ST_NAME_FLIPPERS_POSITION = "flippers_position"; + public static final String ST_NAME_FLIPPERS_RM = "flippers_remaining_movements"; + public static final String ST_NAME_SPINNING_DIRECTION = "spinning_direction"; + public static final String ST_NAME_SPINNING_RM = "spinning_remaining_movements"; + public static final String ST_NAME_DONGLE_PLUG = "dongle_plug"; + public static final String ST_NAME_RADIO_STATE = "radio_state"; + public static final String ST_NAME_LEFT_LED = "left_led_state"; + public static final String ST_NAME_RIGHT_LED = "right_led_state"; + public static final String ST_NAME_AUDIO_FLASH_PLAY = "audio_flash_play"; + public static final String ST_NAME_SOUND_REFLASH_END = "sound_reflash_end"; + public static final String ST_NAME_EYES_MOTOR_ON = "eyes_motor_on"; + public static final String ST_NAME_MOUTH_MOTOR_ON = "mouth_motor_on"; + public static final String ST_NAME_FLIPPERS_MOTOR_ON = "flippers_motor_on"; + public static final String ST_NAME_SPIN_LEFT_MOTOR_ON = "spin_left_motor_on"; + public static final String ST_NAME_SPIN_RIGHT_MOTOR_ON = "spin_right_motor_on"; + public static final String ST_NAME_FLASH_SOUND_COUNT = "sound_flash_count"; + public static final String[] SW_NAME_DRIVER = { + ST_NAME_FLIPPERS_POSITION, + ST_NAME_FLIPPERS_RM, + ST_NAME_SPINNING_DIRECTION, + ST_NAME_SPINNING_RM, + ST_NAME_LEFT_BUTTON, + ST_NAME_RIGHT_BUTTON, + ST_NAME_HEAD_BUTTON, + ST_NAME_REMOTE_BUTTON, + ST_NAME_MOUTH_POSITION, + ST_NAME_MOUTH_RM, + ST_NAME_EYES_POSITION , + ST_NAME_EYES_RM, + "descriptor_complete", + ST_NAME_RADIO_STATE, + ST_NAME_DONGLE_PLUG, + "charger_state", + "battery_level", + "battery_state", + "light_level", + ST_NAME_LEFT_LED , + ST_NAME_RIGHT_LED , + "connection_quality", + ST_NAME_AUDIO_FLASH_PLAY, + "audio_general_play", + "flash_programming_current_track", + "flash_programming_last_track_size", + "tuxcore_symbolic_version", + "tuxaudio_symbolic_version", + "fuxusb_symbolic_version", + "fuxrf_symbolic_version", + "tuxrf_symbolic_version", + "driver_symbolic_version", + "sound_reflash_begin", + ST_NAME_SOUND_REFLASH_END, + ST_NAME_EYES_MOTOR_ON, + ST_NAME_MOUTH_MOTOR_ON, + ST_NAME_FLIPPERS_MOTOR_ON, + ST_NAME_SPIN_LEFT_MOTOR_ON, + ST_NAME_SPIN_RIGHT_MOTOR_ON, + ST_NAME_FLASH_SOUND_COUNT + }; + // From libtuxosl + public static final String ST_NAME_SPEAK_STATUS = "tts_0_speak_status"; + public static final String ST_NAME_TTS_SOUND_STATE = "tts_0_sound_state"; + public static final String ST_NAME_VOICE_LIST = "tts_0_voice_list"; + public static final String ST_NAME_WAV_CHANNEL_START = "tts_wav_channel_start"; + public static final String ST_NAME_WAV_0_SOUND_STATE = "wav_0_sound_state"; + public static final String ST_NAME_WAV_1_SOUND_STATE = "wav_1_sound_state"; + public static final String ST_NAME_WAV_2_SOUND_STATE = "wav_2_sound_state"; + public static final String ST_NAME_WAV_3_SOUND_STATE = "wav_3_sound_state"; + public static final String[] SW_NAME_OSL = { + "osl_symbolic_version", + "general_sound_state", + "wav_volume", + "tts_volume", + "tts_pitch", + "tts_locutor", + ST_NAME_WAV_0_SOUND_STATE, + "wav_0_pause_state", + "wav_0_stop", + ST_NAME_WAV_1_SOUND_STATE, + "wav_1_pause_state", + "wav_1_stop", + ST_NAME_WAV_2_SOUND_STATE, + "wav_2_pause_state", + "wav_2_stop", + ST_NAME_WAV_3_SOUND_STATE, + "wav_3_pause_state", + "wav_3_stop", + ST_NAME_TTS_SOUND_STATE, + "tts_0_pause_state", + "tts_0_stop", + "tts_0_voice_loaded", + ST_NAME_SPEAK_STATUS, + ST_NAME_VOICE_LIST, + ST_NAME_WAV_CHANNEL_START, + }; + // From TuxAPI + public static final String ST_NAME_API_CONNECT = "api_connect"; + public static final String[] SW_NAME_API = { + ST_NAME_API_CONNECT, + }; + /* + * Possible string values of statuses. + */ + public static final String SSV_NDEF = "NDEF"; + public static final String SSV_OPEN = "OPEN"; + public static final String SSV_CLOSE = "CLOSE"; + public static final String SSV_UP = "UP"; + public static final String SSV_DOWN = "DOWN"; + public static final String SSV_LEFT = "LEFT"; + public static final String SSV_RIGHT = "RIGHT"; + public static final String SSV_ON = "ON"; + public static final String SSV_OFF = "OFF"; + public static final String SSV_CHANGING = "CHANGING"; + // Mouth and eyes positions + public static final String[] SSV_MOUTHEYES_POSITIONS = { + SSV_NDEF, + SSV_OPEN, + SSV_CLOSE, + }; + // Flippers positions + public static final String[] SSV_FLIPPERS_POSITIONS = { + SSV_NDEF, + SSV_UP, + SSV_DOWN, + }; + // Spinning directions + public static final String[] SSV_SPINNING_DIRECTIONS = { + SSV_NDEF, + SSV_LEFT, + SSV_RIGHT, + }; + // Led states + public static final String[] SSV_LED_STATES = { + SSV_ON, + SSV_OFF, + SSV_CHANGING, + }; + + /* + * Speed values + */ + public static final Integer SPV_VERYSLOW = 1; + public static final Integer SPV_SLOW = 2; + public static final Integer SPV_NORMAL = 3; + public static final Integer SPV_FAST = 4; + public static final Integer SPV_VERYFAST = 5; + public static final Integer[] SPV_SPEED_VALUES = { + SPV_VERYSLOW, + SPV_SLOW, + SPV_NORMAL, + SPV_FAST, + SPV_VERYFAST, + }; + + /* + * Led effects + */ + // Simples + public static final Integer LFX_NONE = 0; + public static final Integer LFX_FADE = 1; + public static final Integer LFX_STEP = 2; + public static final Integer[] LED_EFFECT_TYPE = { + LFX_NONE, + LFX_FADE, + LFX_STEP, + }; + // Extended + public static final String LFXEX_UNAFFECTED = "UNAFFECTED"; + public static final String LFXEX_LAST = "LAST"; + public static final String LFXEX_NONE = "NONE"; + public static final String LFXEX_DEFAULT = "DEFAULT"; + public static final String LFXEX_FADE_DURATION = "FADE_DURATION"; + public static final String LFXEX_FADE_RATE = "FADE_RATE"; + public static final String LFXEX_GRADIENT_NBR = "GRADIENT_NBR"; + public static final String LFXEX_GRADIENT_DELTA = "GRADIENT_DELTA"; + public static final String[] LED_EFFECT_TYPE_EX_NAMES = { + LFXEX_UNAFFECTED, + LFXEX_LAST, + LFXEX_NONE, + LFXEX_DEFAULT, + LFXEX_FADE_DURATION, + LFXEX_FADE_RATE, + LFXEX_GRADIENT_NBR, + LFXEX_GRADIENT_DELTA, + }; + /* + * Led names + */ + public static final String LED_NAME_BOTH = "LED_BOTH"; + public static final String LED_NAME_RIGHT = "LED_RIGHT"; + public static final String LED_NAME_LEFT = "LED_LEFT"; + + /* + * Sound reflash errors + */ + public static final String SOUND_REFLASH_NO_ERROR = "NO_ERROR"; + public static final String SOUND_REFLASH_ERROR_RF_OFFLINE = "ERROR_RF_OFFLINE"; + public static final String SOUND_REFLASH_ERROR_WAV = "ERROR_WAV"; + public static final String SOUND_REFLASH_ERROR_USB = "ERROR_USB"; + public static final String SOUND_REFLASH_ERROR_PARAMETERS = "ERROR_PARAMETERS"; + public static final String SOUND_REFLASH_ERROR_BUSY = "ERROR_BUSY"; + public static final String SOUND_REFLASH_ERROR_BADWAVFILE = "ERROR_BADWAVFILE"; + public static final String SOUND_REFLASH_ERROR_WAVSIZEEXCEDED = "ERROR_WAVSIZEEXCEDED"; + + /* + * Wav channels + */ + public static final String[] WAV_CHANNELS_NAME_LIST = { + ST_NAME_WAV_0_SOUND_STATE, + ST_NAME_WAV_1_SOUND_STATE, + ST_NAME_WAV_2_SOUND_STATE, + ST_NAME_WAV_3_SOUND_STATE, + }; + + /* + * Remote keys + */ + public static final String K_0 = "K_0"; + public static final String K_1 = "K_1"; + public static final String K_2 = "K_2"; + public static final String K_3 = "K_3"; + public static final String K_4 = "K_4"; + public static final String K_5 = "K_5"; + public static final String K_6 = "K_6"; + public static final String K_7 = "K_7"; + public static final String K_8 = "K_8"; + public static final String K_9 = "K_9"; + public static final String K_STANDBY = "K_STANDBY"; + public static final String K_MUTE = "K_MUTE"; + public static final String K_VOLUMEPLUS = "K_VOLUMEPLUS"; + public static final String K_VOLUMEMINUS = "K_VOLUMEMINUS"; + public static final String K_ESCAPE = "K_ESCAPE"; + public static final String K_YES = "K_YES"; + public static final String K_NO = "K_NO"; + public static final String K_BACKSPACE = "K_BACKSPACE"; + public static final String K_STARTVOIP = "K_STARTVOIP"; + public static final String K_RECEIVECALL = "K_RECEIVECALL"; + public static final String K_HANGUP = "K_HANGUP"; + public static final String K_STAR = "K_STAR"; + public static final String K_SHARP = "K_SHARP"; + public static final String K_RED = "K_RED"; + public static final String K_GREEN = "K_GREEN"; + public static final String K_BLUE = "K_BLUE"; + public static final String K_YELLOW = "K_YELLOW"; + public static final String K_CHANNELPLUS = "K_CHANNELPLUS"; + public static final String K_CHANNELMINUS = "K_CHANNELMINUS"; + public static final String K_UP = "K_UP"; + public static final String K_DOWN = "K_DOWN"; + public static final String K_LEFT = "K_LEFT"; + public static final String K_RIGHT = "K_RIGHT"; + public static final String K_OK = "K_OK"; + public static final String K_FASTREWIND = "K_FASTREWIND"; + public static final String K_FASTFORWARD = "K_FASTFORWARD"; + public static final String K_PLAYPAUSE = "K_PLAYPAUSE"; + public static final String K_STOP = "K_STOP"; + public static final String K_RECORDING = "K_RECORDING"; + public static final String K_PREVIOUS = "K_PREVIOUS"; + public static final String K_NEXT = "K_NEXT"; + public static final String K_MENU = "K_MENU"; + public static final String K_MOUSE = "K_MOUSE"; + public static final String K_ALT = "K_ALT"; + public static final String K_RELEASED = "RELEASED"; + + public static final String[] REMOTE_KEY_LIST = { + K_0, + K_1, + K_2, + K_3, + K_4, + K_5, + K_6, + K_7, + K_8, + K_9, + K_STANDBY, + K_MUTE, + K_VOLUMEPLUS, + K_VOLUMEMINUS, + K_ESCAPE, + K_YES, + K_NO, + K_BACKSPACE, + K_STARTVOIP, + K_RECEIVECALL, + K_HANGUP, + K_STAR, + K_SHARP, + K_RED, + K_GREEN, + K_BLUE, + K_YELLOW, + K_CHANNELPLUS, + K_CHANNELMINUS, + K_UP, + K_DOWN, + K_LEFT, + K_RIGHT, + K_OK, + K_FASTREWIND, + K_FASTFORWARD, + K_PLAYPAUSE, + K_STOP, + K_RECORDING, + K_PREVIOUS, + K_NEXT, + K_MENU, + K_MOUSE, + K_ALT, + K_RELEASED, + }; +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIDongleRadio.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIDongleRadio.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIDongleRadio.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,163 @@ +package com.tuxisalive.api; + +/** + * Class to interact with the connection/disconnection of the radio/dongle. + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public class TuxAPIDongleRadio +{ + /* + * Parent field + */ + private TuxAPI pParent; + private TuxEventHandlers eventHandlers; + private TuxEventHandler eventHandler; + /* + * Status field + */ + private String pStStName; + + /** + * Constructor of the class. + * + * @param parent parent object as TuxAPI. + * @param stStName status name. + */ + public TuxAPIDongleRadio(TuxAPI parent, String stStName) + { + pStStName = stStName; + pParent = parent; + eventHandlers = pParent.getEventHandlers(); + eventHandler = (TuxEventHandler)eventHandlers.getEventHandler(pStStName); + } + + /** + * Destructor of the class. + */ + public void destroy() {} + + /** + * Get the state of the radio/dongle connection. + * + * @return the state of the radio/dongle connection. + */ + public Boolean getConnected() + { + Object[] result = pParent.status.requestOne(pStStName); + if (result[0] == null) + { + return false; + } + if (result[0].equals("True")) + { + return true; + } + else + { + return false; + } + } + + /** + * Wait until the radio/dongle was connected. + * + * @param timeout maximal delay to wait. + * @return the state of the wait result. + */ + public Boolean waitConnected(Double timeout) + { + if (getConnected()) + { + return true; + } + return eventHandler.waitCondition(timeout, "True", null); + } + + /** + * Wait until the radio/dongle was disconnected. + * + * @param timeout maximal delay to wait. + * @return the state of the wait result. + */ + public Boolean waitDisconnected(Double timeout) + { + if (!getConnected()) + { + return true; + } + return eventHandler.waitCondition(timeout, "False", null); + } + + /** + * Register a callback on the connected event. + * + * @param sender parent object of the method. + * @param method method name as string. + * @return the new index of the callback in the handler. + */ + public Integer registerEventOnConnected(Object sender, String method) + { + return registerEventOnConnected(sender, method, -1); + } + + /** + * Register a callback on the connected event. + * + * @param sender parent object of the method. + * @param method method name as string. + * @param idx index from a previous register. + * @return the new index of the callback in the handler. + */ + public Integer registerEventOnConnected(Object sender, String method, Integer idx) + { + return eventHandler.register(idx, sender, method, "True", null); + } + + /** + * Unregister a callback from the connected event. + * + * @param idx index from a previous register. + */ + public void unregisterEventOnConnected(Integer idx) + { + eventHandler.unregister(idx); + } + + /** + * Register a callback on the disconnected event. + * + * @param sender parent object of the method. + * @param method method name as string. + * @return the new index of the callback in the handler. + */ + public Integer registerEventOnDisconnected(Object sender, String method) + { + return registerEventOnDisconnected(sender, method, -1); + } + + /** + * Register a callback on the disconnected event. + * + * @param sender parent object of the method. + * @param method method name as string. + * @param idx index from a previous register. + * @return the new index of the callback in the handler. + */ + public Integer registerEventOnDisconnected(Object sender, String method, Integer idx) + { + return eventHandler.register(idx, sender, method, "False", null); + } + + /** + * Unregister a callback from the disconnected event. + * + * @param idx index from a previous register. + */ + public void unregisterEventOnDisconnected(Integer idx) + { + eventHandler.unregister(idx); + } +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIEvent.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIEvent.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIEvent.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,153 @@ +package com.tuxisalive.api; + +import java.util.Hashtable; + +/** + * TuxAPIEvent is a module part of TuxAPI. It run an asynchronous loop to retrieve the + * events from Tuxdroid, every 100 msec. + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public class TuxAPIEvent +{ + /* + * Parent field + */ + private TuxAPI pParent; + private TuxEventHandlers eventHandlers; + public TuxEventHandlers handler; + /* + * Event loop field + */ + private SThread eventLoopThread; + private SLock eventLoopMutex; + private Boolean eventLoopRun; + private Double eventLoopDelay; + + /** + * Constructor of the class. + * + * @param parent parent object as TuxAPI. + */ + public TuxAPIEvent(TuxAPI parent) + { + pParent = parent; + eventHandlers = pParent.getEventHandlers(); + handler = eventHandlers; + eventLoopThread = null; + eventLoopMutex = new SLock(); + eventLoopRun = false; + eventLoopDelay = 0.1; + } + + /** + * Destructor of the class + */ + public void destroy() + { + stop(); + } + + /* + * + */ + private Boolean getEventLoopRun() + { + Boolean value; + + eventLoopMutex.acquire(); + value = eventLoopRun; + eventLoopMutex.release(); + return value; + } + + /* + * + */ + private void setEventLoopRun(Boolean value) + { + eventLoopMutex.acquire(); + eventLoopRun = value; + eventLoopMutex.release(); + } + + /** + * Start the loop of event retrieving. + */ + public void start() + { + if (getEventLoopRun()) + { + return; + } + eventLoopThread = new SThread((Object)this, "eventLoop"); + eventLoopThread.start(); + } + + /** + * Stop the loop of event retrieving. + */ + @SuppressWarnings("deprecation") + public void stop() + { + if (!getEventLoopRun()) + { + return; + } + setEventLoopRun(false); + TuxAPIMisc.sleep(eventLoopDelay); + if (eventLoopThread != null) + { + if (eventLoopThread.isAlive()) + { + eventLoopThread.stop(); + } + } + } + + /* + * + */ + @SuppressWarnings("unchecked") + protected void eventLoop() + { + String stName; + String stValue; + Double stDelay; + + setEventLoopRun(true); + while (getEventLoopRun()) + { + // Make command + String cmd = "status/events?"; + Hashtable<Object,Object> varStruct = new Hashtable<Object,Object>(); + Hashtable<Object,Object> varResult = new Hashtable<Object,Object>(); + // Request + if (pParent.server.request(cmd, varStruct, varResult, false)) + { + Integer dataCount = (Integer)varResult.get("data_count"); + for (int i = 0; i < dataCount; i++) + { + String dataName = String.format("data%d", i); + try + { + Hashtable<Object,Object> eventStruct = (Hashtable)varResult.get(dataName); + stName = (String)eventStruct.get("name"); + stValue = (String)eventStruct.get("value"); + String tmp = (String)eventStruct.get("delay"); + stDelay = Double.parseDouble(tmp); + } + catch (Exception e) + { + continue; + } + eventHandlers.emit(stName, stValue, stDelay); + } + } + // Wait before the next cycle + TuxAPIMisc.sleep(eventLoopDelay); + } + } +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIFlippers.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIFlippers.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIFlippers.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,350 @@ +package com.tuxisalive.api; + +import java.util.Hashtable; + +/** + * Class to control the flippers movements. + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public class TuxAPIFlippers +{ + /* + * Parent field + */ + private TuxAPI pParent; + private TuxEventHandlers eventHandlers; + + /** + * Constructor of the class. + * @param parent parent object as TuxAPI + */ + public TuxAPIFlippers(TuxAPI parent) + { + pParent = parent; + eventHandlers = pParent.getEventHandlers(); + } + + /** + * Destructor of the class. + */ + public void destroy() {} + + /* + * + */ + private Boolean cmdSimpleResult(String cmd) + { + Hashtable<Object,Object> varStruct = new Hashtable<Object,Object>(); + Hashtable<Object,Object> varResult = new Hashtable<Object,Object>(); + + return pParent.server.request(cmd, varStruct, varResult, false); + } + + /* + * + */ + private Integer checkSpeed(Integer speed) + { + if (speed < TuxAPIConst.SPV_VERYSLOW) + { + speed = TuxAPIConst.SPV_VERYSLOW; + } + if (speed > TuxAPIConst.SPV_VERYFAST) + { + speed = TuxAPIConst.SPV_VERYFAST; + } + return speed; + } + + /** + * Set the flippers to up. + * + * @return the success of the command. + */ + public Boolean up() + { + String cmd; + + cmd = "flippers/up?"; + return cmdSimpleResult(cmd); + } + + /** + * Set the flippers to down. + * + * @return the success of the command. + */ + public Boolean down() + { + String cmd; + + cmd = "flippers/down?"; + return cmdSimpleResult(cmd); + } + + /** + * Stop the movement of flippers. + * + * @return the success of the command. + */ + public Boolean off() + { + String cmd; + + cmd = "flippers/off?"; + return cmdSimpleResult(cmd); + } + + /** + * Set the speed of the flippers movement. + * + * @param speed speed of the movement. + * @return the success of the command. + */ + public Boolean setSpeed(Integer speed) + { + speed = checkSpeed(speed); + String cmd = String.format("flippers/speed?value=%d", speed); + return cmdSimpleResult(cmd); + } + + /** + * Move the flippers. + * (asynchronous) + * + * @param count number of movements. + * @param finalState requested state after the movement. + * (SSV_NDEF|SSV_UP|SSV_DOWN) + * @param speed speed of the movement. + * @return the success of the command. + */ + public Boolean onAsync(Integer count, String finalState, Integer speed) + { + String cmd; + + if (!TuxAPIMisc.stringInStringArray(TuxAPIConst.SSV_FLIPPERS_POSITIONS, + finalState)) + { + return false; + } + + cmd = String.format("flippers/on?count=%d&final_state=%s", count, finalState); + Boolean ret = cmdSimpleResult(cmd); + if (ret) + { + ret = setSpeed(speed); + } + return ret; + } + + /** + * Move the flippers. + * (asynchronous) + * + * @param count number of movements. + * @param finalState requested state after the movement. + * (SSV_NDEF|SSV_UP|SSV_DOWN) + * @return the success of the command. + */ + public Boolean onAsync(Integer count, String finalState) + { + return onAsync(count, finalState, TuxAPIConst.SPV_VERYFAST); + } + + /** + * Move the flippers. + * + * @param count number of movements. + * @param finalState requested state after the movement. + * (SSV_NDEF|SSV_UP|SSV_DOWN) + * @param speed speed of the movement. + * @return the success of the command. + */ + public Boolean on(Integer count, String finalState, Integer speed) + { + if (!TuxAPIMisc.stringInStringArray(TuxAPIConst.SSV_FLIPPERS_POSITIONS, + finalState)) + { + return false; + } + Double timeout = count * 1.0; + Boolean ret = onAsync(count, finalState, speed); + if (ret) + { + ret = waitMovingOff(timeout); + } + return ret; + } + + /** + * Move the flippers. + * + * @param count number of movements. + * @param finalState requested state after the movement. + * (SSV_NDEF|SSV_UP|SSV_DOWN) + * @return the success of the command. + */ + public Boolean on(Integer count, String finalState) + { + return on(count, finalState, TuxAPIConst.SPV_VERYFAST); + } + + /** + * Move the flippers during a number of seconds. + * (asynchronous) + * + * @param duration duration time in seconds. + * @param finalState requested state after the movement. + * (SSV_NDEF|SSV_UP|SSV_DOWN) + * @param speed speed of the movement. + * @return the success of the command. + */ + public Boolean onDuringAsync(Double duration, String finalState, Integer speed) + { + String cmd; + + if (!TuxAPIMisc.stringInStringArray(TuxAPIConst.SSV_FLIPPERS_POSITIONS, + finalState)) + { + return false; + } + + cmd = String.format("flippers/on_during?duration=%g&final_state=%s", + duration, finalState); + Boolean ret = cmdSimpleResult(cmd); + if (ret) + { + ret = setSpeed(speed); + } + return ret; + } + + /** + * Move the flippers during a number of seconds. + * (asynchronous) + * + * @param duration duration time in seconds. + * @param finalState requested state after the movement. + * (SSV_NDEF|SSV_UP|SSV_DOWN) + * @return the success of the command. + */ + public Boolean onDuringAsync(Double duration, String finalState) + { + return onDuringAsync(duration, finalState, TuxAPIConst.SPV_VERYFAST); + } + + /** + * Move the flippers during a number of seconds. + * + * @param duration duration time in seconds. + * @param finalState requested state after the movement. + * (SSV_NDEF|SSV_UP|SSV_DOWN) + * @param speed speed of the movement. + * @return the success of the command. + */ + public Boolean onDuring(Double duration, String finalState, Integer speed) + { + Double timeout = duration * 2.0; + Boolean ret = onDuringAsync(duration, finalState, speed); + if (ret) + { + ret = waitMovingOff(timeout); + } + return ret; + } + + /** + * Move the flippers during a number of seconds. + * + * @param duration duration time in seconds. + * @param finalState requested state after the movement. + * (SSV_NDEF|SSV_UP|SSV_DOWN) + * @return the success of the command. + */ + public Boolean onDuring(Double duration, String finalState) + { + return onDuring(duration, finalState, TuxAPIConst.SPV_VERYFAST); + } + + /** + * Get the position of the flippers. + * + * @return (SSV_NDEF|SSV_UP|SSV_DOWN) + */ + public String getPosition() + { + Object[] result = pParent.status.requestOne(TuxAPIConst.ST_NAME_FLIPPERS_POSITION); + if (result[0] == null) + { + return TuxAPIConst.SSV_NDEF; + } + if (!TuxAPIMisc.stringInStringArray(TuxAPIConst.SSV_FLIPPERS_POSITIONS, + (String)result[0])) + { + return TuxAPIConst.SSV_NDEF; + } + else + { + return (String)result[0]; + } + } + + /** + * Get the moving state of the flippers. + * + * @return a boolean. + */ + public Boolean getMovingState() + { + Object[] result = pParent.status.requestOne(TuxAPIConst.ST_NAME_FLIPPERS_MOTOR_ON); + if (result[0] == null) + { + return false; + } + if (result[0].equals("False")) + { + return false; + } + else + { + return true; + } + } + + /** + * Wait that this body part don't move. + * + * @param timeout maximal delay to wait. + * @return the state of the wait result. + */ + public Boolean waitMovingOff(Double timeout) + { + return eventHandlers.waitCondition(TuxAPIConst.ST_NAME_FLIPPERS_MOTOR_ON, timeout, + "False", null); + } + + /** + * Wait a specific position of the flippers. + * + * @param position position to wait. + * @param timeout maximal delay to wait. + * @return the state of the wait result. + */ + public Boolean waitPosition(String position, Double timeout) + { + if (!TuxAPIMisc.stringInStringArray(TuxAPIConst.SSV_FLIPPERS_POSITIONS, + position)) + { + return false; + } + if (getPosition().equals(position)) + { + return true; + } + return eventHandlers.waitCondition(TuxAPIConst.ST_NAME_FLIPPERS_POSITION, timeout, + position, null); + } +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILed.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILed.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILed.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,34 @@ +package com.tuxisalive.api; + +/** + * Class to control the blue leds. + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public class TuxAPILed +{ + /* + * Public field + */ + public TuxAPILedBase left; + public TuxAPILedBase right; + public TuxAPILedBase both; + + /** + * Constructor of the class. + * @param parent parent object as TuxAPI + */ + public TuxAPILed(TuxAPI parent) + { + left = new TuxAPILedBase(parent, "left"); + right = new TuxAPILedBase(parent, "right"); + both = new TuxAPILedBase(parent, "both"); + } + + /** + * Destructor of the class. + */ + public void destroy() {} +} Added: software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILedBase.java =================================================================== --- software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILedBase.java (rev 0) +++ software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILedBase.java 2008-07-29 07:55:18 UTC (rev 1409) @@ -0,0 +1,362 @@ +package com.tuxisalive.api; + +import java.util.Hashtable; + +/** + * Base class to control a led. + * + * @author R Jocaille + * @version 0.1 + * @since 0.1 + */ +public class TuxAPILedBase +{ + /* + * Parent field + */ + private TuxAPI pParent; + + /* + * Private field + */ + private String ledNamex; + + /** + * Constructor of the class. + * @param parent parent object as TuxAPI + */ + public TuxAPILedBase(TuxAPI parent, String ledName) + { + pParent = parent; + if (ledName == "both") + { + ledNamex = TuxAPIConst.LED_NAME_BOTH; + } + else if (ledName == "left") + { + ledNamex = TuxAPIConst.LED_NAME_LEFT; + } + else + { + ledNamex = TuxAPIConst.LED_NAME_RIGHT; + } + } + + /** + * Destructor of the class. + */ + public void destroy() {} + + /* + * + */ + private Boolean cmdSimpleResult(String cmd) + { + Hashtable<Object,Object> varStruct = new Hashtable<Object,Object>(); + Hashtable<Object,Object> varResult = new Hashtable<Object,Object>(); + + return pParent.server.request(cmd, varStruct, varResult, false); + } + + /* + * + */ + private Boolean changeIntensity(Integer fxType, Double intensity) + { + String cmd; + Integer fxStep; + String fxCType; + + if (fxType == TuxAPIConst.LFX_NONE) + { + cmd = String.format("leds/on?intensity=%g&leds=%s", intensity, ledNamex); + } + else + { + if (fxType == TuxAPIConst.LFX_FADE) + { + fxStep = 10; + } + else // TuxAPIConst.LFX_STEP + { + fxStep = 3; + } + fxCType = TuxAPIConst.LFXEX_GRADIENT_NBR; + cmd = String.format("leds/set?fx_speed=0.5&fx_step=%d&fx_type=%s&intensity=%g&leds=%s", + fxStep, fxCType, intensity, ledNamex); + } + return cmdSimpleResult(cmd); + } + + /** + * Set the intensity of the led. + * + * @param intensity intensity of the led (0.0 .. 1.0) + * @return the success of the command. + */ + public Boolean setIntensity(Double intensity) + { + return changeIntensity(TuxAPIConst.LFX_NONE, intensity); + } + + /** + * Set the led state to ON. + * + * @param fxType type of the transition effect. + * (LFX_NONE|LFX_FADE|LFX_STEP) + * @return the success of the command. + */ + public Boolean on(Integer fxType) + { + return changeIntensity(fxType, 1.0); + } + + /** + * Set the led state to ON. + * + * @return the success of the command. + */ + public Boolean on() + { + return on(TuxAPIConst.LFX_NONE); + } + + /** + * Set the led state to OFF. + * + * @param fxType type of the transition effect. + * (LFX_NONE|LFX_FADE|LFX_STEP) + * @return the success of the command. + */ + public Boolean off(Integer fxType) + { + return changeIntensity(fxType, 0.0); + } + + /** + * Set the led state to OFF. + * + * @return the success of the command. + */ + public Boolean off() + { + return off(TuxAPIConst.LFX_NONE); + } + + /** + * Make a pulse effect with the led. + * (Asynchronous) + * + * @param speed speed of the state changing. + * (SPV_VERYSLOW|SPV_SLOW|SPV_NORMAL|SPV_FAST|SPV_VERYFAST) + * @param duration duration of the effect. + * @param fxType type of the transition effect. + * (LFX_NONE|LFX_FADE|LFX_STEP) + * @return the success of the command. + */ + public Boolean blinkDuringAsync(Integer speed, Double duration, Integer fxType) + { + Double perSec = speed * 1.0; + duration = duration * perSec * 2.; + Integer count = duration.intValue(); + Double delay = 1.0 / perSec; + String cmd; + Integer fxStep; + String fxCType; + Double fxSpeed; + + if (fxType == TuxAPIConst.LFX_NONE) + { + cmd = String.format("leds/blink?leds=%s&count=%d&delay=%g", ledNamex, + count, delay); + } + else + { + if (fxType == TuxAPIConst.LFX_FADE) + { + fxStep = 10; + } + else // TuxAPIConst.LFX_STEP + { + fxStep = 2; + } + fxCType = TuxAPIConst.LFXEX_GRADIENT_NBR; + fxSpeed = delay / 3.0; + cmd = String.format("leds/pulse?count=%d&fx_speed=%g&fx_step=%d&fx_type=%s&leds=%s&max_intensity=1.0&min_intensity=0.0&period=%g", + count, fxSpeed, fxStep, fxCType, ledNamex, delay); + } + return cmdSimpleResult(cmd); + } + + /** + * Make a pulse effect with the led. + * (Asynchronous) + * + * @param speed speed of the state changing. + * (SPV_VERYSLOW|SPV_SLOW|SPV_NORMAL|SPV_FAST|SPV_VERYFAST) + * @param duration duration of the effect. + * @return the success of the command. + */ + public Boolean blinkDuringAsync(Integer speed, Double duration) + { + return blinkDuringAsync(speed, duration, TuxAPIConst.LFX_NONE); + } + + /** + * Make a pulse effect with the led. + * + * @param speed speed of the state changing. + * (SPV_VERYSLOW|SPV_SLOW|SPV_NORMAL|SPV_FAST|SPV_VERYFAST) + * @param duration duration of the effect. + * @param fxType type of the transition effect. + * (LFX_NONE|LFX_FADE|LFX_STEP) + * @return the success of the command. + */ + public Boolean blinkDuring(Integer speed, Double duration, Integer fxType) + { + Boolean ret = blinkDuringAsync(speed, duration, fxType); + if (ret) + { + TuxAPIMisc.sleep(duration); + } + return ret; + } + + /** + * Make a pulse effect with the led. + * + * @param speed speed of the state changing. + * (SPV_VERYSLOW|SPV_SLOW|SPV_NORMAL|SPV_FAST|SPV_VERYFAST) + * @param duration duration of the effect. + * @return the success of the command. + */ + public Boolean blinkDuring(Integer speed, Double duration) + { + return blinkDuring(speed, duration, TuxAPIConst.LFX_NONE); + } + + /** + * Make a pulse effect with the led. + * (Asynchronous) + * + * @param speed speed of the state changing. + * (SPV_VERYSLOW|SPV_SLOW|SPV_NORMAL|SPV_FAST|SPV_VERYFAST) + * @param count number of blinks. + * @param fxType type of the transition effect. + * (LFX_NONE|LFX_FADE|LFX_STEP) + * @return the success of the command. + */ + public Boolean blinkAsync(Integer speed, Integer count, Integer fxType) + { + count *= 2; + Double delay = 1.0 / speed; + String cmd; + Integer fxStep; + String fxCType; + Double fxSpeed; + + if (fxType == TuxAPIConst.LFX_NONE) + { + cmd = String.format("leds/blink?leds=%s&count=%d&delay=%g", ledNamex, + count, delay); + } + else + { + if (fxType == TuxAPIConst.LFX_FADE) + { + fxStep = 10; + } + else // TuxAPIConst.LFX_STEP + { + fxStep = 2; + } + fxCType = TuxAPIConst.LFXEX_GRADIENT_NBR; + fxSpeed = delay / 3.0; + cmd = String.format("leds/pulse?count=%d&fx_speed=%g&fx_step=%d&fx_type=%s&leds=%s&max_intensity=1.0&... [truncated message content] |
Author: remi Date: 2008-07-29 09:51:17 +0200 (Tue, 29 Jul 2008) New Revision: 1408 Added: software_suite_v2/tuxware/pytuxisalive/ software_suite_v2/tuxware/pytuxisalive/branches/ software_suite_v2/tuxware/pytuxisalive/tags/ software_suite_v2/tuxware/pytuxisalive/trunk/ software_suite_v2/tuxware/pytuxisalive/trunk/.project software_suite_v2/tuxware/pytuxisalive/trunk/.pydevproject software_suite_v2/tuxware/pytuxisalive/trunk/.settings/ software_suite_v2/tuxware/pytuxisalive/trunk/.settings/org.eclipse.core.resources.prefs software_suite_v2/tuxware/pytuxisalive/trunk/src/ software_suite_v2/tuxware/pytuxisalive/trunk/src/AUTHORS software_suite_v2/tuxware/pytuxisalive/trunk/src/COPYING software_suite_v2/tuxware/pytuxisalive/trunk/src/README software_suite_v2/tuxware/pytuxisalive/trunk/src/Win32ScriptDocInstall.bat software_suite_v2/tuxware/pytuxisalive/trunk/src/installer.nsi software_suite_v2/tuxware/pytuxisalive/trunk/src/setup.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPI.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIAccess.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIAttitune.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIButton.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIConst.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIDongleRadio.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIEvent.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIFlippers.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPILed.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIMisc.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIMouthEyes.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIServer.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPISoundFlash.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPISpinning.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIStatus.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPITTS.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIWav.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxEventHandler.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxEventHandlers.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxHTTPRequest.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/sh.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/version.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/daemonizer/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/daemonizer/Daemonizer.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/daemonizer/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/daemonizer/version.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/driver/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/driver/TuxDriver.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/driver/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/driver/libtuxdriver.dll software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/driver/libtuxdriver.so software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/driver/version.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/AttituneToMacroDecl.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/AttitunesFileReader.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/FileAbstraction.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/SimpleXMLStruct.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/TDAccessController.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/TDClientController.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/TDError.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/TDHTTPServer.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/TDServices.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/httpserver/version.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/logger/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/logger/SimpleLogger.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/logger/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/logger/version.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/osl/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/osl/TuxOSL.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/osl/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/osl/libtuxosl.dll software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/osl/libtuxosl.so software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/osl/version.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/tuxup/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/tuxup/Tuxup.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/tuxup/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/tuxup/version.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/wordlogger/ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/wordlogger/WordLogger.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/wordlogger/__init__.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/lib/wordlogger/version.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/version.py software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxsh.bat software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxsh.ico Log: * added "pytuxisalive" project at version "0.0.1-ALPHA" Added: software_suite_v2/tuxware/pytuxisalive/trunk/.project =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/.project (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/.project 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>python</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.python.pydev.PyDevBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.python.pydev.pythonNature</nature> + </natures> +</projectDescription> Added: software_suite_v2/tuxware/pytuxisalive/trunk/.pydevproject =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/.pydevproject (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/.pydevproject 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?eclipse-pydev version="1.0"?> + +<pydev_project> +<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> +<path>/python/src</path> +</pydev_pathproperty> +<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.4</pydev_property> +</pydev_project> Added: software_suite_v2/tuxware/pytuxisalive/trunk/.settings/org.eclipse.core.resources.prefs =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/.settings/org.eclipse.core.resources.prefs (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/.settings/org.eclipse.core.resources.prefs 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,58 @@ +#Fri Jul 25 11:39:27 CEST 2008 +eclipse.preferences.version=1 +encoding//src/setup.py=latin1 +encoding//src/tuxisalive/__init__.py=latin1 +encoding//src/tuxisalive/api/TuxAPI.py=latin1 +encoding//src/tuxisalive/api/TuxAPIAccess.py=latin1 +encoding//src/tuxisalive/api/TuxAPIAttitune.py=latin1 +encoding//src/tuxisalive/api/TuxAPIButton.py=latin1 +encoding//src/tuxisalive/api/TuxAPIConst.py=latin1 +encoding//src/tuxisalive/api/TuxAPIDongleRadio.py=latin1 +encoding//src/tuxisalive/api/TuxAPIEvent.py=latin1 +encoding//src/tuxisalive/api/TuxAPIFlippers.py=latin1 +encoding//src/tuxisalive/api/TuxAPILed.py=latin1 +encoding//src/tuxisalive/api/TuxAPIMisc.py=latin1 +encoding//src/tuxisalive/api/TuxAPIMouthEyes.py=latin1 +encoding//src/tuxisalive/api/TuxAPIServer.py=latin1 +encoding//src/tuxisalive/api/TuxAPISoundFlash.py=latin1 +encoding//src/tuxisalive/api/TuxAPISpinning.py=latin1 +encoding//src/tuxisalive/api/TuxAPIStatus.py=latin1 +encoding//src/tuxisalive/api/TuxAPITTS.py=latin1 +encoding//src/tuxisalive/api/TuxAPIWav.py=latin1 +encoding//src/tuxisalive/api/TuxEventHandler.py=latin1 +encoding//src/tuxisalive/api/TuxEventHandlers.py=latin1 +encoding//src/tuxisalive/api/TuxHTTPRequest.py=latin1 +encoding//src/tuxisalive/api/__init__.py=latin1 +encoding//src/tuxisalive/api/sh.py=latin1 +encoding//src/tuxisalive/api/version.py=latin1 +encoding//src/tuxisalive/lib/__init__.py=latin1 +encoding//src/tuxisalive/lib/daemonizer/Daemonizer.py=latin1 +encoding//src/tuxisalive/lib/daemonizer/__init__.py=latin1 +encoding//src/tuxisalive/lib/daemonizer/version.py=latin1 +encoding//src/tuxisalive/lib/driver/TuxDriver.py=latin1 +encoding//src/tuxisalive/lib/driver/__init__.py=latin1 +encoding//src/tuxisalive/lib/driver/version.py=latin1 +encoding//src/tuxisalive/lib/httpserver/AttituneToMacroDecl.py=latin1 +encoding//src/tuxisalive/lib/httpserver/AttitunesFileReader.py=latin1 +encoding//src/tuxisalive/lib/httpserver/FileAbstraction.py=latin1 +encoding//src/tuxisalive/lib/httpserver/SimpleXMLStruct.py=latin1 +encoding//src/tuxisalive/lib/httpserver/TDAccessController.py=latin1 +encoding//src/tuxisalive/lib/httpserver/TDClientController.py=latin1 +encoding//src/tuxisalive/lib/httpserver/TDError.py=latin1 +encoding//src/tuxisalive/lib/httpserver/TDHTTPServer.py=latin1 +encoding//src/tuxisalive/lib/httpserver/TDServices.py=latin1 +encoding//src/tuxisalive/lib/httpserver/__init__.py=latin1 +encoding//src/tuxisalive/lib/httpserver/version.py=latin1 +encoding//src/tuxisalive/lib/logger/SimpleLogger.py=latin1 +encoding//src/tuxisalive/lib/logger/__init__.py=latin1 +encoding//src/tuxisalive/lib/logger/version.py=latin1 +encoding//src/tuxisalive/lib/osl/TuxOSL.py=latin1 +encoding//src/tuxisalive/lib/osl/__init__.py=latin1 +encoding//src/tuxisalive/lib/osl/version.py=latin1 +encoding//src/tuxisalive/lib/tuxup/Tuxup.py=latin1 +encoding//src/tuxisalive/lib/tuxup/__init__.py=latin1 +encoding//src/tuxisalive/lib/tuxup/version.py=latin1 +encoding//src/tuxisalive/lib/wordlogger/WordLogger.py=latin1 +encoding//src/tuxisalive/lib/wordlogger/__init__.py=latin1 +encoding//src/tuxisalive/lib/wordlogger/version.py=latin1 +encoding//src/tuxisalive/version.py=latin1 Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/AUTHORS =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/AUTHORS (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/AUTHORS 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,5 @@ +tuxisalive python package was written by: + + Remi Jocaille <rem...@c2...> + +Contributors: Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/COPYING =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/COPYING (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/COPYING 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/README =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/README (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/README 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,9 @@ +tuxisalive python package + +Howto load it (In root !) : + $sudo python setup.py install + +For all information about tuxdroid, please visit: + + http://www.tuxisalive.com + Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/Win32ScriptDocInstall.bat =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/Win32ScriptDocInstall.bat (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/Win32ScriptDocInstall.bat 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,5 @@ +python.exe setup.py install +python.exe setup.py bdist_wininst +python.exe c:\python24\Scripts\epydoc.py -v --html --parse-only --no-private --no-frames tuxisalive\api -o doc_api +python.exe c:\python24\Scripts\epydoc.py -v --html --parse-only --no-private --no-frames tuxisalive\lib -o doc_lib +RMDIR build /s /q \ No newline at end of file Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/installer.nsi =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/installer.nsi (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/installer.nsi 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,128 @@ +; installer.nsi +; This installer which install the python 2.4 for tuxdroid use +; ----------------------------------------------------------------------------- + +; HM NIS Edit Wizard helper defines +!define PRODUCT_NAME "Tuxisalive python package" +!define PRODUCT_VERSION "0.0.1-ALPHA" + + +; The name of the installer +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" + +; The file to write +OutFile "pyTuxisalive_${PRODUCT_VERSION}.exe" + +; The default installation directory +InstallDir c:\tuxdroid\bin\python\Lib\site-packages\tuxisalive + +; Request application privileges for Windows Vista +RequestExecutionLevel user + +; ----------------------------------------------------------------------------- +; Pages +; ----------------------------------------------------------------------------- + +;Page directory +;Page instfiles + +; ----------------------------------------------------------------------------- +; Function to check if a directory is empty +; ----------------------------------------------------------------------------- + +Function un.isEmptyDir + # Stack -> # Stack: <directory> + Exch $0 # Stack: $0 + Push $1 # Stack: $1, $0 + FindFirst $0 $1 "$0\*.*" + strcmp $1 "." 0 _notempty + FindNext $0 $1 + strcmp $1 ".." 0 _notempty + ClearErrors + FindNext $0 $1 + IfErrors 0 _notempty + FindClose $0 + Pop $1 # Stack: $0 + StrCpy $0 1 + Exch $0 # Stack: 1 (true) + goto _end + _notempty: + FindClose $0 + Pop $1 # Stack: $0 + StrCpy $0 0 + Exch $0 # Stack: 0 (false) + _end: +FunctionEnd + +; ----------------------------------------------------------------------------- +; Section "" +; ----------------------------------------------------------------------------- + +Section "" + ; Check that python for tuxdroid is installed + ReadRegStr $0 HKLM SOFTWARE\Tuxdroid\pythonForTuxdroid "Install_Dir" + StrCmp $0 "" endNoInstall + + ; Write the files + SetOutPath $INSTDIR + SetOverwrite ifnewer + File /r tuxisalive\* + + SetOutPath "c:\tuxdroid\bin" + File tuxsh.bat + + SetOutPath "c:\tuxdroid\ico" + File tuxsh.ico + + ; Write shortcut in start menu + CreateDirectory "$SMPROGRAMS\Tuxdroid" + CreateShortCut "$SMPROGRAMS\Tuxdroid\Tuxshell.lnk" "c:\tuxdroid\bin\tuxsh.bat" "" "c:\tuxdroid\ico\tuxsh.ico" 0 + + ; Write the installation path into the registry + WriteRegStr HKLM SOFTWARE\Tuxdroid\pyTuxisalive "Install_Dir" "$INSTDIR" + + ; Write the uninstall keys for Windows + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pyTuxisalive" "DisplayName" "${PRODUCT_NAME} ${PRODUCT_VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pyTuxisalive" "UninstallString" "$INSTDIR\uninstall.exe" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pyTuxisalive" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pyTuxisalive" "NoRepair" 1 + + ; Write the uninstall file + WriteUninstaller "uninstall.exe" + + ; Quit the installer + Quit + + endNoInstall: + MessageBox MB_OK "Aborded : Python for tuxdroid not found." + Quit +SectionEnd + +; ----------------------------------------------------------------------------- +; Section "Uninstall" +; ----------------------------------------------------------------------------- + +Section "Uninstall" + ; Remove registry keys + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pyTuxisalive" + DeleteRegKey HKLM SOFTWARE\Tuxdroid\pyTuxisalive + + ; Remove files and uninstaller + Delete "c:\tuxdroid\bin\tuxsh.bat" + Delete "c:\tuxdroid\ico\tuxsh.ico" + RMDir /r $INSTDIR + Delete $INSTDIR\uninstall.exe + + ; Delete c:\tuxdroid\ico if exist + Push "c:\tuxdroid\ico" + Call un.isEmptyDir + Pop $0 + StrCmp $0 1 0 +2 + RMDir "c:\tuxdroid\ico" + + ; Remove shortcuts + Delete "$SMPROGRAMS\Tuxdroid\Tuxshell.lnk" + + ; Quit the uninstaller + Quit +SectionEnd Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/setup.py =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/setup.py (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/setup.py 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,78 @@ +#!/usr/bin/env python +# -*- coding: latin1 -*- + +from distutils.sysconfig import * +from distutils.core import setup +from glob import glob +import os +import sys + +# +# Check dependencies +# +packageDependencies = [ + 'xml.dom.minidom', + 'httplib', + 'zipfile', + 'urllib2', + 'socket', + 'threading', + 'copy', + 'BaseHTTPServer', + 'SocketServer', + 're', + 'urllib', + 'ctypes', +] + +if os.name == 'nt': + packageDependencies.append('pyHook') + packageDependencies.append('pythoncom') + +for moduleName in packageDependencies: + try: + print "check module presence (%s)" % moduleName + exec("import %s" % moduleName) in globals() + exec("del %s" % moduleName) in globals() + except: + print "ERROR : Module (%s) not found !" % moduleName + sys.exit(-1) + +# +# Packages list +# +mPackages = [ + 'tuxisalive', + 'tuxisalive.api', + 'tuxisalive.lib', + 'tuxisalive.lib.driver', + 'tuxisalive.lib.osl', + 'tuxisalive.lib.httpserver', + 'tuxisalive.lib.logger', + 'tuxisalive.lib.daemonizer', + 'tuxisalive.lib.tuxup', +] + +if os.name == 'nt': + mPackages.append('tuxisalive.lib.wordlogger') + +# +# Install the package +# +PACKAGE_BASE_PATH = get_python_lib() +setup(name = 'tuxisalive', + version = '0.0.1.1-Alpha', + description = 'Python utilities for Tuxdroid', + author = 'Remi Jocaille', + author_email = 'rem...@c2...', + url = 'http://www.tuxisalive.com', + packages = mPackages, + data_files = [ + (PACKAGE_BASE_PATH + '/tuxisalive/lib/driver', + ['tuxisalive/lib/driver/libtuxdriver.dll', + 'tuxisalive/lib/driver/libtuxdriver.so']), + (PACKAGE_BASE_PATH + '/tuxisalive/lib/osl', + ['tuxisalive/lib/osl/libtuxosl.dll', + 'tuxisalive/lib/osl/libtuxosl.so']), + ] + ) \ No newline at end of file Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/__init__.py =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/__init__.py (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/__init__.py 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,29 @@ +# -*- coding: latin1 -*- + +""" +tuxisalive +========== + + Python utilities for Tuxdroid from the kysoh compagny. + + http://www.tuxisalive.com +""" + +import version +__name__ = version.name +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyright (C) 2008 C2ME Sa +# R Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +# +# tuxisalive package modules +# +import api +import lib \ No newline at end of file Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPI.py =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPI.py (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPI.py 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,282 @@ +# -*- coding: latin1 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyright (C) 2008 C2ME Sa +# R Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +from TuxEventHandlers import TuxEventHandlers +from TuxAPIConst import * +from TuxAPIMisc import checkValue +from TuxAPIServer import TuxAPIServer +from TuxAPIEvent import TuxAPIEvent +from TuxAPIAccess import TuxAPIAccess +from TuxAPIMouthEyes import TuxAPIMouthEyes +from TuxAPIFlippers import TuxAPIFlippers +from TuxAPISpinning import TuxAPISpinning +from TuxAPIStatus import TuxAPIStatus +from TuxAPIDongleRadio import TuxAPIDongleRadio +from TuxAPIAttitune import TuxAPIAttitune +from TuxAPILed import TuxAPILed +from TuxAPITTS import TuxAPITTS +from TuxAPISoundFlash import TuxAPISoundFlash +from TuxAPIButton import TuxAPIButton +from TuxAPIWav import TuxAPIWav + +class TuxAPI(object): + """Main module class to control Tuxdroid. + """ + + def __init__(self, host = '127.0.0.1', port = 270): + """Constructor of the class. + @param host: host of the server. + @param port: port of the server. + """ + self.__eventHandlers = TuxEventHandlers() + self.__fillEventHandlers() + self.server = TuxAPIServer(self, host, port) + """Server object. + @type: TuxAPIServer + """ + self.server.registerEventOnConnected(self.__onServerConnected) + self.server.registerEventOnDisconnected(self.__onServerDisconnected) + self.event = TuxAPIEvent(self) + """Event object. + @type: TuxAPIEvent + """ + # Access controller + self.access = TuxAPIAccess(self) + """Access object. + @type: TuxAPIAccess + """ + # Status part + self.status = TuxAPIStatus(self) + """Status object + @type: TuxAPIStatus + """ + # Mouth part + self.mouth = TuxAPIMouthEyes(self, ST_NAME_MOUTH_POSITION, ST_NAME_MOUTH_RM, + "mouth") + """Mouth object + @type: TuxAPIMouthEyes + """ + # Eyes part + self.eyes = TuxAPIMouthEyes(self, ST_NAME_EYES_POSITION, ST_NAME_EYES_RM, + "eyes") + """Eyes object + @type: TuxAPIMouthEyes + """ + # Flippers part + self.flippers = TuxAPIFlippers(self) + """Flippers object + @type: TuxAPIFlippers + """ + # Spinning part + self.spinning = TuxAPISpinning(self) + """Spinning object + @type: TuxAPISpinning + """ + # Dongle part + self.dongle = TuxAPIDongleRadio(self, ST_NAME_DONGLE_PLUG); + """Dongle object + @type: TuxAPIDongleRadio + """ + # Radio part + self.radio = TuxAPIDongleRadio(self, ST_NAME_RADIO_STATE); + """Radio object + @type: TuxAPIDongleRadio + """ + # Attitune part + self.attitune = TuxAPIAttitune(self) + """Attitune object + @type: TuxAPIAttitune + """ + # Leds part + self.led = TuxAPILed(self) + """Led object + @type: TuxAPILed + """ + # TTS part + self.tts = TuxAPITTS(self) + """TTS object + @type: TuxAPITTS + """ + # Sound flash part + self.soundFlash = TuxAPISoundFlash(self) + """Sound flash object + @type: TuxAPISoundFlash + """ + # Button part + self.button = TuxAPIButton(self) + """Button object + @type: TuxAPIButton + """ + # Wav part + self.wav = TuxAPIWav(self) + """Wav object + @type: TuxAPIWav + """ + + def destroy(self): + """Destructor of the class. + """ + self.wav.destroy() + self.button.destroy() + self.soundFlash.destroy() + self.tts.destroy() + self.led.destroy() + self.attitune.destroy() + self.radio.destroy() + self.dongle.destroy() + self.spinning.destroy() + self.flippers.destroy() + self.eyes.destroy() + self.mouth.destroy() + self.status.destroy() + self.access.destroy() + self.event.destroy() + self.server.destroy() + self.__eventHandlers.destroy() + + def getVersion(self): + """Get the version string of the api. + + @return: the version string. + """ + import version + verString = "%s-%s" % (version.name, version.version) + del version + + return verString + + def getVersions(self): + """Get the version string of all components from Tuxware. + + @return: a dictionary of string:string. + """ + verDict = {} + verDict["api"] = self.getVersion() + v, d = self.status.requestOne(ST_NAME_DRIVER_SYMB_VER) + verDict["tuxhttpserver"] = self.server.getVersion() + verDict["libtuxdriver"] = v + v, d = self.status.requestOne(ST_NAME_OSL_SYMB_VER) + verDict["libtuxosl"] = v + v, d = self.status.requestOne(ST_NAME_TUXCORE_SYMB_VER) + verDict["tuxcore"] = v + v, d = self.status.requestOne(ST_NAME_TUXAUDIO_SYMB_VER) + verDict["tuxaudio"] = v + v, d = self.status.requestOne(ST_NAME_FUXUSB_SYMB_VER) + verDict["fuxusb"] = v + v, d = self.status.requestOne(ST_NAME_FUXRF_SYMB_VER) + verDict["fuxrf"] = v + v, d = self.status.requestOne(ST_NAME_TUXRF_SYMB_VER) + verDict["tuxrf"] = v + + return verDict + + def __fillEventHandlers(self): + """ + """ + for statusName in SW_NAME_DRIVER: + self.__eventHandlers.insert(statusName) + for statusName in SW_NAME_OSL: + self.__eventHandlers.insert(statusName) + for statusName in SW_NAME_API: + self.__eventHandlers.insert(statusName) + + def getEventHandlers(self): + """Get the event handlers of the API. + """ + return self.__eventHandlers + + def __onServerConnected(self, value, delay): + """ + """ + self.event.start() + + def __onServerDisconnected(self, value, delay): + """ + """ + self.event.stop() + + +if __name__ == "__main__": + import time + + def onAllEvent(name, value, delay): + #print "onAllEvent : ", name, value, delay + pass + + print "Create a TuxAPI object" + tux = TuxAPI(host = '127.0.0.1', port = 270) + print "Register the 'all' events callback" + tux.event.handler.register("all", onAllEvent) + print "Connect to a Tuxdroid server" + tux.server.autoConnect(CLIENT_LEVEL_RESTRICTED, "Test", "myPasswd") + print "Wait server connected (10 seconds )..." + tux.server.waitConnected(10.0) + if tux.server.getConnected(): + print "Wait dongle connected (10 seconds )..." + tux.dongle.waitConnected(10.0) + print "Dongle connected :", tux.dongle.getConnected() + if tux.dongle.getConnected(): + print "Wait radio connected (10 seconds )..." + tux.radio.waitConnected(10.0) + print "Radio connected :", tux.radio.getConnected() + if tux.radio.getConnected(): + print "Acquire the resource access :", tux.access.acquire() + print "Load an attitune." + tux.attitune.load("http://www.tuxisalive.com/Members/remi/hammer.att") + print "Play the attitune" + tux.attitune.play() + print "Wait 10 seconds" + time.sleep(10.0) + print "Stop the attitune." + tux.attitune.stop() + print "Open the mouth." + tux.mouth.open() + time.sleep(1.0) + print "Close the mouth." + tux.mouth.close() + time.sleep(1.0) + print "7 movements of mouth." + tux.mouth.on(7, SSV_CLOSE) + time.sleep(1.0) + print "4 seconds of movement of mouth." + tux.mouth.onDuring(4., SSV_CLOSE) + print "Close the eyes." + tux.eyes.close() + time.sleep(1.0) + print "Open the eyes." + tux.eyes.open() + time.sleep(1.0) + print "7 movements of eyes." + tux.eyes.on(7, SSV_OPEN) + time.sleep(1.0) + print "4 seconds of movement of eyes." + tux.eyes.onDuring(4., SSV_OPEN) + print "Set the flippers to up." + tux.flippers.up() + time.sleep(1.0) + print "Set the flippers to down." + tux.flippers.down() + time.sleep(1.0) + print "7 movements of flippers." + tux.flippers.on(7, SSV_DOWN, SPV_VERYSLOW) + time.sleep(1.0) + print "4 seconds of movement of flippers." + tux.flippers.onDuring(4., SSV_DOWN) + print "Turn to to left." + tux.spinning.leftOn(1.0) + print "Release the resource access :", tux.access.release() + + print "Destroy the TuxAPI ..." + tux.destroy() + print "... Finish" \ No newline at end of file Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIAccess.py =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIAccess.py (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIAccess.py 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,131 @@ +# -*- coding: latin1 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyright (C) 2008 C2ME Sa +# R Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +import time + +from TuxAPIConst import * + +class TuxAPIAccess(object): + """Class to control the resource access. When you have your level to + CLIENT_LEVEL_RESTRICTED, you need to acquiring and releasing the resource. + It mechanism is needed for the synchronization of the resource access by the + programs which want using Tuxdroid. + CLIENT_LEVEL_FREE, CLIENT_LEVEL_ROOT and CLIENT_LEVEL_ANONYME don't have + this restriction. + When you make a tux gadget, you must to use the CLIENT_LEVEL_RESTRICTED level. + (Only by convention ;) ) + """ + + def __init__(self, parent): + """Constructor of the class. + @param parent: parent object. + @type parent: TuxAPI + """ + # Parent field + if str(type(parent)).find(".TuxAPI'") != -1: + self.__parent = parent + else: + self.__parent = None + + def destroy(self): + """Destructor of the class. + """ + pass + + def __cmdSimpleResult(self, cmd): + """ + """ + if self.__parent != None: + # Request + if self.__parent.server.request(cmd, {}, {}): + return True + return False + + def acquire(self, priorityLevel = ACCESS_PRIORITY_NORMAL): + """ To acquiring the resource access. + Need for CLIENT_LEVEL_RESTRICTED level. + Don't forget to release the access after !!! + + @param priorityLevel: (ACCESS_PRIORITY_LOW|ACCESS_PRIORITY_NORMAL| + ACCESS_PRIORITY_HIGH|ACCESS_PRIORITY_CRITICAL) + @return: the success of the acquiring. + """ + cmd = "access/acquire?priority_level=%d" % priorityLevel + return self.__cmdSimpleResult(cmd) + + def waitAcquire(self, timeout, priorityLevel = ACCESS_PRIORITY_NORMAL): + """Wait that the resource can be acquired. + Need for CLIENT_LEVEL_RESTRICTED level. + Don't forget to release the access after !!! + + @param timeout: maximal delay to wait. + @param priorityLevel: (ACCESS_PRIORITY_LOW|ACCESS_PRIORITY_NORMAL| + ACCESS_PRIORITY_HIGH|ACCESS_PRIORITY_CRITICAL) + @return: the success of the acquiring. + """ + tBegin = time.time() + while (not self.acquire(priorityLevel)): + if (time.time() - tBegin) >= timeout: + return False + time.sleep(0.25) + return True + + + def release(self): + """To releasing the resource access. + Need for CLIENT_LEVEL_RESTRICTED level. + + @return: the success of the command. + """ + cmd = "access/release?" + return self.__cmdSimpleResult(cmd) + + def forcingAcquire(self, idClient): + """To force the acquisition of the resource by a + specified client. + Only available for CLIENT_LEVEL_ROOT level. + + @param idClient: idx of the client. + @return: the success of the command. + """ + cmd = "access/forcing_acquire?id_client=%d" % idClient + return self.__cmdSimpleResult(cmd) + + def forcingRelease(self): + """To force the releasing of the resource. + Only available for CLIENT_LEVEL_ROOT level. + + @return: the success of the command. + """ + cmd = "access/forcing_release?" + return self.__cmdSimpleResult(cmd) + + def lock(self): + """To lock the resource access. After it, nobody will can + acquiring the resource. + Only available for CLIENT_LEVEL_ROOT level. + + @return: the success of the command. + """ + cmd = "access/lock?" + return self.__cmdSimpleResult(cmd) + + def unLock(self): + """To unlock the resource access. + Only available for CLIENT_LEVEL_ROOT level. + + @return: the success of the command. + """ + cmd = "access/unlock?" + return self.__cmdSimpleResult(cmd) \ No newline at end of file Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIAttitune.py =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIAttitune.py (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIAttitune.py 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,74 @@ +# -*- coding: latin1 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyright (C) 2008 C2ME Sa +# R Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +from TuxAPIMisc import checkValue + +class TuxAPIAttitune(object): + """Class to control the attitune files. + """ + + def __init__(self, parent): + """Constructor of the class. + @param parent: parent object. + @type parent: TuxAPI + """ + # Parent field + if str(type(parent)).find(".TuxAPI'") != -1: + self.__parent = parent + else: + self.__parent = None + + def destroy(self): + """Destructor of the class. + """ + pass + + def __cmdSimpleResult(self, cmd): + """ + """ + if self.__parent != None: + # Request + if self.__parent.server.request(cmd, {}, {}): + return True + return False + + def load(self, path): + """Load an attitune file. + + @param path: path of the attitune file. + @return: the success of the command. + """ + if not checkValue(path, "str"): + return False + cmd = "attitune/load?path=%s" % path + return self.__cmdSimpleResult(cmd) + + def play(self, begin = 0.0): + """Play the loaded attitune. + + @param begin: starting second. + @return: the success of the command. + """ + if not checkValue(begin, "float"): + return False + cmd = "attitune/play?begin=%f" % begin + return self.__cmdSimpleResult(cmd) + + def stop(self): + """Stop the current attitune. + + @return: the success of the command. + """ + cmd = "attitune/stop?" + return self.__cmdSimpleResult(cmd) \ No newline at end of file Added: software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIButton.py =================================================================== --- software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIButton.py (rev 0) +++ software_suite_v2/tuxware/pytuxisalive/trunk/src/tuxisalive/api/TuxAPIButton.py 2008-07-29 07:51:17 UTC (rev 1408) @@ -0,0 +1,258 @@ +# -*- coding: latin1 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyright (C) 2008 C2ME Sa +# R Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +from TuxAPIMisc import checkValue +from TuxAPIConst import * + +class TuxAPIButton(object): + """Class to control the buttons. + """ + + def __init__(self, parent): + """Constructor of the class. + @param parent: parent object. + @type parent: TuxAPI + """ + self.left = TuxAPISwitch(parent, ST_NAME_LEFT_BUTTON) + """Left flipper switch. + @see: TuxAPISwitch + """ + self.right = TuxAPISwitch(parent, ST_NAME_RIGHT_BUTTON) + """Right flipper switch. + @see: TuxAPISwitch + """ + self.head = TuxAPISwitch(parent, ST_NAME_HEAD_BUTTON) + """Head switch. + @see: TuxAPISwitch + """ + self.remote = TuxAPIRemote(parent) + """Remote. + @see: TuxAPIRemote + """ + + def destroy(self): + """Destructor of the class. + """ + pass + +class TuxAPISwitch(object): + """Class to control the state of a switch. + """ + + def __init__(self, parent, switchStName): + """Constructor of the class. + @param parent: parent object. + @type parent: TuxAPI + """ + # Parent field + if str(type(parent)).find(".TuxAPI'") != -1: + self.__parent = parent + self.__eventHandlers = parent.getEventHandlers() + else: + self.__parent = None + self.__eventHandlers = None + # Switch field + self.__switchStName = switchStName + + def destroy(self): + """Destructor of the class. + """ + pass + + def getState(self): + """Return the state of the switch. + """ + if self.__parent != None: + value, delay = self.__parent.status.requestOne(self.__switchStName) + if value != None: + return eval(value) + return False + + def waitPressed(self, timeout): + """Wait until the switch was pressed. + + @param timeout: maximal delay to wait. + @return: the state of the wait result. + """ + if not checkValue(timeout, "float"): + return False + if self.getState(): + return True + if self.__parent != None: + ... [truncated message content] |
From: remi <c2m...@c2...> - 2008-07-29 07:30:49
|
Author: remi Date: 2008-07-29 09:30:55 +0200 (Tue, 29 Jul 2008) New Revision: 1407 Added: software_suite_v2/tuxware/tuxhttpserver/ software_suite_v2/tuxware/tuxhttpserver/branches/ software_suite_v2/tuxware/tuxhttpserver/tags/ software_suite_v2/tuxware/tuxhttpserver/trunk/ software_suite_v2/tuxware/tuxhttpserver/trunk/.project software_suite_v2/tuxware/tuxhttpserver/trunk/.pydevproject software_suite_v2/tuxware/tuxhttpserver/trunk/.settings/ software_suite_v2/tuxware/tuxhttpserver/trunk/.settings/org.eclipse.core.resources.prefs software_suite_v2/tuxware/tuxhttpserver/trunk/src/ software_suite_v2/tuxware/tuxhttpserver/trunk/src/AUTHORS software_suite_v2/tuxware/tuxhttpserver/trunk/src/COPYING software_suite_v2/tuxware/tuxhttpserver/trunk/src/README software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/ software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/html/ software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/html/test_mouth_cmd.html software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/ software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/CommandRequest.js software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/Hashtable.js software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/TuxAPI.js software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/xsl/ software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/xsl/services.xsl software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceAccess.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceAttitune.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceClient.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceEyes.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceFiles.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceFlippers.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceIR.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceLeds.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceMouth.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceParent.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceSoundFlash.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceSpinning.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceStatus.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceTTS.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceWav.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/rev.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/setup.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpserver.py software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice.exe software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_install.bat software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_start.bat software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_stop.bat software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_uninstall.bat software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxsys.ico software_suite_v2/tuxware/tuxhttpserver/trunk/src/version.py Log: * added "tuxhttpserver" project at version "0.0.1-BETA" Added: software_suite_v2/tuxware/tuxhttpserver/trunk/.project =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/.project (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/.project 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>tuxhttpserver</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.python.pydev.PyDevBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.python.pydev.pythonNature</nature> + </natures> +</projectDescription> Added: software_suite_v2/tuxware/tuxhttpserver/trunk/.pydevproject =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/.pydevproject (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/.pydevproject 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?eclipse-pydev version="1.0"?> + +<pydev_project> +<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> +<path>/tuxhttpserver/src</path> +</pydev_pathproperty> +<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.4</pydev_property> +</pydev_project> Added: software_suite_v2/tuxware/tuxhttpserver/trunk/.settings/org.eclipse.core.resources.prefs =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/.settings/org.eclipse.core.resources.prefs (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/.settings/org.eclipse.core.resources.prefs 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,4 @@ +#Wed Jun 11 09:22:56 CEST 2008 +eclipse.preferences.version=1 +encoding//src/tuxhttpserver.py=latin1 +encoding//src/version.py=latin1 Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/AUTHORS =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/AUTHORS (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/AUTHORS 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,5 @@ +Tuxdroid HTTP REST Server was written by: + + Remi Jocaille <rem...@c2...> + +Contributors: Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/COPYING =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/COPYING (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/COPYING 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/README =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/README (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/README 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,11 @@ +Tuxdroid HTTP REST Server v0.0.1.1-ALPHA + +Howto load it (In root !) : + $python tuxhttpserver.py <port number> + example: + $sudo python tuxhttpserver.py 81 + +For all information about tuxdroid, please visit: + + http://www.tuxisalive.com + Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/html/test_mouth_cmd.html =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/html/test_mouth_cmd.html (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/html/test_mouth_cmd.html 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,41 @@ +<script language="javascript" SRC="/js/Hashtable.js"></script> +<script language="javascript" SRC="/js/CommandRequest.js"></script> +<script language="javascript" SRC="/js/TuxAPI.js"></script> + +<script type="text/javascript" language="javascript"> + + function on_head_button(value, delay) + { + alert(value + ' : ' + delay); + } + + function on_mouth_position(value, delay) + { + document.getElementById('i_final_state').value = value + } + + + var tux = new TuxAPI(); + tux.connect("AjaxTest", "123456789"); + tux.register_event("head_button", on_head_button); + tux.register_event("mouth_remaining_movements", on_mouth_position); + setInterval('tux.__retrieve_events()', 100); + tux.mouth.get_position(); + +</script> + +<img id="img_cmd" src="" width="0" height="0"></img> + +<input type="button" id="butAddReset" value="Mouth open" onClick="javascript:tux.mouth.open();"/> <br> + +<input type="button" id="butAddReset" value="Mouth close" onClick="javascript:tux.mouth.close();"/> <br> + +<input type="button" id="butAddReset" value="Mouth on" onClick="javascript:tux.mouth.on(document.getElementById('i_count').value, document.getElementById('i_final_state').value);"/> +<input type="text" id="i_count" value="2"/> +<input type="text" id="i_final_state" value="NDEF"/><br> + +<input type="button" id="butAddReset" value="Mouth on during" onClick="javascript:tux.mouth.on_during(document.getElementById('i_duration').value, document.getElementById('i_final_state1').value);"/> +<input type="text" id="i_duration" value="2.0"/> +<input type="text" id="i_final_state1" value="NDEF"/><br> + +<input type="button" id="butAddReset" value="Mouth off" onClick="javascript:tux.mouth.off();"/> <br> \ No newline at end of file Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/CommandRequest.js =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/CommandRequest.js (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/CommandRequest.js 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,119 @@ +var http_request = false; +var result_dict = false; + +function send_command(url) +{ + if (window.XMLHttpRequest) + { // Mozilla, Safari,... + http_request = new XMLHttpRequest(); + + if (http_request.overrideMimeType) + { + http_request.overrideMimeType('text/xml'); + } + } + else + { + if (window.ActiveXObject) + { // IE + try + { + http_request = new ActiveXObject("Msxml2.XMLHTTP"); + } + catch (e) + { + try + { + http_request = new ActiveXObject("Microsoft.XMLHTTP"); + } + catch (e){} + } + } + } + + if (!http_request) + { + alert('Cannot create XMLHTTP instance'); + return false; + } + + http_request.open('GET', url, false); + http_request.onload = onload; + result_dict = new Hashtable(); + + try + { + http_request.send(null); + result_dict.put('server_run', 'Success'); + } + catch (e) + { + result_dict.put('result', 'Failed'); + result_dict.put("data_count", 0); + result_dict.put('server_run', 'Failed'); + } + + return result_dict; +} + +function onload(event) +{ + if (event.target.readyState == 4) + { + if (event.target.status == 200) + { + try + { + var xmldoc = event.target.responseXML; + var root = xmldoc.getElementsByTagName('root').item(0); + var data_count = 0; + var data_node_name = ""; + + for (var iNode = 0; iNode < root.childNodes.length; iNode++) + { + var node = root.childNodes.item(iNode); + + if (node.firstChild.nodeValue != null) + { + result_dict.put(node.nodeName, node.firstChild.data); + } + else + { + var sub_dict = new Hashtable(); + + for (var jNode = 0; jNode < node.childNodes.length; jNode++) + { + var node1 = node.childNodes.item(jNode); + + sub_dict.put(node1.nodeName, node1.firstChild.data); + } + + if (node.nodeName == "data") + { + data_node_name = "data" + data_count; + data_count++; + } + else + { + data_node_name = node.nodeName; + } + + result_dict.put(data_node_name, sub_dict); + } + } + + result_dict.put("data_count", data_count); + } + catch (e) + { + result_dict.put('result', 'Failed'); + result_dict.put("data_count", 0); + } + } + else + { + result_dict.put('result', 'Failed'); + result_dict.put("data_count", 0); + } + } +} \ No newline at end of file Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/Hashtable.js =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/Hashtable.js (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/Hashtable.js 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,145 @@ +// Code from : +// http://dev-for-fun.blogspot.com/2007/11/javascript-hashtable.html +function Hashtable() +{ + this.clear = hashtable_clear; + this.containsKey = hashtable_containsKey; + this.containsValue = hashtable_containsValue; + this.get = hashtable_get; + this.isEmpty = hashtable_isEmpty; + this.keys = hashtable_keys; + this.put = hashtable_put; + this.remove = hashtable_remove; + this.size = hashtable_size; + this.toString = hashtable_toString; + this.values = hashtable_values; + this.hashtable = new Array(); +} + +function hashtable_clear() +{ + this.hashtable = new Array(); +} + +function hashtable_containsKey(key) +{ + var exists = false; + + for (var i in this.hashtable) + { + if (i == key && this.hashtable[i] != null) + { + exists = true; + break; + } + } + + return exists; +} + +function hashtable_containsValue(value) +{ + var contains = false; + + if (value != null) + { + for (var i in this.hashtable) + { + if (this.hashtable[i] == value) + { + contains = true; + break; + } + } + } + + return contains; +} + +function hashtable_get(key) +{ + return this.hashtable[key]; +} + +function hashtable_isEmpty() +{ + return (this.size == 0) ? true : false; +} + +function hashtable_keys() +{ + var keys = new Array(); + + for (var i in this.hashtable) + { + if (this.hashtable[i] != null) + { + keys.push(i); + } + } + + return keys; +} + +function hashtable_put(key, value) +{ + if (key == null || value == null) + { + throw 'NullPointerException {' + key + '},{' + value + '}'; + } + else + { + this.hashtable[key] = value; + } +} + +function hashtable_remove(key) +{ + var rtn = this.hashtable[key]; + + this.hashtable[key] = null; + + return rtn; +} + +function hashtable_size() +{ + var size = 0; + + for (var i in this.hashtable) + { + if (this.hashtable[i] != null) + size ++; + } + + return size; +} + +function hashtable_toString() +{ + var result = ''; + + for (var i in this.hashtable) + { + if (this.hashtable[i] != null) + { + result += '{' + i + '},{' + this.hashtable[i] + '}\n'; + } + } + return result; +} + +function hashtable_values() +{ + var values = new Array(); + + for (var i in this.hashtable) + { + if (this.hashtable[i] != null) + { + values.push(this.hashtable[i]); + } + } + + return values; +} \ No newline at end of file Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/TuxAPI.js =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/TuxAPI.js (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/js/TuxAPI.js 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,419 @@ + +/////////////////////////////////////////////////////////////////////////////// +// Main Class : TuxAPI +/////////////////////////////////////////////////////////////////////////////// + +/* + * Class definition + */ +function TuxAPI() +{ + // Public methods and objects + this.connect = Public_TuxAPI_connect; + this.disconnect = Public_TuxAPI_disconnect; + this.register_event = Public_TuxAPI_register_event; + this.mouth = new TuxAPI_Mouth(this); + + // Private methods + this.__get_server_url = Private_TuxAPI_get_server_url; + this.__retrieve_events = Private_TuxAPI_retrieve_events; + this.__fill_callback_dict = Private_TuxAPI_fill_callback_dict; + + // Private variables + this.__serv_url = this.__get_server_url(); + this.__base_url = this.__serv_url; + this.__connected = false; + this.__timer_id = null; + this.__callback_dict = new Hashtable(); + this.__passwd = ""; + + // Initialization + this.__callback_dict.clear(); +} + +/* + * + */ +function Private_TuxAPI_get_server_url() +{ + var hostname = window.location.hostname; + var port = window.location.port; + + if (hostname == "") + { + hostname = "localhost"; + } + + return "http://" + hostname + ":" + port + "/"; +} + +/* + * + */ +function Public_TuxAPI_connect(name, passwd) +{ + var id_client = Server_client_create(this.__base_url, name, passwd); + + if (this.__connected) + { + return true; + } + + if (id_client != "-1") + { + this.__passwd = passwd + this.__base_url = this.__serv_url + id_client + "/"; + this.__connected = true; + this.__fill_callback_dict(); + + return true; + } + else + { + return false; + } +} + +/* + * + */ +function Public_TuxAPI_disconnect(passwd) +{ + if (!this.__connected) + { + return false; + } + else + { + this.__connected = false; + return Server_client_destroy(this.__base_url, passwd); + } +} + +/* + * + */ +function Public_TuxAPI_register_event(event_name, funct) +{ + if (this.__callback_dict.containsKey(event_name)) + { + this.__callback_dict.put(event_name, funct); + return true; + } + else + { + return false; + } +} + +/* + * + */ +function Private_TuxAPI_retrieve_events() +{ + if (!this.__connected) return; + + events_struct = Server_status_events(this.__base_url); + + if (events_struct.get("server_run") == "Failed") + { + this.disconnect(this.__passwd); + } + + if (events_struct.get("result") != "Success") + { + // No event was found + return; + } + + var event_count = events_struct.get("data_count"); + var i; + var cbk; + var event_name; + + for (i = 0; i < event_count; i++) + { + data_node = 'data' + i; + event_struct = events_struct.get(data_node); + event_name = event_struct.get("name"); + if (this.__callback_dict.containsKey(event_name)) + { + cbk = this.__callback_dict.get(event_name); + if (cbk != false) + { + cbk(event_struct.get("value"), event_struct.get("delay")); + } + } + } +} + +/* + * + */ +function Private_TuxAPI_fill_callback_dict() +{ + this.__callback_dict.clear(); + this.__callback_dict.put("wings_position", false); + this.__callback_dict.put("wings_remaining_movements", false); + this.__callback_dict.put("spinning_direction", false); + this.__callback_dict.put("spinning_remaining_movements", false); + this.__callback_dict.put("left_wing_button", false); + this.__callback_dict.put("right_wing_button", false); + this.__callback_dict.put("head_button", false); + this.__callback_dict.put("remote_button", false); + this.__callback_dict.put("mouth_position", false); + this.__callback_dict.put("mouth_remaining_movements", false); + this.__callback_dict.put("eyes_position", false); + this.__callback_dict.put("eyes_remaining_movements", false); + this.__callback_dict.put("descriptor_complete", false); + this.__callback_dict.put("radio_state", false); + this.__callback_dict.put("dongle_plug", false); + this.__callback_dict.put("charger_state", false); + this.__callback_dict.put("battery_level", false); + this.__callback_dict.put("battery_state", false); + this.__callback_dict.put("light_level", false); + this.__callback_dict.put("left_led_state", false); + this.__callback_dict.put("right_led_state", false); + this.__callback_dict.put("connection_quality", false); + this.__callback_dict.put("audio_flash_play", false); + this.__callback_dict.put("audio_general_play", false); + this.__callback_dict.put("general_sound_state", false); + this.__callback_dict.put("tts_pitch", false); + this.__callback_dict.put("tts_locutor", false); + this.__callback_dict.put("wav_0_sound_state", false); + this.__callback_dict.put("wav_0_pause_state", false); + this.__callback_dict.put("wav_0_stop", false); + this.__callback_dict.put("tts_0_sound_state", false); + this.__callback_dict.put("tts_0_pause_state", false); + this.__callback_dict.put("tts_0_stop", false); + this.__callback_dict.put("tts_0_voice_list", false); +} + +/////////////////////////////////////////////////////////////////////////////// +// Sub Class : TuxAPI_Mouth +/////////////////////////////////////////////////////////////////////////////// + +/* + * Class definition + */ +function TuxAPI_Mouth(parent) +{ + // Public methods + this.on = Public_TuxAPI_Mouth_on; + this.on_during = Public_TuxAPI_Mouth_on_during; + this.off = Public_TuxAPI_Mouth_off; + this.open = Public_TuxAPI_Mouth_open; + this.close = Public_TuxAPI_Mouth_close; + this.get_position = Public_TuxAPI_Mouth_get_position; + this.get_move = Public_TuxAPI_Mouth_get_move; + + // Private variables + this.__parent = parent +} + +/* + * + */ +function Public_TuxAPI_Mouth_on(count, final_state) +{ + if (!this.__parent.__connected) return false; + + return Server_mouth_on(this.__parent.__base_url, count, final_state) +} + +/* + * + */ +function Public_TuxAPI_Mouth_on_during(duration, final_state) +{ + if (!this.__parent.__connected) return false; + + return Server_mouth_on_during(this.__parent.__base_url, + duration, final_state) +} + +/* + * + */ +function Public_TuxAPI_Mouth_off() +{ + if (!this.__parent.__connected) return false; + + return Server_mouth_off(this.__parent.__base_url) +} + +/* + * + */ +function Public_TuxAPI_Mouth_open() +{ + if (!this.__parent.__connected) return false; + + return Server_mouth_open(this.__parent.__base_url) +} + +/* + * + */ +function Public_TuxAPI_Mouth_close() +{ + if (!this.__parent.__connected) return false; + + return Server_mouth_close(this.__parent.__base_url) +} + +/* + * + */ +function Public_TuxAPI_Mouth_get_position() +{ + if (!this.__parent.__connected) return "NDEF"; + + var result_dict = Server_status_request_one(this.__parent.__base_url, + "mouth_position") + + if (result_dict.get("result") == "Success") + { + return result_dict.get("data0").get("value"); + } + else + { + return null; + } +} + +/* + * + */ +function Public_TuxAPI_Mouth_get_move() +{ + if (!this.__parent.__connected) return false; + + var result_dict = Server_status_request_one(this.__parent.__base_url, + "mouth_remaining_movements") + + if (result_dict.get("result") == "Success") + { + if (result_dict.get("data0").get("value") == "0") + { + return false; + } + else + { + return true; + } + } + else + { + return false; + } +} + +/////////////////////////////////////////////////////////////////////////////// +// Flat commands from server +/////////////////////////////////////////////////////////////////////////////// + +function Server_send_command(cmd) +{ + var result_dict = send_command(cmd); + + if (result_dict.get("result") == "Success") + { + return true; + } + else + { + return false; + } +} + +/* + * Client resource + */ + +function Server_client_create(bcu, name, passwd) +{ + var cmd = bcu + "client/create?level=0&name=" + name + "&passwd=" + passwd; + var result_dict = send_command(cmd); + var id_client = "-1"; + + if (result_dict.get("result") == "Success") + { + id_client = result_dict.get("data0").get("client_id"); + } + + return id_client; +} + +function Server_client_destroy(bcu, passwd) +{ + var cmd = bcu + "client/destroy?passwd=" + passwd; + + return Server_send_command(cmd); +} + +/* + * Status resource + */ + +function Server_status_events(bcu) +{ + var cmd = bcu + "status/events?"; + + return send_command(cmd); +} + +function Server_status_request_one(bcu, status_name) +{ + var cmd = "status/request_one?status_name=" + status_name; + + return send_command(bcu + cmd); +} + +function Server_status_request_all(bcu) +{ + var cmd = "status/request_all?"; + + return send_command(bcu + cmd); +} + +/* + * Mouth resource + */ + + function Server_mouth_open(bcu) +{ + var cmd = bcu + 'mouth/open?'; + + return Server_send_command(cmd); +} + +function Server_mouth_close(bcu) +{ + var cmd = bcu + 'mouth/close?'; + + return Server_send_command(cmd); +} + +function Server_mouth_on(bcu, count, final_state) +{ + var cmd = bcu + 'mouth/on?'; + var params = 'count=' + count + '&final_state=' + final_state; + + return Server_send_command(cmd + params); +} + +function Server_mouth_on_during(bcu, duration, final_state) +{ + var cmd = bcu + 'mouth/on_during?'; + var params = 'duration=' + duration + '&final_state=' + final_state; + + return Server_send_command(cmd + params); +} + +function Server_mouth_off(bcu) +{ + var cmd = bcu + 'mouth/off?'; + + return Server_send_command(cmd); +} \ No newline at end of file Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/xsl/services.xsl =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/xsl/services.xsl (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/data/xsl/services.xsl 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> + <body style="font-family:Arial;font-size:12pt;background-color:#FFFFFF"> + + <xsl:for-each select="root/resource"> + + <div style="margin-bottom:1em;margin-top:1em;font-size:14pt;font-weight:bold;background-color:#CCCCCC"> + Resource : + <span style="font-weight:bold"><xsl:value-of select="name"/></span> + </div> + + <xsl:for-each select="service"> + + <div style="margin-left:20px;margin-bottom:1em;margin-top:1em;font-size:12pt;background-color:#EEEEEE"> + <xsl:value-of select="path"/> + </div> + + <div style="margin-left:40px;margin-bottom:1em;font-size:10pt"> + <span style="font-weight:bold;font-style:italic"> + <xsl:value-of select="synopsis"/> + </span> + </div> + + <div style="margin-left:40px;margin-bottom:1em;font-size:10pt"> + <span style="font-weight:bold"> + Level : + </span> + <xsl:value-of select="level"/> + </div> + + <div style="margin-left:40px;margin-bottom:1em;font-size:10pt"> + <span style="font-weight:bold"> + Parameters : + </span> + </div> + + <xsl:for-each select="parameters/*"> + <div style="margin-left:60px;font-size:10pt"> + <xsl:value-of select="name()"/> : + <span style="margin-left:3em;"><<xsl:value-of select="."/>></span> + </div> + </xsl:for-each> + + </xsl:for-each> + + </xsl:for-each> + + </body> +</html> \ No newline at end of file Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,139 @@ +; installer.nsi +; This installer which install the python 2.4 for tuxdroid use +; ----------------------------------------------------------------------------- + +; HM NIS Edit Wizard helper defines +!define PRODUCT_NAME "Tuxdroid HTTP server" +!define PRODUCT_VERSION "0.0.1-r1407-BETA" + + +; The name of the installer +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" + +; The file to write +OutFile "tuxHTTPServer_${PRODUCT_VERSION}.exe" + +; The default installation directory +InstallDir c:\tuxdroid\bin\tuxhttpserver + +; Request application privileges for Windows Vista +RequestExecutionLevel admin + +; ----------------------------------------------------------------------------- +; Pages +; ----------------------------------------------------------------------------- + +;Page directory +;Page instfiles + +; ----------------------------------------------------------------------------- +; Section Pre-installation +; ----------------------------------------------------------------------------- +Section -Pre + ; Needed + SectionIn RO + + ; Stop tuxhttpserver + ExecWait "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" +SectionEnd + +; ----------------------------------------------------------------------------- +; Section "" +; ----------------------------------------------------------------------------- + +Section "" + ; Check that the tuxisalive package + ReadRegStr $0 HKLM SOFTWARE\Tuxdroid\pyTuxisalive "Install_Dir" + StrCmp $0 "" endNoInstall + + ; Write the files + SetOutPath $INSTDIR\data + SetOverwrite ifnewer + File /r data\* + SetOutPath $INSTDIR\resources + SetOverwrite ifnewer + File /r resources\* + SetOutPath $INSTDIR + SetOverwrite ifnewer + File AUTHORS + File COPYING + File README + File rev.py + File setup.py + File tuxhttpserver.py + File version.py + File tuxhttpservice.exe + + SetOutPath "c:\tuxdroid\bin" + File tuxhttpservice_start.bat + File tuxhttpservice_stop.bat + File tuxhttpservice_install.bat + File tuxhttpservice_uninstall.bat + + SetOutPath "c:\tuxdroid\ico" + File tuxsys.ico + + ; Write shortcut in start menu + CreateDirectory "$SMPROGRAMS\Tuxdroid" + CreateDirectory "$SMPROGRAMS\Tuxdroid\Tuxware" + CreateDirectory "$SMPROGRAMS\Tuxdroid\Tuxware\HTTPServer" + CreateShortCut "$SMPROGRAMS\Tuxdroid\Tuxware\HTTPServer\Start.lnk" "c:\tuxdroid\bin\tuxhttpservice_start.bat" "" "c:\tuxdroid\ico\tuxsys.ico" 0 + CreateShortCut "$SMPROGRAMS\Tuxdroid\Tuxware\HTTPServer\Stop.lnk" "c:\tuxdroid\bin\tuxhttpservice_stop.bat" "" "c:\tuxdroid\ico\tuxsys.ico" 0 + + ; Write the installation path into the registry + WriteRegStr HKLM SOFTWARE\Tuxdroid\TuxHTTPServer "Install_Dir" "$INSTDIR" + + ; Write the uninstall keys for Windows + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TuxHTTPServer" "DisplayName" "${PRODUCT_NAME} ${PRODUCT_VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TuxHTTPServer" "UninstallString" "$INSTDIR\uninstall.exe" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TuxHTTPServer" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TuxHTTPServer" "NoRepair" 1 + + ; Write the uninstall file + WriteUninstaller "uninstall.exe" + Return + + endNoInstall: + MessageBox MB_OK "Aborded : Tuxisalive python pakage not found." + Quit +SectionEnd + +; ----------------------------------------------------------------------------- +; Section Post-installation +; ----------------------------------------------------------------------------- +Section -Post + ; Install the server as service + ExecWait "c:\tuxdroid\bin\tuxhttpservice_install.bat" + + ; Quit the installer + Quit +SectionEnd + +; ----------------------------------------------------------------------------- +; Section "Uninstall" +; ----------------------------------------------------------------------------- +Section "Uninstall" + ; Uninstall the server as service + ExecWait "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + + ; Remove registry keys + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TuxHTTPServer" + DeleteRegKey HKLM SOFTWARE\Tuxdroid\TuxHTTPServer + + ; Remove files and uninstaller + Delete "c:\tuxdroid\bin\tuxhttpservice_start.bat" + Delete "c:\tuxdroid\bin\tuxhttpservice_stop.bat" + Delete "c:\tuxdroid\bin\tuxhttpservice_install.bat" + Delete "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + Delete "c:\tuxdroid\ico\tuxsys.ico" + RMDir /r $INSTDIR + Delete $INSTDIR\uninstall.exe + + ; Remove shortcuts + Delete "$SMPROGRAMS\Tuxdroid\Tuxware\HTTPServer\Stop.lnk" + Delete "$SMPROGRAMS\Tuxdroid\Tuxware\HTTPServer\Start.lnk" + RMDir /r "$SMPROGRAMS\Tuxdroid\Tuxware\HTTPServer" + + ; Quit the uninstaller + Quit +SectionEnd Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceAccess.py =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceAccess.py (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceAccess.py 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,151 @@ +# ----------------------------------------------------------------------------- +# Acquire the access +# /access/acquire? +# ----------------------------------------------------------------------------- +def funct_access_acquire(id_client, parameters): + content_struct = copy.deepcopy(DEFAULT_CONTENT_STRUCT) + content_struct['root']['result'] = getStrError(E_TDREST_FAILED) + p_fmt = { + 'priority_level' : 'int', + } + + client = Glb_ClientController.getClient(id_client) + result, params = parseParameters(parameters, p_fmt) + if result: + if client.acquireAccess(params['priority_level']): + content_struct['root']['result'] = \ + getStrError(E_TDREST_SUCCESS) + else: + content_struct['root']['result'] = \ + getStrError(E_TDREST_INVALIDPARAMETERS) + + content = structToXML(content_struct, True) + + return DEFAULT_HEADERS, content + +Glb_ServiceContainer.createService('/access/acquire?', + TDCC_LEVEL_ANONYMOUS, + funct_access_acquire, + "Access", + "To acquire the access to the resource.", + { + 'priority_level' : 'int', + }) + +# ----------------------------------------------------------------------------- +# Release the access +# /access/release? +# ----------------------------------------------------------------------------- +def funct_access_release(id_client, parameters): + content_struct = copy.deepcopy(DEFAULT_CONTENT_STRUCT) + content_struct['root']['result'] = getStrError(E_TDREST_SUCCESS) + + Glb_ClientController.getClient(id_client).releaseAccess() + + content = structToXML(content_struct, True) + + return DEFAULT_HEADERS, content + +Glb_ServiceContainer.createService('/access/release?', + TDCC_LEVEL_FREE_CLIENT, + funct_access_release, + "Access", + "To release the access to the resource.") + +# ----------------------------------------------------------------------------- +# Forcing the release of the access +# /access/forcing_release? +# ----------------------------------------------------------------------------- +def funct_access_forcing_release(id_client, parameters): + content_struct = copy.deepcopy(DEFAULT_CONTENT_STRUCT) + content_struct['root']['result'] = getStrError(E_TDREST_SUCCESS) + + Glb_ClientController.getClient(id_client).forcingReleaseAccess() + + content = structToXML(content_struct, True) + + return DEFAULT_HEADERS, content + +Glb_ServiceContainer.createService('/access/forcing_release?', + TDCC_LEVEL_ROOT, + funct_access_forcing_release, + "Access", + "Forcing the releasing of the access.") + +# ----------------------------------------------------------------------------- +# Forcing the acquire of the access +# /access/forcing_acquire?id_client=<int> +# ----------------------------------------------------------------------------- +def funct_access_forcing_acquire(id_client, parameters): + content_struct = copy.deepcopy(DEFAULT_CONTENT_STRUCT) + content_struct['root']['result'] = getStrError(E_TDREST_FAILED) + + p_fmt = { + 'id_client' : 'int', + } + + result, params = parseParameters(parameters, p_fmt) + + client = Glb_ClientController.getClient(id_client) + + if result: + if Glb_ClientController.clientExists(params['id_client']): + if client.forcingAcquireAccess(params['id_client']): + content_struct['root']['result'] = \ + getStrError(E_TDREST_SUCCESS) + else: + content_struct['root']['result'] = \ + getStrError(E_TDREST_INVALIDPARAMETERS) + + content = structToXML(content_struct, True) + + return DEFAULT_HEADERS, content + +Glb_ServiceContainer.createService('/access/forcing_acquire?', + TDCC_LEVEL_ROOT, + funct_access_forcing_acquire, + "Access", + "Forcing the acquiring of the access.", + { + 'id_client' : 'int', + }) + +# ----------------------------------------------------------------------------- +# Lock the access +# /access/lock? +# ----------------------------------------------------------------------------- +def funct_access_lock(id_client, parameters): + content_struct = copy.deepcopy(DEFAULT_CONTENT_STRUCT) + content_struct['root']['result'] = getStrError(E_TDREST_SUCCESS) + + Glb_ClientController.getClient(id_client).lockAccess() + + content = structToXML(content_struct, True) + + return DEFAULT_HEADERS, content + +Glb_ServiceContainer.createService('/access/lock?', + TDCC_LEVEL_ROOT, + funct_access_lock, + "Access", + "To lock the access to the resource.") + +# ----------------------------------------------------------------------------- +# Unlock the access +# /access/unlock? +# ----------------------------------------------------------------------------- +def funct_access_unlock(id_client, parameters): + content_struct = copy.deepcopy(DEFAULT_CONTENT_STRUCT) + content_struct['root']['result'] = getStrError(E_TDREST_SUCCESS) + + Glb_ClientController.getClient(id_client).unlockAccess() + + content = structToXML(content_struct, True) + + return DEFAULT_HEADERS, content + +Glb_ServiceContainer.createService('/access/unlock?', + TDCC_LEVEL_ROOT, + funct_access_unlock, + "Access", + "To unlock the access to the resource.") Added: software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceAttitune.py =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceAttitune.py (rev 0) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/resources/ResourceAttitune.py 2008-07-29 07:30:55 UTC (rev 1407) @@ -0,0 +1,148 @@ +attituneMutex = threading.Lock() + +# ----------------------------------------------------------------------------- +# /attitune/load?path=<string> +# ----------------------------------------------------------------------------- +def funct_attitune_load(id_client, parameters): + global Glb_CurrentAttitune + global attituneMutex + + attituneMutex.acquire() + content_struct = copy.deepcopy(DEFAULT_CONTENT_STRUCT) + content_struct['root']['result'] = getStrError(E_TDREST_SUCCESS) + p_fmt = { + 'path' : 'string', + } + + if not Glb_DonglePresent: + content_struct['root']['result'] = getStrError(E_TDREST_FAILED) + content = structToXML(content_struct, True) + attituneMutex.release() + return DEFAULT_HEADERS, content + + result, params = parseParameters(parameters, p_fmt) + + if result: + if params['path'].lower().rfind(".att") != -1: + fa = Glb_AbstractFilesContainer.createAbstractFile(params['path']) + if fa != None: + clearAttitunesTmpPath(APP_ATT_TMP_PATH) + Glb_CurrentAttitune = AttitunesFileReader(fa, APP_ATT_TMP_PATH) + else: + content_struct['root']['result'] = \ + getStrError(E_TDREST_FAILED) + ... [truncated message content] |
From: remi <c2m...@c2...> - 2008-07-29 07:23:39
|
Author: remi Date: 2008-07-29 09:23:44 +0200 (Tue, 29 Jul 2008) New Revision: 1406 Added: software_suite_v2/tuxware/ Removed: software_suite_v2/middleware/ Log: * renamed "middleware" to "tuxware" Copied: software_suite_v2/tuxware (from rev 1405, software_suite_v2/middleware) |
From: remi <c2m...@c2...> - 2008-07-28 12:04:59
|
Author: remi Date: 2008-07-28 14:05:08 +0200 (Mon, 28 Jul 2008) New Revision: 1405 Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_hid_win32.c software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c Log: * fixed 3 "signedness pointer" warnings Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_hid_win32.c =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_hid_win32.c 2008-07-28 11:50:18 UTC (rev 1404) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_hid_win32.c 2008-07-28 12:05:08 UTC (rev 1405) @@ -147,7 +147,7 @@ bool LIBLOCAL tux_hid_write(int size, const char *buffer) { - int wrt_count; + long wrt_count; char report[REPORT_SIZE_OUT + 1] = { [0 ... REPORT_SIZE_OUT] = 0 }; long result; @@ -180,7 +180,7 @@ bool LIBLOCAL tux_hid_read(int size, char *buffer) { - int rd_count; + long rd_count; char report[REPORT_SIZE_IN + 1]; long result; Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c 2008-07-28 11:50:18 UTC (rev 1404) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c 2008-07-28 12:05:08 UTC (rev 1405) @@ -365,7 +365,7 @@ TUX_USB_ERROR_LIMIT); empty_frame_cnt = 0; log_info("Send a command to the eyes."); - tux_usb_send_raw(frame_blink_eyes); + tux_usb_send_raw((unsigned char *)frame_blink_eyes); } #else log_warning("Consecutive frames without status : %d", empty_frame_cnt); |
From: remi <c2m...@c2...> - 2008-07-28 11:50:12
|
Author: remi Date: 2008-07-28 13:50:18 +0200 (Mon, 28 Jul 2008) New Revision: 1404 Modified: software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.h software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.pas software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.py software_suite_v2/middleware/tuxdriver/trunk/src/tux_sound_flash.c software_suite_v2/middleware/tuxdriver/trunk/src/tux_sw_status.c software_suite_v2/middleware/tuxdriver/trunk/src/tux_sw_status.h Log: * added a new status "sound_flash_count" Modified: software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.h =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.h 2008-07-28 09:54:44 UTC (rev 1403) +++ software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.h 2008-07-28 11:50:18 UTC (rev 1404) @@ -67,6 +67,7 @@ SW_ID_FLIPPERS_MOTOR_ON, SW_ID_SPIN_LEFT_MOTOR_ON, SW_ID_SPIN_RIGHT_MOTOR_ON, + SW_ID_FLASH_SOUND_COUNT, } SW_ID_DRIVER; #if defined(__cplusplus) Modified: software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.pas =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.pas 2008-07-28 09:54:44 UTC (rev 1403) +++ software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.pas 2008-07-28 11:50:18 UTC (rev 1404) @@ -88,6 +88,7 @@ SW_ID_FLIPPERS_MOTOR_ON = 37; SW_ID_SPIN_LEFT_MOTOR_ON = 38; SW_ID_SPIN_RIGHT_MOTOR_ON = 39; + SW_ID_FLASH_SOUND_COUNT = 40; type Modified: software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.py =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.py 2008-07-28 09:54:44 UTC (rev 1403) +++ software_suite_v2/middleware/tuxdriver/trunk/include/tux_driver.py 2008-07-28 11:50:18 UTC (rev 1404) @@ -72,6 +72,7 @@ SW_ID_FLIPPERS_MOTOR_ON = 37 SW_ID_SPIN_LEFT_MOTOR_ON = 38 SW_ID_SPIN_RIGHT_MOTOR_ON = 39 +SW_ID_FLASH_SOUND_COUNT = 40 SW_NAME_DRIVER = [ "flippers_position", @@ -113,7 +114,8 @@ "mouth_motor_on", "flippers_motor_on", "spin_left_motor_on", - "spin_right_motor_on" + "spin_right_motor_on", + "sound_flash_count" ] LOG_LEVEL_DEBUG = 0 Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_sound_flash.c =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_sound_flash.c 2008-07-28 09:54:44 UTC (rev 1403) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_sound_flash.c 2008-07-28 11:50:18 UTC (rev 1404) @@ -101,7 +101,7 @@ sound_flash_desc.number_of_sounds, sound_flash_desc.flash_usage, sound_flash_desc.available_record_time - ); + ); return p; } @@ -118,6 +118,8 @@ sf_desc->number_of_sounds = hw_status_table.sound_var.number_of_sounds; sf_desc->flash_usage = hw_status_table.sound_var.flash_usage; sf_desc->available_record_time = (int)((128 - sf_desc->flash_usage) * 0.5); + + tux_sw_status_set_intvalue(SW_ID_FLASH_SOUND_COUNT, sf_desc->number_of_sounds, true); } /** Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_sw_status.c =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_sw_status.c 2008-07-28 09:54:44 UTC (rev 1403) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_sw_status.c 2008-07-28 11:50:18 UTC (rev 1404) @@ -76,7 +76,7 @@ { id, name, value_fmt, {.strvalue = initval}, threshold, value_doc, 0.0 }, sw_status_t sw_status_table[SW_STATUS_NUMBER] = { - INIT_STRINGID(SW_ID_FLIPPERS_POSITION, ID_FMT_STRING, + INIT_STRINGID(SW_ID_FLIPPERS_POSITION, ID_FMT_STRING, "flippers_position", "DOWN|UP", STRING_VALUE_DOWN, 1) INIT_INTID(SW_ID_FLIPPERS_REMAINING_MVM, ID_FMT_UINT8, @@ -204,6 +204,9 @@ INIT_INTID(SW_ID_SPIN_RIGHT_MOTOR_ON, ID_FMT_BOOL, "spin_right_motor_on", "False|True", 0, 1) + + INIT_INTID(SW_ID_FLASH_SOUND_COUNT, ID_FMT_UINT8, + "sound_flash_count", "range[0..255]", 0, 1) }; /** Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_sw_status.h =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_sw_status.h 2008-07-28 09:54:44 UTC (rev 1403) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_sw_status.h 2008-07-28 11:50:18 UTC (rev 1404) @@ -94,6 +94,7 @@ SW_ID_FLIPPERS_MOTOR_ON, SW_ID_SPIN_LEFT_MOTOR_ON, SW_ID_SPIN_RIGHT_MOTOR_ON, + SW_ID_FLASH_SOUND_COUNT, SW_STATUS_NUMBER // SW_STATUS_NUMBER must be last and may not be removed !! } SW_ID; |
From: remi <c2m...@c2...> - 2008-07-28 09:54:34
|
Author: remi Date: 2008-07-28 11:54:44 +0200 (Mon, 28 Jul 2008) New Revision: 1403 Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_spinning.c Log: * updated the "spinning direction" status. Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_spinning.c =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_spinning.c 2008-07-28 09:17:55 UTC (rev 1402) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_spinning.c 2008-07-28 09:54:44 UTC (rev 1403) @@ -39,20 +39,20 @@ { char *new_direction = ""; - if ((!hw_status_table.ports.portb.bits.spin_motor_forward) && - (!hw_status_table.ports.portb.bits.spin_motor_backward)) + if ((!hw_status_table.position2.motors.bits.spin_left_on) && + (!hw_status_table.position2.motors.bits.spin_right_on)) { new_direction = STRING_VALUE_NONE; } else { - if (hw_status_table.ports.portb.bits.spin_motor_forward) + if (hw_status_table.position2.motors.bits.spin_left_on) { new_direction = STRING_VALUE_LEFT; } else { - if (hw_status_table.ports.portb.bits.spin_motor_backward) + if (hw_status_table.position2.motors.bits.spin_right_on) { new_direction = STRING_VALUE_RIGHT; } |
From: remi <c2m...@c2...> - 2008-07-28 09:17:46
|
Author: remi Date: 2008-07-28 11:17:55 +0200 (Mon, 28 Jul 2008) New Revision: 1402 Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c Log: * Defined the prototype of "TuxDrv_ResetPositions" in the top of "tux_driver.c" file in order to avoid the error of implicite use of this function in the "on_rf_state" callback function. Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c 2008-07-28 09:11:38 UTC (rev 1401) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c 2008-07-28 09:17:55 UTC (rev 1402) @@ -53,6 +53,8 @@ static void on_usb_disconnect(void); static void on_read_loop_cycle_complete(void); +void TuxDrv_ResetPositions(void); + /** * */ |
From: remi <c2m...@c2...> - 2008-07-28 09:11:29
|
Author: remi Date: 2008-07-28 11:11:38 +0200 (Mon, 28 Jul 2008) New Revision: 1401 Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c Log: * Set the "radio state" status to off when the dongle was disconnected. Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c 2008-07-28 09:07:57 UTC (rev 1400) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c 2008-07-28 09:11:38 UTC (rev 1401) @@ -250,6 +250,7 @@ static void on_usb_disconnect(void) { + tux_sw_status_set_intvalue(SW_ID_RF_STATE, false, true); tux_sw_status_set_intvalue(SW_ID_DONGLE_PLUG, false, true); if (dongle_disconnected_funct) { |
From: remi <c2m...@c2...> - 2008-07-28 09:07:58
|
Author: remi Date: 2008-07-28 11:07:57 +0200 (Mon, 28 Jul 2008) New Revision: 1400 Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c Log: * Reset the body state of Tuxdroid when the radio is connected. Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c 2008-07-28 09:00:02 UTC (rev 1399) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_driver.c 2008-07-28 09:07:57 UTC (rev 1400) @@ -221,6 +221,8 @@ tux_descriptor_get(); /* For reinitilizing the remote control task */ tux_user_inputs_init(); + /* Reset the body state */ + TuxDrv_ResetPositions(); } } |
From: remi <c2m...@c2...> - 2008-07-28 09:00:00
|
Author: remi Date: 2008-07-28 11:00:02 +0200 (Mon, 28 Jul 2008) New Revision: 1399 Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c Log: * updated the behavior when too many frames are empty. Now the driver sent the "eyes blink" command to unblock the status report from Tuxdroid. Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c 2008-07-28 06:37:57 UTC (rev 1398) +++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c 2008-07-28 09:00:02 UTC (rev 1399) @@ -44,6 +44,7 @@ static char frame_status_request[5] = {1, 1, 0, 0, 0}; static char frame_reset_dongle[5] = {1, 1, 0, 0, 0xFE}; static char frame_reset_rf[5] = {1, 1, 0, 0, 0xFD}; +static char frame_blink_eyes[5] = {0, 0x40, 2, 0, 0}; #ifdef USE_MUTEX static mutex_t __connected_mutex; @@ -334,7 +335,7 @@ { freezed_frame_cnt = 0; id_frame_last = 999; - log_error("The USB frame retriving seems to be freezed [%d]", + log_error("The USB frame retrieving seems to be freezed [%d]", TUX_USB_FREEZED_FRAMES_LIMIT); log_info("The RF connection will be reinitialized"); tux_usb_rf_reset(); @@ -363,8 +364,8 @@ log_error("DONGLE ERROR : Too many consecutive frames without status [%d], but the RF is online", TUX_USB_ERROR_LIMIT); empty_frame_cnt = 0; - log_info("The RF connection will be reinitialized"); - tux_usb_rf_reset(); + log_info("Send a command to the eyes."); + tux_usb_send_raw(frame_blink_eyes); } #else log_warning("Consecutive frames without status : %d", empty_frame_cnt); |
From: ulhume <c2m...@c2...> - 2008-07-27 09:45:51
|
Author: ulhume Date: 2008-07-27 11:45:58 +0200 (Sun, 27 Jul 2008) New Revision: 1397 Added: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.classpath software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.project software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.settings/ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.settings/org.eclipse.jdt.core.prefs software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/build.xml software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/gadgets.xml software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/libraries/ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/project.xml software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/sources/ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/targets/ Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/ Log: Share project "tuxdroid-gadget-mail" into "http://svn.tuxisalive.com/software_suite_v2/software" Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail ___________________________________________________________________ Name: svn:externals + builder http://svn.tuxisalive.com/software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder Added: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.classpath =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.classpath (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.classpath 2008-07-27 09:45:58 UTC (rev 1397) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="sources"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry combineaccessrules="false" kind="src" path="/karmalab-commons"/> + <classpathentry combineaccessrules="false" kind="src" path="/tuxdroid-gadget-framework"/> + <classpathentry combineaccessrules="false" kind="src" path="/tuxdroid-gadget-tester"/> + <classpathentry kind="output" path="targets/eclipse"/> +</classpath> Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.classpath ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.project =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.project (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.project 2008-07-27 09:45:58 UTC (rev 1397) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>tuxdroid-gadget-mail</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.project ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.settings/org.eclipse.jdt.core.prefs =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.settings/org.eclipse.jdt.core.prefs 2008-07-27 09:45:58 UTC (rev 1397) @@ -0,0 +1,12 @@ +#Fri Jul 25 17:34:18 CEST 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/.settings/org.eclipse.jdt.core.prefs ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/build.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/build.xml (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/build.xml 2008-07-27 09:45:58 UTC (rev 1397) @@ -0,0 +1,11 @@ +<project default="Update dependencies" name="Tuxdroid MailL Gadget Builder"> + <import file="./builder/build.xml"/> + <target name="Package gadget" depends="Create JAR file"> + <mkdir dir="../tuxdroid-gadget-framework/targets/gadgets" /> + <zip destfile="../tuxdroid-gadget-framework/targets/gadgets/${project.artifactId}.tgf"> + <zipfileset dir="." includes="gadgets.xml"/> + <zipfileset dir="." includes="resources/*"/> + <zipfileset dir="targets/build" includes="${project.artifactId}-${project.version}.jar" fullpath="libraries/${project.artifactId}-${project.version}.jar"/> + </zip> + </target> +</project> \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/build.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/gadgets.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/gadgets.xml (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/gadgets.xml 2008-07-27 09:45:58 UTC (rev 1397) @@ -0,0 +1,33 @@ +<gadgets> + <gadget> + <interpreter + kind="java"> + <executable>net.karmaLab.tuxDroid.gadgets.MailGadget</executable> + </interpreter> + <description> + <name>Mail Gadget</name> + <description>Mail Gadget</description> + <author>Y. Brault (C) http://artisan.karma-lab.net 2008</author> + <version>1.0</version> + <iconFile>resources/MailGadget.png</iconFile> + <executionMode>service</executionMode> + <uuid>f63af23e-7ae0-4389-b89b-bc5a8185b0b8</uuid> + </description> + <parameters> + <parameter + name="host" + description="MPD server" + type="string" + defaultValue="nephilia" /> + <parameter + name="port" + description="MPD port" + type="integer" + defaultValue="6600" /> + </parameters> + <commands> + <command name="play" description="play"/> + <command name="stop" description="stop"/> + </commands> + </gadget> +</gadgets> \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/gadgets.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/libraries ___________________________________________________________________ Name: svn:ignore + * Added: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/project.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/project.xml (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/project.xml 2008-07-27 09:45:58 UTC (rev 1397) @@ -0,0 +1,67 @@ +<project> + <name>tuxdroid-gadget-mail</name> + <title>TuxDroid Gadget Mail</title> + <description>TuxDroid Gadget Weather</description> + + <license> + <name>GPL</name> + </license> + + <groupId>com.kysoh</groupId> + <artifactId>tuxdroid-gadget-mail</artifactId> + <version>0.1</version> + + <dependencies> + <dependency> + <groupId>net.karmaLab</groupId> + <artifactId>karmalab-commons</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>com.kysoh</groupId> + <artifactId>tuxdroid-gadget-framework</artifactId> + <version>0.1</version> + </dependency> + </dependencies> + <repositories> + <repository> + <id>central</id> + <name>Maven Repository Switchboard</name> + <layout>default</layout> + <url>http://repo1.maven.org/maven2</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>karma-lab</id> + <name>KarmaLab Repository Switchboard</name> + <layout>default</layout> + <url>http://artisan.karma-lab.net/software/repository</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + <developers> + <developer> + <name>Yoran Brault</name> + <organization>kysoh</organization> + <email> + software@_bad_karma-lab.net (remove _bad_ before sending + an email) + </email> + <organizationUrl>http://www.kysoh.com/</organizationUrl> + </developer> + </developers> + + <releases> + <release date="03/06/2008" version="0.1"> + <changes> + <change kind="creation"> + <description>First version</description> + </change> + </changes> + </release> + </releases> +</project> \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/project.xml ___________________________________________________________________ Name: svn:mime-type + text/plain |
From: ulhume <c2m...@c2...> - 2008-07-27 09:44:59
|
Author: ulhume Date: 2008-07-27 11:45:09 +0200 (Sun, 27 Jul 2008) New Revision: 1396 Added: software_suite_v2/software/gadgets/tuxdroid-gadget-mail/ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/branches/ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/tags/ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/ software_suite_v2/software/gadgets/tuxdroid-gadget-mail/trunk/tuxdroid-gadget-mail/ Log: Share project "tuxdroid-gadget-mail" into "http://svn.tuxisalive.com/software_suite_v2/software" |
From: ulhume <c2m...@c2...> - 2008-07-27 09:43:51
|
Author: ulhume Date: 2008-07-27 11:44:00 +0200 (Sun, 27 Jul 2008) New Revision: 1395 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-clock/trunk/tuxdroid-gadget-clock/ Log: disconnected builder Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-clock/trunk/tuxdroid-gadget-clock ___________________________________________________________________ Name: svn:externals - builder http://artisan.karma-lab.net/dev/karmalab-commons/trunk/karmalab-commons/builder + builder http://svn.tuxisalive.com/software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder |
From: ulhume <c2m...@c2...> - 2008-07-27 09:42:34
|
Author: ulhume Date: 2008-07-27 11:42:42 +0200 (Sun, 27 Jul 2008) New Revision: 1394 Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.classpath software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.project software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.settings/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.settings/org.eclipse.jdt.core.prefs software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/BUILD-SOURCES software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/CHANGELOG software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/LICENSE software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/NOTICE software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/README software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/build.xml software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/gadgets.xml software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/libraries/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/project.xml software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/resources/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/resources/HelloWorld.png software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/resources/help.txt software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/logging.properties software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/DeprecatedHelloWorldGadget.java software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/HelloWorldGadget.java software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/targets/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/net/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/net/karmaLab/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/net/karmaLab/tuxDroid/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/net/karmaLab/tuxDroid/gadgets/ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/net/karmaLab/tuxDroid/gadgets/HelloWorldGadgetTest.java Modified: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/ Log: Share project "tuxdroid-gadget-java-samples" into "http://svn.tuxisalive.com/software_suite_v2/software" Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples ___________________________________________________________________ Name: svn:externals + builder http://svn.tuxisalive.com/software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.classpath =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.classpath (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.classpath 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="sources"/> + <classpathentry kind="src" path="tests"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry combineaccessrules="false" kind="src" path="/karmalab-commons"/> + <classpathentry combineaccessrules="false" kind="src" path="/tuxdroid-gadget-framework"/> + <classpathentry combineaccessrules="false" kind="src" path="/tuxdroid-gadget-tester"/> + <classpathentry kind="output" path="targets/eclipse"/> +</classpath> Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.classpath ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.project =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.project (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.project 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>tuxdroid-gadget-java-samples</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.project ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.settings/org.eclipse.jdt.core.prefs =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.settings/org.eclipse.jdt.core.prefs 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,12 @@ +#Wed Jun 11 13:20:42 CEST 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/.settings/org.eclipse.jdt.core.prefs ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/BUILD-SOURCES =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/BUILD-SOURCES (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/BUILD-SOURCES 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,27 @@ +Building with ANT +-------------------------------------------------------- + +To build from sources you should run build.xml project file. + +This project file is using a sub-project located in a shared subversion folder 'builder' hosting this and +also doxygen configuration files. + +Every information about this module is located in 'project.xml' in a Maven2 way of doing this. + +The build process is : + - loading project.xml to get module information (name, version, license, etc.), dependencies and + librairies repositories. + - Loading all dependencies from repositories and puting them in 'libraries' folder. Each time you + re-run the builder, dependencies are updated if something changed in repositories. + - Parsing the sources in order to fix header license. + - Create files CHANGELOG, LICENCE, NOTICE and README using project.xml information. + - Compile the sources and put resulting classes in target/ant + - Create the JAR file and put it in target/build + - Publish the JAR file in a maven like local repository located in target/repository + + Building from eclipse +-------------------------------------------------------- + You have nothing to do in order to build with eclipse, except run a first time the ANT builder + in order to retreive librairies and editing project properties to use those libraries instead + of direct project link. + \ No newline at end of file Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/CHANGELOG =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/CHANGELOG (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/CHANGELOG 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,4 @@ +155/06/2008 - 0.1 +-------------------------------------------- + - creation - First version + Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/LICENSE =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/LICENSE (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/LICENSE 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/NOTICE =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/NOTICE (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/NOTICE 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,2 @@ +This product includes software developed by +kysoh (http://www.kysoh.com/ or software@_bad_karma-lab.net (remove _bad_ before sending an email)). Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/README =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/README (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/README 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,43 @@ +Installing TuxDroid Gadget Java API Samples +===================== + +The following instructions show how to install TuxDroid Gadget Java API Samples: + +1) Unpack the archive where you would like to store the binaries, eg: + tar zxvf TuxDroid Gadget Java API Samples-X.Y-binaries.tar.gz + or + unzip TuxDroid Gadget Java API Samples-X.Y-binaries.zip + +2) A directory called "TuxDroid Gadget Java API Samples-X.Y" will be created. + +3) Add the bin directory to your PATH, eg: + export PATH=/usr/local/TuxDroid Gadget Java API Samples-X.Y/bin:$PATH +or + set PATH="c:\program files\TuxDroid Gadget Java API Samples-X.Y\bin";%PATH% + +4) Make sure JAVA_HOME is set to the location of your JDK + +5) Run "TuxDroid Gadget Java API Samples --version" to verify that it is correctly installed. + + +Compiling TuxDroid Gadget Java API Samples +===================== + +The following instructions show how to compile TuxDroid Gadget Java API Samples. You should have a proper +Java and Maven installation working. + +1) Unpack the archive where you would like to store the binaries, eg: + tar zxvf TuxDroid Gadget Java API Samples-X.Y-sources.tar.gz + or + unzip TuxDroid Gadget Java API Samples-X.Y-sources.zip + +2) A directory called "TuxDroid Gadget Java API Samples-X.Y" will be created. + +3) Go inside the directory and run "maven compile" + + +More information about TuxDroid Gadget Java API Samples +======================= + +For more information, please see http://www.kysoh.com/ + Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/build.xml =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/build.xml (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/build.xml 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,11 @@ +<project default="Update dependencies" name="Tuxdroid Java Gadget Samples Builder"> + <import file="./builder/build.xml"/> + <target name="Package gadget" depends="Create JAR file"> + <mkdir dir="../tuxdroid-gadget-framework/targets/gadgets" /> + <zip destfile="../tuxdroid-gadget-framework/targets/gadgets/${project.artifactId}.tgf"> + <zipfileset dir="." includes="gadgets.xml"/> + <zipfileset dir="." includes="resources/*"/> + <zipfileset dir="targets/build" includes="${project.artifactId}-${project.version}.jar" fullpath="libraries/${project.artifactId}-${project.version}.jar"/> + </zip> + </target> +</project> \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/build.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/gadgets.xml =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/gadgets.xml (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/gadgets.xml 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,24 @@ +<gadgets> + <gadget> + <interpreter + kind="java"> + <executable> net.karmaLab.tuxDroid.gadgets.HelloWorldGadget</executable> + </interpreter> + <description> + <name>HelloWorld Sample Gadget</name> + <description>This sample gadget that is throwing a simple Hello World notification</description> + <author>Y. Brault (C) http://artisan.karma-lab.net 2008</author> + <version>1.0</version> + <iconFile>resources/HelloWorld.png</iconFile> + <executionMode>command</executionMode> + <uuid>548f7a9a-567c-423e-a0dd-102ff68a1a42</uuid> + </description> + <parameters> + <parameter + name="message" + description="Message sent when I'm saying hello" + type="string" + defaultValue="I'm the most wonderfull" /> + </parameters> + </gadget> +</gadgets> \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/gadgets.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/libraries ___________________________________________________________________ Name: svn:ignore + * Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/project.xml =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/project.xml (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/project.xml 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,67 @@ +<project> + <name>tuxdroid-gadget-java-samples</name> + <title>TuxDroid Gadget Java API Samples</title> + <description>TuxDroid Gadget Java API Samples</description> + + <license> + <name>GPL</name> + </license> + + <groupId>com.kysoh</groupId> + <artifactId>tuxdroid-gadget-java-samples</artifactId> + <version>0.1</version> + + <dependencies> + <dependency> + <groupId>net.karmaLab</groupId> + <artifactId>karmalab-commons</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>com.kysoh</groupId> + <artifactId>tuxdroid-gadget-framework</artifactId> + <version>0.1</version> + </dependency> + </dependencies> + <repositories> + <repository> + <id>central</id> + <name>Maven Repository Switchboard</name> + <layout>default</layout> + <url>http://repo1.maven.org/maven2</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>karma-lab</id> + <name>KarmaLab Repository Switchboard</name> + <layout>default</layout> + <url>http://artisan.karma-lab.net/software/repository</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + <developers> + <developer> + <name>Yoran Brault</name> + <organization>kysoh</organization> + <email> + software@_bad_karma-lab.net (remove _bad_ before sending + an email) + </email> + <organizationUrl>http://www.kysoh.com/</organizationUrl> + </developer> + </developers> + + <releases> + <release date="03/06/2008" version="0.1"> + <changes> + <change kind="creation"> + <description>First version</description> + </change> + </changes> + </release> + </releases> +</project> \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/project.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/resources/HelloWorld.png =================================================================== (Binary files differ) Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/resources/HelloWorld.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/resources/help.txt =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/resources/help.txt (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/resources/help.txt 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1 @@ +This is some help... \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/resources/help.txt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/logging.properties =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/logging.properties (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/logging.properties 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,18 @@ +handlers = net.karmaLab.traces.TracesHandler + +net.karmaLab.traces.TracesHandler.formatter = net.karmaLab.traces.TracesFormater +net.karmaLab.traces.TracesHandler.level = ALL + +#java.util.logging.FileHandler.formatter=net.karmaLab.traces.TracesFormater +#java.util.logging.FileHandler.level=ALL +#java.util.logging.FileHandler.pattern=../t/t.log +#java.util.logging.FileHandler.count=1 + +.level = INFO +net.karmaLab.beans.level=INFO +net.karmaLab.xml.level=INFO +net.karmaLab.messaging.level=INFO +net.karmaLab.thread.level=INFO +net.karmaLab.shell.level=INFO +net.karmaLab.tuxDroid.gadgets.framework.level=INFO +net.karmaLab.xml.feed.parsers.info=CONFIG Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/logging.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/DeprecatedHelloWorldGadget.java =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/DeprecatedHelloWorldGadget.java (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/DeprecatedHelloWorldGadget.java 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,106 @@ +/* This file is part of "TuxDroid Gadget Java API Samples". + * Copyright 2008, kysoh + * Author : Yoran Brault + * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an email) + * Site : http://www.kysoh.com/ + * + * "TuxDroid Gadget Java API Samples" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid Gadget Java API Samples" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid Gadget Java API Samples"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package net.karmaLab.tuxDroid.gadgets; + +import java.io.IOException; + +import com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadget; +import com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadgetConfiguration; + +/** + * Simple Hello World gadget. + * + * @author Yoran Brault + */ +public class DeprecatedHelloWorldGadget extends SimpleGadget { + + /** + * This is the storage of our gadget. This configuration is dynamicaly + * binded to instance parameters from the control center. You should make it + * as a plain JavaBean with private fields, getters AND setters in order to + * have a working binding. + */ + public static class Configuration extends SimpleGadgetConfiguration { + private String message = "I'm a verrry simple gadget !!"; + + /** + * Message value. + * + * @return the message + */ + public String getMessage() { + return message; + } + + /** + * Change the message to notify after the "Hello" + * + * @param message + * the message to set + */ + public void setMessage(String message) { + this.message = message; + } + + } + + /** + * The main class is here to boot the gadget. You can use this in a + * stand-alone version too. + * + * @param args + * @throws InterruptedException + * @throws IOException + */ + public static void main(String[] args) throws InterruptedException, IOException { + new DeprecatedHelloWorldGadget().boot(); + } + + /** + * This field host our configuration. + */ + private Configuration configuration; + + /** + * This method should be overiden in order to give a feature to the gadget. + * You should leave this as soon as possible !! + * + * @see com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadget#start() + */ + @Override + public void start() { + speak("Hello World : " + configuration.getMessage()); + } + + /** + * This method should be overiden in order to initialize the gadget. Don't + * call any ancester method except the setConfguration method + * + * @see com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadget#start() + */ + @Override + protected void initialize() { + configuration = new Configuration(); + setConfiguration(configuration); + } +} Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/DeprecatedHelloWorldGadget.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/HelloWorldGadget.java =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/HelloWorldGadget.java (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/HelloWorldGadget.java 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,90 @@ +/* This file is part of "TuxDroid Gadget Java API Samples". + * Copyright 2008, kysoh + * Author : Yoran Brault + * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an email) + * Site : http://www.kysoh.com/ + * + * "TuxDroid Gadget Java API Samples" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid Gadget Java API Samples" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid Gadget Java API Samples"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package net.karmaLab.tuxDroid.gadgets; + +import java.io.IOException; + +import com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadget; +import com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadgetConfiguration; + +/** + * Simple Hello World gadget. + * + * @author Yoran Brault + */ +public class HelloWorldGadget extends SimpleGadget<HelloWorldGadget.Configuration> { + + /** + * This is the storage of our gadget. This configuration is dynamicaly + * binded to instance parameters from the control center. You should make it + * as a plain JavaBean with private fields, getters AND setters in order to + * have a working binding. + */ + public static class Configuration extends SimpleGadgetConfiguration { + private String message = "I'm a verrry simple gadget !!"; + + /** + * Message value. + * + * @return the message + */ + public String getMessage() { + return message; + } + + /** + * Change the message to notify after the "Hello" + * + * @param message + * the message to set + */ + public void setMessage(String message) { + this.message = message; + } + + } + + /** + * The main class is here to boot the gadget. You can use this in a + * stand-alone version too. + * + * @param args + * @throws InterruptedException + * @throws IOException + */ + public static void main(String[] args) throws InterruptedException, IOException { + new HelloWorldGadget().boot(new Configuration()); + } + + /** + * This method should be overiden in order to give a feature to the gadget. + * You should leave this as soon as possible !! + * + * @see com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadget#start() + */ + @Override + public void start() { + throwMessageNotification("Hello World : " + configuration().getMessage()); + } + +} Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/HelloWorldGadget.java ___________________________________________________________________ Name: svn:mime-type + text/plain Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/targets ___________________________________________________________________ Name: svn:ignore + * Added: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/net/karmaLab/tuxDroid/gadgets/HelloWorldGadgetTest.java =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/net/karmaLab/tuxDroid/gadgets/HelloWorldGadgetTest.java (rev 0) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/net/karmaLab/tuxDroid/gadgets/HelloWorldGadgetTest.java 2008-07-27 09:42:42 UTC (rev 1394) @@ -0,0 +1,36 @@ +/* This file is part of "TuxDroid Gadget Java API Samples". + * Copyright 2008, kysoh + * Author : Yoran Brault + * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an email) + * Site : http://www.kysoh.com/ + * + * "TuxDroid Gadget Java API Samples" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid Gadget Java API Samples" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid Gadget Java API Samples"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package net.karmaLab.tuxDroid.gadgets; + +import java.io.File; + +import net.karmaLab.tools.SystemInformation; + +import com.kysoh.tuxdroid.gadget.framework.container.GadgetsContainerException; +import com.kysoh.tuxdroid.gadget.framework.tester.GadgetTester; + +public class HelloWorldGadgetTest { + public static void main(String[] args) throws GadgetsContainerException { + new GadgetTester().testGadget(new File("."), HelloWorldGadget.class, SystemInformation.classpathFiles()); + } +} Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/tests/net/karmaLab/tuxDroid/gadgets/HelloWorldGadgetTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain |
From: ulhume <c2m...@c2...> - 2008-07-27 09:41:11
|
Author: ulhume Date: 2008-07-27 11:41:21 +0200 (Sun, 27 Jul 2008) New Revision: 1393 Added: software_suite_v2/software/tools/tuxdroid-gadget-tester/ Removed: software_suite_v2/software/gadgets/tuxdroid-gadget-tester/ Log: moved Copied: software_suite_v2/software/tools/tuxdroid-gadget-tester (from rev 1392, software_suite_v2/software/gadgets/tuxdroid-gadget-tester) |
From: ulhume <c2m...@c2...> - 2008-07-27 09:40:45
|
Author: ulhume Date: 2008-07-27 11:40:55 +0200 (Sun, 27 Jul 2008) New Revision: 1392 Removed: software_suite_v2/software/tools/tuxdroid-gadgets-tester/ Log: clean up |
From: ulhume <c2m...@c2...> - 2008-07-27 09:40:20
|
Author: ulhume Date: 2008-07-27 11:40:28 +0200 (Sun, 27 Jul 2008) New Revision: 1391 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-weather/trunk/tuxdroid-gadget-weather/ Log: disconnected builder Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-weather/trunk/tuxdroid-gadget-weather ___________________________________________________________________ Name: svn:externals + builder http://svn.tuxisalive.com/software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder |
From: ulhume <c2m...@c2...> - 2008-07-27 09:39:17
|
Author: ulhume Date: 2008-07-27 11:39:26 +0200 (Sun, 27 Jul 2008) New Revision: 1390 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/ Log: Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester ___________________________________________________________________ Name: svn:externals - builder http://artisan.karma-lab.net/dev/karmalab-commons/trunk/karmalab-commons/builder + builder http://svn.tuxisalive.com/software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder |
From: ulhume <c2m...@c2...> - 2008-07-27 09:38:52
|
Author: ulhume Date: 2008-07-27 11:39:01 +0200 (Sun, 27 Jul 2008) New Revision: 1389 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd/ Log: disconnected builder Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd ___________________________________________________________________ Name: svn:externals + builder http://svn.tuxisalive.com/software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder |
From: ulhume <c2m...@c2...> - 2008-07-27 09:38:08
|
Author: ulhume Date: 2008-07-27 11:38:13 +0200 (Sun, 27 Jul 2008) New Revision: 1388 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-feed/trunk/tuxdroid-gadget-feed/ Log: disconnected builder Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-feed/trunk/tuxdroid-gadget-feed ___________________________________________________________________ Name: svn:externals - builder http://artisan.karma-lab.net/dev/karmalab-commons/trunk/karmalab-commons/builder + builder http://svn.tuxisalive.com/software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder |
From: ulhume <c2m...@c2...> - 2008-07-27 09:33:28
|
Author: ulhume Date: 2008-07-27 11:33:38 +0200 (Sun, 27 Jul 2008) New Revision: 1387 Modified: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-bash-samples/trunk/tuxdroid-gadget-bash-samples/ Log: Property changes on: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-bash-samples/trunk/tuxdroid-gadget-bash-samples ___________________________________________________________________ Name: svn:externals + builder http://svn.tuxisalive.com/software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder |
From: ulhume <c2m...@c2...> - 2008-07-27 09:30:59
|
Author: ulhume Date: 2008-07-27 11:31:06 +0200 (Sun, 27 Jul 2008) New Revision: 1386 Modified: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/build.xml Log: header fix Modified: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/build.xml =================================================================== --- software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/build.xml 2008-07-27 09:29:59 UTC (rev 1385) +++ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/build.xml 2008-07-27 09:31:06 UTC (rev 1386) @@ -1,3 +1,26 @@ +<!-- +This file is part of "karmaLab commons tools". + * Copyright 2008, kysoh + * Author : Yoran Brault + * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an email) + * Site : http://artisan.karma-lab.net + * + * "TuxDroid Gadget Framework" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid Gadget Framework" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid Gadget Framework"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + --> + <project default="Update dependencies"> <!-- ****************************************************************** |
From: ulhume <c2m...@c2...> - 2008-07-27 09:29:50
|
Author: ulhume Date: 2008-07-27 11:29:59 +0200 (Sun, 27 Jul 2008) New Revision: 1385 Modified: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/ Log: disconnected builder Property changes on: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework ___________________________________________________________________ Name: svn:externals - builder http://artisan.karma-lab.net/dev/karmalab-commons/trunk/karmalab-commons/builder |
From: ulhume <c2m...@c2...> - 2008-07-27 09:28:59
|
Author: ulhume Date: 2008-07-27 11:29:07 +0200 (Sun, 27 Jul 2008) New Revision: 1384 Added: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/build.xml software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/doxygen/ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/doxygen/configuration.doxyfile software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/doxygen/doxygen.css software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/doxygen/footer.html software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/doxygen/header.html software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/libraries/ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/libraries/ant-contrib.jar software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/libraries/ant-dependencies-0.1.jar software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/libraries/build.xml software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/libraries/gplize-1.2.jar software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/libraries/karmalab-commons-1.2.jar Log: Added: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/build.xml =================================================================== --- software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/build.xml (rev 0) +++ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/build.xml 2008-07-27 09:29:07 UTC (rev 1384) @@ -0,0 +1,143 @@ +<project default="Update dependencies"> + <!-- + ****************************************************************** + Ant custom tasks + ****************************************************************** --> + <typedef resource="net/karmaLab/ant/dependencies/antlib.xml"> + <classpath> + <pathelement location="./builder/libraries/ant-dependencies-0.1.jar" /> + <pathelement location="./builder/libraries/karmalab-commons-1.2.jar" /> + </classpath> + </typedef> + <typedef resource="net/karmaLab/ant/gplize/antlib.xml"> + <classpath> + <pathelement location="./builder/libraries/karmalab-commons-1.2.jar" /> + <pathelement location="./builder/libraries/gplize-1.2.jar" /> + </classpath> + </typedef> + <typedef resource="net/sf/antcontrib/antlib.xml"> + <classpath> + <pathelement location="./builder/libraries/ant-contrib.jar" /> + </classpath> + </typedef> + + <!-- + ****************************************************************** + Load artifact properties + ****************************************************************** --> + <xmlproperty file="project.xml" /> + + <!-- + ****************************************************************** + Load dependencies + ****************************************************************** --> + <target name="Update dependencies" + description="Update project external dependencies"> + <mkdir dir="libraries" /> + + <dependencies id="dependecies" + libraryPath="libraries" + file="project.xml" /> + + <path id="files-classpath"> + <fileset dir="libraries"> + <include name="**/*.jar" /> + </fileset> + </path> + </target> + + <!-- + ****************************************************************** + Compile sources + ****************************************************************** --> + <target name="Build from sources" + depends="Update dependencies" + description="Build from sources"> + <delete dir="targets/ant" /> + <mkdir dir="targets/ant" /> + <gplize target="." /> + <javac debug="false" + optimize="on" + srcdir="sources" + target="1.6" + source="1.6" + destdir="targets/ant" + encoding="UTF-8"> + <classpath> + <path refid="files-classpath" /> + </classpath> + </javac> + <copy todir="targets/ant"> + <fileset dir="sources"> + <exclude name="**/*.java" /> + <exclude name="**/.svn" /> + </fileset> + </copy> + </target> + + <!-- + ****************************************************************** + Build artifact + ****************************************************************** --> + <target name="Create JAR file" + depends="Build from sources" + description="Create JAR file"> + <mkdir dir="targets/build" /> + <jar destfile="targets/build/${project.artifactId}-${project.version}.jar" + basedir="targets/ant"> + <manifest> + <attribute name="Main-Class" value="${project.mainclass}" /> + </manifest> + </jar> + <copy file="targets/build/${project.artifactId}-${project.version}.jar" + todir="./libraries" /> + <publish repository="targets/repository" + pom="project.xml" + artifact="targets/build/${project.artifactId}-${project.version}.jar" /> + <copy file="project.xml" + tofile="targets/build/${project.artifactId}-${project.version}.pom" /> + <publish repository="targets/repository" + pom="project.xml" + artifact="targets/build/${project.artifactId}-${project.version}.pom" /> + </target> + + <!-- + ****************************************************************** + Build a FAT jar + ****************************************************************** --> + <target name="Create fat JAR" + depends="Create JAR file" + description="Create fat JAR"> + <delete dir="targets/fatjar" /> + <mkdir dir="targets/fatjar" /> + <foreach target="Explode dependencies" param="classpath.entry"> + <path refid="files-classpath" /> + </foreach> + <jar destfile="targets/build/${project.artifactId}-full-${project.version}.jar" + basedir="targets/fatjar"> + <manifest> + <attribute name="Main-Class" value="${project.mainclass}" /> + </manifest> + </jar> + </target> + + <target name="Explode dependencies"> + <unzip dest="targets/fatjar" + src="${classpath.entry}" + overwrite="true" /> + </target> + + <!-- + ****************************************************************** + Deploy Artefact + ****************************************************************** --> + <target name="Deploy artifact to repository" + depends="Create JAR file" + description="Deploy artifact to repository"> + <exec executable="rsync"> + <arg value="-av" /> + <arg value="targets/repository/" /> + <arg value="badbox:/storage/web/storage/software.karma-lab.net/repository/" /> + </exec> + </target> +</project> \ No newline at end of file Property changes on: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/build.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Added: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/doxygen/configuration.doxyfile =================================================================== --- software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/doxygen/configuration.doxyfile (rev 0) +++ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/builder/doxygen/configuration.doxyfile 2008-07-27 09:29:07 UTC (rev 1384) @@ -0,0 +1,1356 @@ +# Doxyfile 1.5.5 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = ../../documentation + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, +# and Ukrainian. + +OUTPUT_LANGUAGE = French + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = YES + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST = YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../../sources + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = ISO-8859-1 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = . + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +#HTML_HEADER = header.html + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +#HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +#HTML_STYLESHEET = doxygen.css + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = YES + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HA... [truncated message content] |