1 /***************************************************************************
4 begin : Wed May 7th 2003
5 copyright : (C) 2001 by Jasem Mutlaq
6 email : mutlaqja@ikarustech.com
7 ***************************************************************************/
8 /***************************************************************************
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
15 ***************************************************************************/
20 #include <qstringlist.h>
21 #include <kdialogbase.h>
25 #include "indi/lilxml.h"
26 #include "devmanager.h"
43 class IDevice
: public QObject
48 IDevice(QString inLabel
, QString inDriver
, QString inExec
, QString inVersion
);
51 enum ServeMODE
{ M_LOCAL
, M_SERVER
};
56 QStringList serverBuffer
;
68 void processstd(KProcess
*proc
, char* buffer
, int buflen
);
71 void newServerInput();
75 class INDIDriver
: public devManager
82 INDIDriver(QWidget
* parent
= 0);
85 KListView
* deviceContainer
;
89 bool buildDeviceGroup (XMLEle
*root
, char errmsg
[]);
90 bool buildDriverElement(XMLEle
*root
, QListViewItem
*DGroup
, int groupType
, char errmsg
[]);
92 QListViewItem
*lastGroup
;
93 QListViewItem
*lastDevice
;
99 QPixmap establishConnection
;
103 KPopupMenu
*ClientpopMenu
;
104 KPopupMenu
*LocalpopMenu
;
108 bool runDevice(IDevice
*dev
);
109 void removeDevice(IDevice
*dev
);
110 void removeDevice(QString deviceLabel
);
112 int activeDriverCount();
113 bool isDeviceRunning(QString deviceLabel
);
117 std::vector
<IDevice
*> devices
;
123 void updateMenuActions();
124 void ClientprocessRightButton( QListViewItem
*, const QPoint
&, int );
125 void LocalprocessRightButton( QListViewItem
*, const QPoint
&, int );
126 void processDeviceStatus(int);
127 void processHostStatus(int);
129 void modifyINDIHost();
130 void removeINDIHost();
131 void shutdownHost(int mgrID
);
132 void updateLocalButtons();
133 void updateClientButtons();
134 void activateRunService();
135 void activateStopService();
136 void activateHostConnection();
137 void activateHostDisconnection();