Constantin Kaplinsky | a2adc8d | 2006-05-25 05:01:55 +0000 | [diff] [blame] | 1 | /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. |
| 2 | * |
| 3 | * This is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation; either version 2 of the License, or |
| 6 | * (at your option) any later version. |
| 7 | * |
| 8 | * This software is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this software; if not, write to the Free Software |
| 15 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
| 16 | * USA. |
| 17 | */ |
| 18 | |
| 19 | // |
| 20 | // SSecurityFactoryStandard - implementation of the SSecurityFactory |
| 21 | // interface. |
| 22 | // |
| 23 | // Server implementations must define an instance of a |
| 24 | // VncAuthPasswdParameter-based class somewhere. Any class based on |
| 25 | // VncAuthPasswdParameter will automatically register itself as the |
| 26 | // password parameter to be used by the Standard factory. |
| 27 | // |
| 28 | // Two implementations are provided here: |
| 29 | // |
| 30 | // VncAuthPasswdConfigParameter - reads the password from the Binary |
| 31 | // parameter "Password". |
| 32 | // VncAuthPasswdFileParameter - reads the password from the file named |
| 33 | // in the String parameter "PasswordFile". |
| 34 | // |
| 35 | // This factory supports only the "None" and "VncAuth" security types. |
| 36 | // |
| 37 | |
| 38 | #ifndef __RFB_SSECURITYFACTORY_STANDARD_H__ |
| 39 | #define __RFB_SSECURITYFACTORY_STANDARD_H__ |
| 40 | |
| 41 | #include <rfb/SSecurityVncAuth.h> |
| 42 | #include <rfb/Configuration.h> |
| 43 | #include <rfb/util.h> |
| 44 | |
| 45 | namespace rfb { |
| 46 | |
Constantin Kaplinsky | a2adc8d | 2006-05-25 05:01:55 +0000 | [diff] [blame] | 47 | class SSecurityFactoryStandard : public SSecurityFactory { |
| 48 | public: |
| 49 | virtual SSecurity* getSSecurity(rdr::U8 secType, bool reverse); |
| 50 | virtual void getSecTypes(std::list<rdr::U8>* secTypes, bool reverse); |
| 51 | static StringParameter sec_types; |
| 52 | static StringParameter rev_sec_types; |
Constantin Kaplinsky | a2adc8d | 2006-05-25 05:01:55 +0000 | [diff] [blame] | 53 | protected: |
| 54 | virtual bool isSecTypeSupported(rdr::U8 secType); |
| 55 | }; |
| 56 | |
| 57 | } |
| 58 | #endif |