Diffstat (limited to 'noncore/comm/keypebble/krfbconnection.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfbconnection.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/noncore/comm/keypebble/krfbconnection.h b/noncore/comm/keypebble/krfbconnection.h index fe477c1..a8d3457 100644 --- a/noncore/comm/keypebble/krfbconnection.h +++ b/noncore/comm/keypebble/krfbconnection.h @@ -1,25 +1,26 @@ // -*- c++ -*- #ifndef KRFBCONNECTION_H #define KRFBCONNECTION_H #include <qobject.h> #include <qstring.h> #include <qcstring.h> +#include "krfbserver.h" #include <qurl.h> class KRFBLogin; class KRBUpdateHandler; -class KRFBOptions; +class KRFBServer; class QSocket; class KRFBDecoder; class KRFBBuffer; class QTimer; /** * Encapsulates the RFB socket. * */ class KRFBConnection : public QObject { Q_OBJECT @@ -36,50 +37,47 @@ public: Disconnecting, Disconnected, Error }; KRFBConnection( QObject *parent = 0 ); ~KRFBConnection(); //* Get the state of a connection. State state() const; //* Get the options for this connection - KRFBOptions *options() const { return options_; }; + KRFBServer *options() const { return options_; }; KRFBBuffer *buffer() const { return buffer_; }; KRFBDecoder *decoder() const { return decoder_; }; //* Set the base from which the port for a given display will be calculated. void setPortBase( int base ); //* Get the base from which the port for a given display is calculated. int portBase() const; - //* Set the password which will be used to login - void setPassword( const QCString &pass ); - //* Open a connection - void connectTo( const QCString &host, int display ); + void connectTo( KRFBServer); //* Close the connection void disconnect(); //* Get the host - const QCString host() const { return host_; }; + const QCString host() const { return options_->hostname.latin1(); }; //* Get the display - int display() const { return display_; }; + int display() const { return options_->display; }; //* Get the current host/display as a URL const QUrl &url(); //* Reload the display void refresh(); //* Send text to the remote clipboard void sendCutText( const QString & ); protected slots: //* When the shit hits the fan @@ -124,29 +122,26 @@ signals: private: // // The following are called by our friends. // void waitForData( unsigned int ); int read( void *buf, int sz ); int write( void *buf, int sz ); private: - QCString host_; int portBase_; - int display_; - QCString pass_; QSocket *sock; State currentState_; unsigned int minData_; QTimer *updater; KRFBLogin *login; KRFBDecoder *decoder_; - KRFBOptions *options_; + KRFBServer *options_; KRFBBuffer *buffer_; QUrl url_; }; #endif // KRFBCONNECTION_H |