Ardour  9.0-pre0-582-g084a23a80d
ardour_websockets.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2009-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2009 David Robillard <d@drobilla.net>
5  * Copyright (C) 2013-2016 Robin Gareus <robin@gareus.org>
6  * Copyright (C) 2015 Johannes Mueller <github@johannes-mueller.org>
7  * Copyright (C) 2016-2018 Len Ovens <len@ovenwerks.net>
8  * Copyright (C) 2016 Ben Loftis <ben@harrisonconsoles.com>
9  * Copyright (C) 2020 Luciano Iam <oss@lucianoiam.com>
10 
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #ifndef _ardour_surface_websockets_h_
27 #define _ardour_surface_websockets_h_
28 
29 #define ABSTRACT_UI_EXPORTS
30 #include "pbd/abstract_ui.h"
31 
32 #include "ardour/plugin.h"
34 
35 #include "component.h"
36 #include "dispatcher.h"
37 #include "feedback.h"
38 #include "transport.h"
39 #include "server.h"
40 #include "mixer.h"
41 
42 namespace ArdourSurface {
43 
44 const char * const surface_name = "WebSockets Server (Experimental)";
45 const char * const surface_id = "uri://ardour.org/surfaces/ardour_websockets:0";
46 
47 struct ArdourWebsocketsUIRequest : public BaseUI::BaseRequestObject {
48 public:
51 };
52 
54  public AbstractUI<ArdourWebsocketsUIRequest>
55 {
56 public:
58  virtual ~ArdourWebsockets ();
59 
60  int set_active (bool);
61 
63  {
64  return *session;
65  }
67  {
68  return _mixer;
69  }
71  {
72  return _transport;
73  }
75  {
76  return _server;
77  }
79  {
80  return _dispatcher;
81  }
82 
83  /* ControlProtocol */
85 
87 
88 protected:
89  /* BaseUI */
90  void thread_init ();
91 
92  /* AbstractUI */
94 
95 private:
101  std::vector<SurfaceComponent*> _components;
102 
103  int start ();
104  int stop ();
105 };
106 
107 } // namespace ArdourSurface
108 
109 #endif // _ardour_surface_websockets_h_
ArdourTransport & transport_component()
std::vector< SurfaceComponent * > _components
WebsocketsServer & server_component()
ARDOUR::Session & ardour_session()
void do_request(ArdourWebsocketsUIRequest *)
WebsocketsDispatcher & dispatcher_component()
ArdourWebsockets(ARDOUR::Session &)
ARDOUR::Session * session
Definition: basic_ui.h:201
const char *const surface_name
const char *const surface_id