Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
StageProfiDevice.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  * StageProfiDevice.h
17  * Interface for the stageprofi device
18  * Copyright (C) 2006 Simon Newton
19  */
20 
21 #ifndef PLUGINS_STAGEPROFI_STAGEPROFIDEVICE_H_
22 #define PLUGINS_STAGEPROFI_STAGEPROFIDEVICE_H_
23 
24 #include <memory>
25 #include <string>
26 #include "ola/network/Socket.h"
27 #include "olad/Device.h"
28 
29 namespace ola {
30 
31 class AbstractPlugin;
32 
33 namespace plugin {
34 namespace stageprofi {
35 
36 class StageProfiWidget;
37 
38 class StageProfiDevice: public Device {
39  public:
47  StageProfiWidget *widget,
48  const std::string &name);
49 
54 
55  // TODO(simon): I don't think this get us full stickiness because USB devices
56  // may appear as different devices.
57  std::string DeviceId() const;
58 
59  protected:
60  bool StartHook();
61 
62  private:
63  std::string m_path;
64  std::auto_ptr<StageProfiWidget> m_widget;
65 };
66 } // namespace stageprofi
67 } // namespace plugin
68 } // namespace ola
69 #endif // PLUGINS_STAGEPROFI_STAGEPROFIDEVICE_H_
Definition: Device.h:95
std::string DeviceId() const
The device ID.
Definition: StageProfiDevice.cpp:50
Definition: StageProfiDevice.h:38
StageProfiDevice(AbstractPlugin *owner, StageProfiWidget *widget, const std::string &name)
Create a new StageProfi device.
Definition: StageProfiDevice.cpp:38
~StageProfiDevice()
Destructor.
Definition: StageProfiDevice.cpp:46
Definition: StageProfiWidget.h:36
bool StartHook()
Called during Start().
Definition: StageProfiDevice.cpp:54
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: Plugin.h:38