Open Lighting Architecture
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DummyPlugin.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  * DummyPlugin.h
17  * Interface for the dummyplugin class
18  * Copyright (C) 2005-2007 Simon Newton
19  */
20 
21 #ifndef PLUGINS_DUMMY_DUMMYPLUGIN_H_
22 #define PLUGINS_DUMMY_DUMMYPLUGIN_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 dummy {
31 
32 using ola::Plugin;
33 using ola::PluginAdaptor;
34 
35 class DummyDevice;
36 
37 class DummyPlugin: public Plugin {
38  public:
39  explicit DummyPlugin(PluginAdaptor *plugin_adaptor):
40  Plugin(plugin_adaptor),
41  m_device(NULL) {}
42 
43  string Name() const { return PLUGIN_NAME; }
44  string Description() const;
45  ola_plugin_id Id() const { return OLA_PLUGIN_DUMMY; }
46  string PluginPrefix() const { return PLUGIN_PREFIX; }
47 
48  private:
49  bool StartHook();
50  bool StopHook();
51  bool SetDefaultPreferences();
52 
53  DummyDevice *m_device; // the dummy device
54  static const char ACK_TIMER_COUNT_KEY[];
55  static const char ADVANCED_DIMMER_KEY[];
56  static const char DEFAULT_DEVICE_COUNT[];
57  static const char DEFAULT_ACK_TIMER_DEVICE_COUNT[];
58  static const char DEFAULT_SUBDEVICE_COUNT[];
59  static const char DEVICE_NAME[];
60  static const char DIMMER_COUNT_KEY[];
61  static const char DIMMER_SUBDEVICE_COUNT_KEY[];
62  static const char DUMMY_DEVICE_COUNT_KEY[];
63  static const char MOVING_LIGHT_COUNT_KEY[];
64  static const char PLUGIN_NAME[];
65  static const char PLUGIN_PREFIX[];
66  static const char SENSOR_COUNT_KEY[];
67  static const char SUBDEVICE_COUNT_KEY[];
68 };
69 } // namespace dummy
70 } // namespace plugin
71 } // namespace ola
72 #endif // PLUGINS_DUMMY_DUMMYPLUGIN_H_