TUIO C++ Developer API
OscReceiver.h
1 /*
2  TUIO C++ Library
3  Copyright (c) 2005-2017 Martin Kaltenbrunner <martin@tuio.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 3.0 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library.
17 */
18 
19 #ifndef INCLUDED_OSCRECEIVER_H
20 #define INCLUDED_OSCRECEIVER_H
21 
22 #include "LibExport.h"
23 #include "TuioClient.h"
24 
25 #include "osc/OscReceivedElements.h"
26 #include "osc/OscHostEndianness.h"
27 #include "ip/PacketListener.h"
28 #include "ip/IpEndpointName.h"
29 
30 namespace TUIO {
31 
32  class TuioClient; // Forward declaration
33 
40  class LIBDECL OscReceiver: public PacketListener {
41 
42  public:
43 
47  OscReceiver() : connected(false) {};
48 
52  virtual ~OscReceiver() {};
53 
59  virtual void connect(bool lock=false) = 0;
60 
64  virtual void disconnect() = 0;
65 
70  bool isConnected();
71 
77  void addTuioClient(TuioClient *client);
78 
86  void ProcessPacket( const char *data, int size, const IpEndpointName &remoteEndpoint );
87 
88  protected:
89  void ProcessBundle( const osc::ReceivedBundle& b, const IpEndpointName& remoteEndpoint);
90 
91  void ProcessMessage( const osc::ReceivedMessage& message, const IpEndpointName& remoteEndpoint);
92 
93  std::list<TuioClient*> clientList;
94  bool connected;
95  };
96 };
97 #endif /* INCLUDED_OSCRECEIVER_H */
virtual ~OscReceiver()
Definition: OscReceiver.h:52
Definition: FlashSender.h:166
Definition: OscReceiver.h:40
OscReceiver()
Definition: OscReceiver.h:47
Definition: TuioClient.h:50