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 | |||
@@ -6,11 +6,12 @@ | |||
6 | #include <qobject.h> | 6 | #include <qobject.h> |
7 | #include <qstring.h> | 7 | #include <qstring.h> |
8 | #include <qcstring.h> | 8 | #include <qcstring.h> |
9 | #include "krfbserver.h" | ||
9 | #include <qurl.h> | 10 | #include <qurl.h> |
10 | 11 | ||
11 | class KRFBLogin; | 12 | class KRFBLogin; |
12 | class KRBUpdateHandler; | 13 | class KRBUpdateHandler; |
13 | class KRFBOptions; | 14 | class KRFBServer; |
14 | class QSocket; | 15 | class QSocket; |
15 | class KRFBDecoder; | 16 | class KRFBDecoder; |
16 | class KRFBBuffer; | 17 | class KRFBBuffer; |
@@ -45,7 +46,7 @@ public: | |||
45 | State state() const; | 46 | State state() const; |
46 | 47 | ||
47 | //* Get the options for this connection | 48 | //* Get the options for this connection |
48 | KRFBOptions *options() const { return options_; }; | 49 | KRFBServer *options() const { return options_; }; |
49 | 50 | ||
50 | KRFBBuffer *buffer() const { return buffer_; }; | 51 | KRFBBuffer *buffer() const { return buffer_; }; |
51 | 52 | ||
@@ -57,20 +58,17 @@ public: | |||
57 | //* Get the base from which the port for a given display is calculated. | 58 | //* Get the base from which the port for a given display is calculated. |
58 | int portBase() const; | 59 | int portBase() const; |
59 | 60 | ||
60 | //* Set the password which will be used to login | ||
61 | void setPassword( const QCString &pass ); | ||
62 | |||
63 | //* Open a connection | 61 | //* Open a connection |
64 | void connectTo( const QCString &host, int display ); | 62 | void connectTo( KRFBServer); |
65 | 63 | ||
66 | //* Close the connection | 64 | //* Close the connection |
67 | void disconnect(); | 65 | void disconnect(); |
68 | 66 | ||
69 | //* Get the host | 67 | //* Get the host |
70 | const QCString host() const { return host_; }; | 68 | const QCString host() const { return options_->hostname.latin1(); }; |
71 | 69 | ||
72 | //* Get the display | 70 | //* Get the display |
73 | int display() const { return display_; }; | 71 | int display() const { return options_->display; }; |
74 | 72 | ||
75 | //* Get the current host/display as a URL | 73 | //* Get the current host/display as a URL |
76 | const QUrl &url(); | 74 | const QUrl &url(); |
@@ -133,17 +131,14 @@ private: | |||
133 | int write( void *buf, int sz ); | 131 | int write( void *buf, int sz ); |
134 | 132 | ||
135 | private: | 133 | private: |
136 | QCString host_; | ||
137 | int portBase_; | 134 | int portBase_; |
138 | int display_; | ||
139 | QCString pass_; | ||
140 | QSocket *sock; | 135 | QSocket *sock; |
141 | State currentState_; | 136 | State currentState_; |
142 | unsigned int minData_; | 137 | unsigned int minData_; |
143 | QTimer *updater; | 138 | QTimer *updater; |
144 | KRFBLogin *login; | 139 | KRFBLogin *login; |
145 | KRFBDecoder *decoder_; | 140 | KRFBDecoder *decoder_; |
146 | KRFBOptions *options_; | 141 | KRFBServer *options_; |
147 | KRFBBuffer *buffer_; | 142 | KRFBBuffer *buffer_; |
148 | QUrl url_; | 143 | QUrl url_; |
149 | }; | 144 | }; |