~ubuntu-branches/ubuntu/lucid/ecasound2.2/lucid

« back to all changes in this revision

Viewing changes to libecasound/eca-osc.h

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2009-11-02 18:22:35 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091102182235-4ngh7699dmkgonyu
Tags: 2.7.0-1
* New upstream release.
* Depend on libreadline-dev instead of libreadline5-dev by request of
  Mattias Klose. It's now libreadline6-dev. (closes: #553748)
* Update menu file to use section Applications/ instead of Apps/.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// ------------------------------------------------------------------------
 
2
// eca-osc.h: Class implementing the Ecasound OSC interface
 
3
// Copyright (C) 2009 Kai Vehmanen
 
4
//
 
5
// Attributes:
 
6
//     eca-style-version: 3
 
7
//
 
8
// This program is free software; you can redistribute it and/or modify
 
9
// it under the terms of the GNU General Public License as published by
 
10
// the Free Software Foundation; either version 2 of the License, or
 
11
// (at your option) any later version.
 
12
// 
 
13
// This program 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
 
16
// GNU General Public License for more details.
 
17
// 
 
18
// You should have received a copy of the GNU General Public License
 
19
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
// ------------------------------------------------------------------------
 
21
 
 
22
#ifndef INCLUDED_ECA_OSC_H
 
23
#define INCLUDED_ECA_OSC_H
 
24
 
 
25
class ECA_CONTROL_MT;
 
26
 
 
27
#ifdef ECA_USE_LIBLO
 
28
 
 
29
#include <lo/lo.h>
 
30
 
 
31
/**
 
32
 * Ecasound Open Source Control Control (OSC) interface 
 
33
 *
 
34
 * The interface is documented in Ecasound codebase:
 
35
 *   - ecasound/Documentation/ecasound_osc_interface.txt
 
36
 *   - http://ecasound.git.sourceforge.net/git/gitweb.cgi?p=ecasound;a=blob;f=Documentation/ecasound_osc_interface.txt;hb=HEAD
 
37
 */
 
38
class ECA_OSC_INTERFACE {
 
39
 
 
40
  friend int cb_lo_method_handler(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data);
 
41
 
 
42
  public:
 
43
 
 
44
  ECA_OSC_INTERFACE(ECA_CONTROL_MT *ecacontrol, int port = -1);
 
45
  ~ECA_OSC_INTERFACE(void);
 
46
 
 
47
  void start(void);
 
48
  void stop(void);
 
49
  bool is_running(void) const;
 
50
  
 
51
 private:
 
52
 
 
53
  int parse_path_param(const std::string &path, int *param);
 
54
  int handle_chain_message(const string &path, const char *types, lo_arg **argv, int argc);
 
55
  int handle_osc_message(const char *path, const char *types, lo_arg **argv, int argc);
 
56
 
 
57
  ECA_CONTROL_MT* ec_repp;
 
58
  bool running_rep;
 
59
  int udp_port_rep;
 
60
  lo_server_thread lo_thr_repp;
 
61
  lo_method method_all_repp;
 
62
};
 
63
 
 
64
#else  /* !ECA_USE_LIBLO */
 
65
 
 
66
class ECA_OSC_INTERFACE;
 
67
 
 
68
#endif /* ECA_USE_LIBLO */
 
69
 
 
70
#endif /* INCLUDED_ECA_OSC_H */