Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
HeaderSet.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU Library General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15  *
16  * HeaderSet.h
17  * Interface for the HeaderSet class
18  * HeaderSet is passed down the parsing stack and contains a collection of PDU
19  * headers
20  * Copyright (C) 2007 Simon Newton
21  */
22 
23 #ifndef LIBS_ACN_HEADERSET_H_
24 #define LIBS_ACN_HEADERSET_H_
25 
26 #include "libs/acn/DMPHeader.h"
27 #include "libs/acn/E131Header.h"
28 #include "libs/acn/E133Header.h"
29 #include "libs/acn/RootHeader.h"
30 #include "libs/acn/TransportHeader.h"
31 
32 namespace ola {
33 namespace acn {
34 
35 class HeaderSet {
36  public:
37  HeaderSet() {}
38  ~HeaderSet() {}
39 
40  const TransportHeader &GetTransportHeader() const {
41  return m_transport_header;
42  }
43  void SetTransportHeader(const TransportHeader &header) {
44  m_transport_header = header;
45  }
46 
47  const RootHeader &GetRootHeader() const { return m_root_header; }
48  void SetRootHeader(const RootHeader &header) { m_root_header = header; }
49 
50  const E131Header &GetE131Header() const { return m_e131_header; }
51  void SetE131Header(const E131Header &header) { m_e131_header = header; }
52 
53  const E133Header &GetE133Header() const { return m_e133_header; }
54  void SetE133Header(const E133Header &header) { m_e133_header = header; }
55 
56  const DMPHeader &GetDMPHeader() const { return m_dmp_header; }
57  void SetDMPHeader(const DMPHeader &header) { m_dmp_header = header; }
58 
59  bool operator==(const HeaderSet &other) const {
60  return (
61  m_transport_header == other.m_transport_header &&
62  m_root_header == other.m_root_header &&
63  m_e131_header == other.m_e131_header &&
64  m_e133_header == other.m_e133_header &&
65  m_dmp_header == other.m_dmp_header);
66  }
67 
68  private:
69  TransportHeader m_transport_header;
70  RootHeader m_root_header;
71  E131Header m_e131_header;
72  E133Header m_e133_header;
73  DMPHeader m_dmp_header;
74 };
75 } // namespace acn
76 } // namespace ola
77 #endif // LIBS_ACN_HEADERSET_H_
Definition: HeaderSet.h:35
Definition: TransportHeader.h:35
Definition: E131Header.h:35
Definition: E133Header.h:35
Definition: DMPHeader.h:33
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: RootHeader.h:32