Ardour
9.0-pre0-380-gbbdb6b0e63
client.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 Luciano Iam <oss@lucianoiam.com>
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#ifndef _ardour_surface_websockets_client_h_
20
#define _ardour_surface_websockets_client_h_
21
22
#include <set>
23
#include <list>
24
25
#include "
message.h
"
26
#include "
state.h
"
27
28
typedef
struct
lws*
Client
;
29
30
namespace
ArdourSurface
{
31
32
typedef
std::list<NodeStateMessage>
ClientOutputBuffer
;
33
34
class
ClientContext
35
{
36
public
:
37
ClientContext
(
Client
wsi
)
38
:
_wsi
(
wsi
){};
39
virtual
~ClientContext
(){};
40
41
Client
wsi
()
const
42
{
43
return
_wsi
;
44
}
45
46
bool
has_state
(
const
NodeState
&);
47
void
update_state
(
const
NodeState
&);
48
49
ClientOutputBuffer
&
output_buf
()
50
{
51
return
_output_buf
;
52
}
53
54
std::string
debug_str
();
55
56
private
:
57
Client
_wsi
;
58
59
typedef
std::set<NodeState>
ClientState
;
60
ClientState
_state
;
61
62
ClientOutputBuffer
_output_buf
;
63
};
64
65
}
// namespace ArdourSurface
66
67
#endif
// _ardour_surface_websockets_client_h_
ArdourSurface::ClientContext
Definition:
client.h:35
ArdourSurface::ClientContext::_state
ClientState _state
Definition:
client.h:60
ArdourSurface::ClientContext::output_buf
ClientOutputBuffer & output_buf()
Definition:
client.h:49
ArdourSurface::ClientContext::debug_str
std::string debug_str()
ArdourSurface::ClientContext::has_state
bool has_state(const NodeState &)
ArdourSurface::ClientContext::wsi
Client wsi() const
Definition:
client.h:41
ArdourSurface::ClientContext::ClientState
std::set< NodeState > ClientState
Definition:
client.h:59
ArdourSurface::ClientContext::ClientContext
ClientContext(Client wsi)
Definition:
client.h:37
ArdourSurface::ClientContext::_output_buf
ClientOutputBuffer _output_buf
Definition:
client.h:62
ArdourSurface::ClientContext::update_state
void update_state(const NodeState &)
ArdourSurface::ClientContext::_wsi
Client _wsi
Definition:
client.h:57
ArdourSurface::ClientContext::~ClientContext
virtual ~ClientContext()
Definition:
client.h:39
ArdourSurface::NodeState
Definition:
state.h:56
Client
struct lws * Client
Definition:
client.h:28
message.h
ArdourSurface
Definition:
cc121.h:71
ArdourSurface::ClientOutputBuffer
std::list< NodeStateMessage > ClientOutputBuffer
Definition:
client.h:32
state.h
libs
surfaces
websockets
client.h
Generated on Fri Nov 8 2024 05:34:45 for Ardour by
1.9.1