Inherits XGP::XDialog.
Public Member Functions | |
| virtual | ~ConnectDlg () |
Static Public Member Functions | |
| static void | perform (unsigned int cMaxConnections, unsigned int defPort, YGP::ConnectionMgr &connMgr) |
| static void | perform (unsigned int cMaxConnections, const Glib::ustring &defPort, YGP::ConnectionMgr &connMgr) |
Protected Types | |
| enum | { WAIT, CONNECT } |
Protected Member Functions | |
| void | command (int action) |
| void | cancelEvent () |
| void | okEvent () |
| void | valueChanged () const |
| ConnectDlg (unsigned int cMaxConnections, const Glib::ustring &defPort, YGP::ConnectionMgr &connMgr) | |
| void * | waitForConnections (void *socket) throw (YGP::CommError) |
| virtual YGP::Socket * | addClient (int socket) |
| virtual void | connect (const Glib::ustring &target, unsigned int port) throw (YGP::CommError) |
Protected Attributes | |
| Gtk::Entry * | pTarget |
| Gtk::Entry * | pPort |
| Gtk::Button * | pWait |
| Gtk::Button * | pConnect |
| Gtk::Table * | pClient |
| YGP::ConnectionMgr & | cmgr |
The result of this actions is returned in the ConnectionMgr object.
| XGP::ConnectDlg::~ConnectDlg | ( | ) | [virtual] |
Destructor.
| XGP::ConnectDlg::ConnectDlg | ( | unsigned int | cMaxConnections, | |
| const Glib::ustring & | defPort, | |||
| YGP::ConnectionMgr & | connMgr | |||
| ) | [protected] |
Default constructor.
| cMaxConnections | Maximal number of connections the dialog (in server mode) will wait for. | |
| defPort | Default port to listen at/send to | |
| connMgr | Connection manager; holding the connections to use |
| YGP::Socket * XGP::ConnectDlg::addClient | ( | int | socket | ) | [protected, virtual] |
Adds a connected client to the vector holding the connections.
| socket | Socket over which the client communicates |
NULL) | void XGP::ConnectDlg::cancelEvent | ( | ) | [protected, virtual] |
| void XGP::ConnectDlg::command | ( | int | action | ) | [protected, virtual] |
Command handler of the dialog.
| action | Selected command (button) |
Reimplemented from XGP::XDialog.
| void XGP::ConnectDlg::connect | ( | const Glib::ustring & | target, | |
| unsigned int | port | |||
| ) | throw (YGP::CommError) [protected, virtual] |
Connects the client with the passed target.
| target | Name or IP address of target | |
| port | Port the target is listening at |
| YGP::CommError | In case of an connection error |
| void XGP::ConnectDlg::okEvent | ( | ) | [protected, virtual] |
| void XGP::ConnectDlg::perform | ( | unsigned int | cMaxConnections, | |
| const Glib::ustring & | defPort, | |||
| YGP::ConnectionMgr & | connMgr | |||
| ) | [static] |
Performs the dialog (modal).
| cMaxConnections | Maximal number of connections the dialog (in server mode) will wait for. | |
| defPort | Default port to listen at/send to | |
| connMgr | Connection manager; holding the connections to use |
| void XGP::ConnectDlg::perform | ( | unsigned int | cMaxConnections, | |
| unsigned int | defPort, | |||
| YGP::ConnectionMgr & | connMgr | |||
| ) | [static] |
Performs the dialog (modal).
| cMaxConnections | Maximal number of connections the dialog (in server mode) will wait for. | |
| defPort | Default port to listen at/send to | |
| connMgr | Connection manager; holding the connections to use |
| void XGP::ConnectDlg::valueChanged | ( | ) | const [protected] |
Callback if the CANCEL buttons has been pressed.
| void * XGP::ConnectDlg::waitForConnections | ( | void * | pVoid | ) | throw (YGP::CommError) [protected] |
Waits for connections.
| YGP::CommError | In case of an connection error |
YGP::ConnectionMgr& XGP::ConnectDlg::cmgr [protected] |
Class holding the connections.
Gtk::Table* XGP::ConnectDlg::pClient [protected] |
Table holding the controls of the dialog.
Gtk::Button* XGP::ConnectDlg::pConnect [protected] |
Button to connect to a server (client mode).
Gtk::Entry* XGP::ConnectDlg::pPort [protected] |
Entry field for the port of the connection.
Gtk::Entry* XGP::ConnectDlg::pTarget [protected] |
Entry field holding the target computer (IP address or name).
Gtk::Button* XGP::ConnectDlg::pWait [protected] |
Button to wait for connections (server mode).