Ardour  8.7-14-g57a6773833
message.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_message_h_
20 #define _ardour_surface_websockets_message_h_
21 
22 #include "state.h"
23 
24 namespace ArdourSurface {
25 
27 {
28 public:
30  NodeStateMessage (void*, size_t);
31 
32  size_t serialize (void*, size_t) const;
33 
34  bool is_valid () const
35  {
36  return _valid;
37  }
38  bool is_write () const
39  {
40  return _write;
41  }
42  const NodeState& state () const
43  {
44  return _state;
45  }
46 
47 private:
48  bool _valid;
49  bool _write;
51 };
52 
53 } // namespace ArdourSurface
54 
55 #endif // _ardour_surface_websockets_message_h_
size_t serialize(void *, size_t) const
const NodeState & state() const
Definition: message.h:42
NodeStateMessage(const NodeState &state)