author | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
commit | 15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff) | |
tree | c2fa0399a2c47fda8e2cd0092c73a809d17f68eb /noncore/comm/keypebble/krfblogin.h | |
download | opie-15318cad33835e4e2dc620d033e43cd930676cdd.zip opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2 |
Initial revision
Diffstat (limited to 'noncore/comm/keypebble/krfblogin.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfblogin.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/noncore/comm/keypebble/krfblogin.h b/noncore/comm/keypebble/krfblogin.h new file mode 100644 index 0000000..5208210 --- a/dev/null +++ b/noncore/comm/keypebble/krfblogin.h | |||
@@ -0,0 +1,62 @@ | |||
1 | // -*- c++ -*- | ||
2 | |||
3 | #ifndef KRFBLOGIN_H | ||
4 | #define KRFBLOGIN_H | ||
5 | |||
6 | #include <qobject.h> | ||
7 | |||
8 | class KRFBConnection; | ||
9 | |||
10 | /** | ||
11 | * Handles logging into the RFB server. | ||
12 | * | ||
13 | * @version $Id$ | ||
14 | * @author Richard Moore, rich@kde.org | ||
15 | */ | ||
16 | class KRFBLogin : QObject | ||
17 | { | ||
18 | Q_OBJECT | ||
19 | |||
20 | public: | ||
21 | enum State { | ||
22 | AwaitingServerVersion, | ||
23 | AwaitingAuthScheme, | ||
24 | AwaitingChallenge, | ||
25 | WaitingForResponse, | ||
26 | Authenticated, | ||
27 | Ready, | ||
28 | Failed, | ||
29 | Error | ||
30 | }; | ||
31 | |||
32 | KRFBLogin( KRFBConnection *con ); | ||
33 | ~KRFBLogin(); | ||
34 | |||
35 | KRFBLogin::State state() const; | ||
36 | |||
37 | protected: | ||
38 | void sendClientVersion(); | ||
39 | |||
40 | protected slots: | ||
41 | void getPassword(); | ||
42 | void gotServerVersion(); | ||
43 | void gotAuthScheme(); | ||
44 | void gotChallenge(); | ||
45 | void gotAuthResult(); | ||
46 | void gotFailureReasonSize(); | ||
47 | |||
48 | signals: | ||
49 | void passwordRequired( KRFBConnection * ); | ||
50 | void error( const QString & ); | ||
51 | void status( const QString & ); | ||
52 | |||
53 | private: | ||
54 | KRFBConnection *con; | ||
55 | State currentState; | ||
56 | QCString versionString; | ||
57 | int serverMajor; | ||
58 | int serverMinor; | ||
59 | }; | ||
60 | |||
61 | #endif // KRFBLOGIN_H | ||
62 | |||