TUIO C++ Developer API
OscSender.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_OSCSENDER_H
20 #define INCLUDED_OSCSENDER_H
21 
22 #include "LibExport.h"
23 #include "osc/OscOutboundPacketStream.h"
24 #include "osc/OscHostEndianness.h"
25 #include "ip/NetworkingUtils.h"
26 #include <iostream>
27 #include <cstring>
28 
29 namespace TUIO {
30 
37  class LIBDECL OscSender {
38 
39  public:
40 
44  OscSender (): local(true) {};
45 
49  virtual ~OscSender() {}
50 
57  virtual bool sendOscPacket (osc::OutboundPacketStream *bundle) = 0;
58 
64  virtual bool isConnected () = 0;
65 
71  bool isLocal () { return local; };
72 
78  int getBufferSize () { return buffer_size; };
79 
80  virtual const char* tuio_type() = 0;
81 
82  protected:
83  unsigned int buffer_size;
84  bool local;
85  };
86 }
87 
88 
89 #endif /* INCLUDED_OSCSENDER_H */
90 
Definition: FlashSender.h:166
int getBufferSize()
Definition: OscSender.h:78
Definition: OscSender.h:37
OscSender()
Definition: OscSender.h:44
bool isLocal()
Definition: OscSender.h:71
virtual ~OscSender()
Definition: OscSender.h:49