dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
iconnection.h
Go to the documentation of this file.
1 
13 /*
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful, but
20  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  * for more details.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, see <http://www.gnu.org/licenses/>
26  */
27 
28 #ifndef ICONNECTION_H
29 #define ICONNECTION_H
30 
31 #include <QObject>
32 #include <QtCore/QStringList>
33 #include <QtCore/QIODevice>
34 
35 #include "core_global.h"
36 #include "idevice.h"
37 
38 namespace Core {
39 
44 class CORE_EXPORT IConnection : public QObject
45 {
46  Q_OBJECT
47 
48 public:
52  virtual QList<IDevice *> availableDevices() = 0;
53 
59  virtual QIODevice *openDevice(IDevice *device) = 0;
60 
61  virtual void closeDevice(const QString &deviceName) { Q_UNUSED(deviceName) }
62 
66  virtual QString connectionName() = 0;
67 
71  virtual QString shortName() { return connectionName(); }
72 
77  virtual void suspendPolling() {}
78  virtual void resumePolling() {}
79 
85  virtual bool reconnect() { return false; }
86 
87 signals:
92  void availableDevChanged(IConnection *);
93 };
94 
95 } // namespace Core
96 
97 #endif // ICONNECTION_H
virtual void suspendPolling()
Definition: iconnection.h:77
virtual void closeDevice(const QString &deviceName)
Definition: iconnection.h:61
virtual bool reconnect()
Used to flag that the device wants that we try to reconnect if it gets disconnected Currently this sh...
Definition: iconnection.h:85
virtual void resumePolling()
Definition: iconnection.h:78
Definition: icore.h:39
virtual QString shortName()
Definition: iconnection.h:71