Merge branch 'master' of https://scm.cri.ensmp.fr/git/Faustine
[Faustine.git] / interpreter / preprocessor / faust-0.9.47mr3 / architecture / osclib / faust / src / osc / OSCSetup.h
1 /*
2
3 Copyright (C) 2011 Grame
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 2.1 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; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France
20 research@grame.fr
21
22 */
23
24
25 #ifndef __OSCSetup__
26 #define __OSCSetup__
27
28 #include <string>
29 #include <ostream>
30
31 #include "OSCStream.h"
32
33 namespace oscfaust
34 {
35
36 class OscThread;
37 class MessageProcessor;
38 //--------------------------------------------------------------------------
39 /*!
40 \brief network management utility
41 */
42 class OSCSetup
43 {
44 OscThread* fOSCThread; // a thread that is listening to the osc in socket
45 public:
46 OSCSetup() : fOSCThread(0) {}
47 virtual ~OSCSetup();
48
49 bool start(MessageProcessor* mp, int& inPort, int outPort, int errPort, const char* address);
50
51 void stop();
52 bool running() const;
53 };
54
55 } // end namespoace
56
57 #endif