1 |
/* |
---|
2 |
* Copyright (C) 2005-2007 by Pieter Palmers |
---|
3 |
* |
---|
4 |
* This file is part of FFADO |
---|
5 |
* FFADO = Free Firewire (pro-)audio drivers for linux |
---|
6 |
* |
---|
7 |
* FFADO is based upon FreeBoB |
---|
8 |
* |
---|
9 |
* This library is free software; you can redistribute it and/or |
---|
10 |
* modify it under the terms of the GNU Lesser General Public |
---|
11 |
* License version 2.1, as published by the Free Software Foundation; |
---|
12 |
* |
---|
13 |
* This library is distributed in the hope that it will be useful, |
---|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
16 |
* Lesser General Public License for more details. |
---|
17 |
* |
---|
18 |
* You should have received a copy of the GNU Lesser General Public |
---|
19 |
* License along with this library; if not, write to the Free Software |
---|
20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
---|
21 |
* MA 02110-1301 USA |
---|
22 |
*/ |
---|
23 |
|
---|
24 |
#ifndef __FFADO_OSCMESSAGE__ |
---|
25 |
#define __FFADO_OSCMESSAGE__ |
---|
26 |
|
---|
27 |
#include <string> |
---|
28 |
#include <lo/lo.h> |
---|
29 |
|
---|
30 |
#include "OscArgument.h" |
---|
31 |
|
---|
32 |
#include "../debugmodule/debugmodule.h" |
---|
33 |
|
---|
34 |
using namespace std; |
---|
35 |
|
---|
36 |
namespace OSC { |
---|
37 |
|
---|
38 |
class OscMessage { |
---|
39 |
|
---|
40 |
public: |
---|
41 |
|
---|
42 |
OscMessage(); |
---|
43 |
OscMessage(string path, const char* types, lo_arg** argv, int argc); |
---|
44 |
virtual ~OscMessage(); |
---|
45 |
|
---|
46 |
lo_message makeLoMessage(); |
---|
47 |
|
---|
48 |
void addArgument(int32_t v); |
---|
49 |
void addArgument(int64_t v); |
---|
50 |
void addArgument(float v); |
---|
51 |
void addArgument(string v); |
---|
52 |
|
---|
53 |
OscArgument& getArgument(unsigned int idx); |
---|
54 |
unsigned int nbArguments(); |
---|
55 |
|
---|
56 |
void setPath(string v); |
---|
57 |
string getPath() {return m_Path;}; |
---|
58 |
void print(); |
---|
59 |
|
---|
60 |
protected: |
---|
61 |
typedef std::vector< OscArgument > OscArgumentVector; |
---|
62 |
typedef std::vector< OscArgument >::iterator OscArgumentVectorIterator; |
---|
63 |
OscArgumentVector m_arguments; |
---|
64 |
|
---|
65 |
string m_Path; |
---|
66 |
protected: |
---|
67 |
DECLARE_DEBUG_MODULE; |
---|
68 |
|
---|
69 |
}; |
---|
70 |
|
---|
71 |
} // end of namespace OSC |
---|
72 |
|
---|
73 |
#endif /* __FFADO_OSCMESSAGE__ */ |
---|
74 |
|
---|
75 |
|
---|