Diffstat (limited to 'core/launcher/transferserver.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/transferserver.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/core/launcher/transferserver.h b/core/launcher/transferserver.h index 076e460..a3bb060 100644 --- a/core/launcher/transferserver.h +++ b/core/launcher/transferserver.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
@@ -36,6 +36,20 @@ public: | |||
36 | void newConnection( int socket ); | 36 | void newConnection( int socket ); |
37 | }; | 37 | }; |
38 | 38 | ||
39 | class SyncAuthentication : QObject | ||
40 | { | ||
41 | Q_OBJECT | ||
42 | |||
43 | public: | ||
44 | static int isAuthorized(QHostAddress peeraddress); | ||
45 | static bool checkPassword(const QString& pw); | ||
46 | static bool checkUser(const QString& user); | ||
47 | |||
48 | static QString serverId(); | ||
49 | static QString loginName(); | ||
50 | static QString ownerName(); | ||
51 | }; | ||
52 | |||
39 | 53 | ||
40 | class ServerDTP : public QSocket | 54 | class ServerDTP : public QSocket |
41 | { | 55 | { |
@@ -65,6 +79,7 @@ public: | |||
65 | 79 | ||
66 | Mode dtpMode() { return mode; } | 80 | Mode dtpMode() { return mode; } |
67 | QByteArray buffer() { return buf.buffer(); } | 81 | QByteArray buffer() { return buf.buffer(); } |
82 | QString fileName() const { return file.name(); } | ||
68 | 83 | ||
69 | void setSocket( int socket ); | 84 | void setSocket( int socket ); |
70 | 85 | ||
@@ -131,8 +146,6 @@ protected slots: | |||
131 | void newConnection( int socket ); | 146 | void newConnection( int socket ); |
132 | 147 | ||
133 | protected: | 148 | protected: |
134 | bool checkUser( const QString& user ); | ||
135 | bool checkPassword( const QString& pw ); | ||
136 | bool checkReadFile( const QString& file ); | 149 | bool checkReadFile( const QString& file ); |
137 | bool checkWriteFile( const QString& file ); | 150 | bool checkWriteFile( const QString& file ); |
138 | bool parsePort( const QString& pw ); | 151 | bool parsePort( const QString& pw ); |
@@ -164,5 +177,3 @@ private: | |||
164 | QString lastCommand; | 177 | QString lastCommand; |
165 | int waitsocket; | 178 | int waitsocket; |
166 | }; | 179 | }; |
167 | |||
168 | bool accessAuthorized(QHostAddress peeraddress); | ||