Open Lighting Architecture
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
E131Plugin.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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15  *
16  * E131Plugin.h
17  * Interface for the E1.131 plugin class
18  * Copyright (C) 2007-2009 Simon Newton
19  */
20 
21 #ifndef PLUGINS_E131_E131PLUGIN_H_
22 #define PLUGINS_E131_E131PLUGIN_H_
23 
24 #include <string>
25 #include "olad/Plugin.h"
26 #include "ola/plugin_id.h"
27 
28 namespace ola {
29 namespace plugin {
30 namespace e131 {
31 
32 class E131Plugin: public ola::Plugin {
33  public:
34  explicit E131Plugin(ola::PluginAdaptor *plugin_adaptor):
35  ola::Plugin(plugin_adaptor),
36  m_device(NULL) {}
37  ~E131Plugin() {}
38 
39  string Name() const { return PLUGIN_NAME; }
40  ola_plugin_id Id() const { return OLA_PLUGIN_E131; }
41  string Description() const;
42  string PluginPrefix() const { return PLUGIN_PREFIX; }
43 
44  private:
45  bool StartHook();
46  bool StopHook();
47  bool SetDefaultPreferences();
48 
49  class E131Device *m_device;
50  static const char CID_KEY[];
51  static const char DEFAULT_DSCP_VALUE[];
52  static const char DEFAULT_PORT_COUNT[];
53  static const char DSCP_KEY[];
54  static const char IGNORE_PREVIEW_DATA_KEY[];
55  static const char INPUT_PORT_COUNT_KEY[];
56  static const char IP_KEY[];
57  static const char OUTPUT_PORT_COUNT_KEY[];
58  static const char PLUGIN_NAME[];
59  static const char PLUGIN_PREFIX[];
60  static const char PREPEND_HOSTNAME_KEY[];
61  static const char REVISION_0_2[];
62  static const char REVISION_0_46[];
63  static const char REVISION_KEY[];
64 };
65 } // namespace e131
66 } // namespace plugin
67 } // namespace ola
68 #endif // PLUGINS_E131_E131PLUGIN_H_