Open Lighting Architecture  0.9.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SerialWidgetInterface.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  * SerialWidgetInterface.h
17  * The base class for USB Serial widgets. These are devices that appear as a
18  * serial (COM) port, most of them use the FTDI chip.
19  * Copyright (C) 2011 Simon Newton
20  */
21 
22 #ifndef PLUGINS_USBPRO_SERIALWIDGETINTERFACE_H_
23 #define PLUGINS_USBPRO_SERIALWIDGETINTERFACE_H_
24 
25 #include <stdint.h>
26 #include <ola/Callback.h>
27 #include <string>
28 #include "ola/io/Descriptor.h"
29 
30 namespace ola {
31 namespace plugin {
32 namespace usbpro {
33 
34 
35 /*
36  * The SerialWidgetInterface.
37  */
39  public:
41  virtual ~SerialWidgetInterface() {}
42 
43  // The Stop() method should clear out any callbacks
44  virtual void Stop() = 0;
45  virtual ola::io::ConnectedDescriptor *GetDescriptor() const = 0;
46 };
47 } // namespace usbpro
48 } // namespace plugin
49 } // namespace ola
50 #endif // PLUGINS_USBPRO_SERIALWIDGETINTERFACE_H_