diff -r fcf435874395 -r 45c889eae324 front_idill/extern/fajran-npTuioClient/TuioClient/TuioClient.h --- a/front_idill/extern/fajran-npTuioClient/TuioClient/TuioClient.h Thu Apr 19 11:53:06 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* - TUIO C++ Library - part of the reacTIVision project - http://reactivision.sourceforge.net/ - - Copyright (c) 2005-2008 Martin Kaltenbrunner - - 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 -*/ - -/* - Modified by alexandre.bastien@iri.centrepompidou.fr to manage TUIO strings. -*/ - -#ifndef INCLUDED_TUIOCLIENT_H -#define INCLUDED_TUIOCLIENT_H - -#ifndef WIN32 -#include -#include -#else -#include -#endif - -#include -#include -#include - -#include "osc/OscReceivedElements.h" -#include "osc/OscPrintReceivedElements.h" - -#include "ip/UdpSocket.h" -#include "ip/PacketListener.h" - -#include "TuioListener.h" -#include "TuioObject.h" -#include "TuioCursor.h" -#include "TuioString.h" - -using namespace osc; - -class TuioClient : public PacketListener { - - public: - TuioClient(); - TuioClient(int p); - ~TuioClient(); - - void start(bool lk=false); - void stop(); - bool isRunning() { return running; } - - - TuioObject* getTuioObject(long s_id); - TuioCursor* getTuioCursor(long s_id); - /* - * Ajouté par alexandre.bastien@iri.centrepompidou.fr - */ - TuioString* getTuioString(long s_id); - std::list getTuioObjects(); - std::list getTuioCursors(); - /* - * Ajouté par alexandre.bastien@iri.centrepompidou.fr - */ - std::list getTuioStrings(); - - void addTuioListener(TuioListener *listener); - void removeTuioListener(TuioListener *listener); - - void ProcessPacket( const char *data, int size, const IpEndpointName& remoteEndpoint ); - - UdpListeningReceiveSocket *socket; - - protected: - void ProcessBundle( const ReceivedBundle& b, const IpEndpointName& remoteEndpoint); - void ProcessMessage( const ReceivedMessage& m, const IpEndpointName& remoteEndpoint); - - private: - std::list listenerList; - - std::list objectList; - std::list aliveObjectList, objectBuffer; - std::list cursorList; - std::list aliveCursorList, cursorBuffer; - /* - * Ajouté par alexandre.bastien@iri.centrepompidou.fr - */ - std::list stringList; - std::list aliveStringList, stringBuffer; - - int32 currentFrame, lastFrame; - - long startTime; - long lastTime; - long getCurrentTime(); - - std::list freeCursorList, freeCursorBuffer; - /* - * Ajouté par alexandre.bastien@iri.centrepompidou.fr - */ - std::list freeStringList, freeStringBuffer; - int maxFingerID, maxStringID; - - #ifndef WIN32 - pthread_t thread; - #else - HANDLE thread; - #endif - - bool locked; - bool running; -}; - -#endif /* INCLUDED_TUIOCLIENT_H */