libsolidcontrol
authentication.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SOLID_CONTROL_AUTHENTICATION_H
00022 #define SOLID_CONTROL_AUTHENTICATION_H
00023
00024 #include <solid/control/ifaces/authentication.h>
00025
00026 namespace Solid
00027 {
00028 namespace Control
00029 {
00033 class SOLIDCONTROL_EXPORT Authentication
00034 {
00035 public:
00036 typedef QMap<QString, QString> SecretMap;
00037
00038 Authentication();
00039 virtual ~Authentication();
00040
00045 void setSecrets(const SecretMap &);
00049 SecretMap secrets() const;
00050
00051 private:
00052 class Private;
00053 Private * const d;
00054 };
00055
00059 class SOLIDCONTROL_EXPORT AuthenticationNone : public Authentication
00060 {
00061 public:
00062 AuthenticationNone();
00063 virtual ~AuthenticationNone();
00064
00065 private:
00066 class Private;
00067 Private * const d;
00068 };
00069
00074 class SOLIDCONTROL_EXPORT AuthenticationWep : public Authentication
00075 {
00076 public:
00081 enum WepType { WepAscii, WepHex, WepPassphrase };
00088 enum WepMethod { WepOpenSystem, WepSharedKey };
00089
00090 AuthenticationWep();
00091 virtual ~AuthenticationWep();
00092
00096 void setMethod(WepMethod);
00100 WepMethod method() const;
00104 void setType(WepType);
00108 WepType type() const;
00117 void setKeyLength(int);
00121 int keyLength() const;
00122
00123 private:
00124 class Private;
00125 Private * const d;
00126 };
00127
00132 class SOLIDCONTROL_EXPORT AuthenticationWpa : public Authentication
00133 {
00134 public:
00138 enum WpaProtocol { WpaAuto, WpaTkip, WpaCcmpAes,
00139 WpaEap };
00143 enum WpaVersion { Wpa1, Wpa2 };
00144
00148 enum WpaKeyManagement { WpaPsk, Wpa8021x };
00149
00150 AuthenticationWpa();
00151 virtual ~AuthenticationWpa();
00152
00156 void setProtocol(WpaProtocol);
00160 WpaProtocol protocol() const;
00161
00165 void setVersion(WpaVersion);
00169 WpaVersion version() const;
00170
00174 void setKeyManagement(WpaKeyManagement);
00175
00179 WpaKeyManagement keyManagement() const;
00180
00181 private:
00182 class Private;
00183 Private * const d;
00184 };
00185
00189 class SOLIDCONTROL_EXPORT AuthenticationWpaPersonal : public AuthenticationWpa
00190 {
00191 public:
00192 AuthenticationWpaPersonal();
00193 virtual ~AuthenticationWpaPersonal();
00194
00195 private:
00196 class Private;
00197 Private * const d;
00198 };
00199
00203 class SOLIDCONTROL_EXPORT AuthenticationWpaEnterprise : public AuthenticationWpa
00204 {
00205 public:
00209 enum EapMethod { EapPeap, EapTls, EapTtls, EapMd5, EapMsChap, EapOtp, EapGtc };
00210 AuthenticationWpaEnterprise();
00211 virtual ~AuthenticationWpaEnterprise();
00212
00216 void setIdentity(const QString &);
00220 QString identity() const;
00221
00225 void setAnonIdentity(const QString &);
00229 QString anonIdentity() const;
00230
00234 void setCertClient(const QString &);
00238 QString certClient() const;
00242 void setCertCA(const QString &);
00246 QString certCA() const;
00247
00251 void setCertPrivate(const QString &);
00255 QString certPrivate() const;
00259 void setMethod(EapMethod);
00263 EapMethod method() const;
00267 void setIdPasswordKey(const QString &);
00271 QString idPasswordKey() const;
00272
00276 void setCertPrivatePasswordKey(const QString &);
00280 QString certPrivatePasswordKey() const;
00281
00282 private:
00283 class Private;
00284 Private * const d;
00285 };
00286
00292 class SOLIDCONTROL_EXPORT AuthenticationValidator
00293 {
00294 public:
00295 AuthenticationValidator();
00296 virtual ~AuthenticationValidator();
00301 bool validate(const Authentication *);
00302 private:
00303 class Private;
00304 Private * const d;
00305 };
00306 }
00307 }
00308
00309 #endif