wlanutilities/wlanwizard/inc/wlanwizardutils.h
branchRCL_3
changeset 25 f28ada11abbf
parent 24 63be7eb3fc78
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: 
       
    15  *   WLAN Wizard Utilities
       
    16  *
       
    17  */
       
    18 
       
    19 #ifndef WLANWIZARDUTILS_H
       
    20 #define WLANWIZARDUTILS_H
       
    21 
       
    22 // System includes
       
    23 
       
    24 // User includes
       
    25 
       
    26 // Forward declarations
       
    27 
       
    28 // External data types
       
    29 
       
    30 // Constants
       
    31 
       
    32 /*!
       
    33    @addtogroup group_wlan_wizard
       
    34    @{
       
    35  */
       
    36 
       
    37 class WlanWizardUtils
       
    38 {
       
    39 public:
       
    40     enum KeyStatus {
       
    41         KeyStatusOk = 0,
       
    42         KeyStatusIllegalCharacters,
       
    43         KeyStatusWpaTooShort,
       
    44         KeyStatusWpaTooLong,
       
    45         KeyStatusWepInvalidLength,
       
    46     };
       
    47 
       
    48     enum SsidStatus {
       
    49         SsidStatusOk = 0,
       
    50         SsidStatusIllegalCharacters,
       
    51         SsidStatusInvalidLength
       
    52     };
       
    53 
       
    54     static const int SsidMinLength = 1;
       
    55     static const int SsidMaxLength = 32;
       
    56     static const int WpaMinLength = 8;
       
    57     static const int WpaMaxLength = 64;
       
    58     static const int WepHex64BitMaxLength = 10;
       
    59     static const int WepHex128BitMaxLength = 26;
       
    60     static const int WepAscii64BitMaxLength = 5;
       
    61     static const int WepAscii128BitMaxLength = 13;
       
    62 
       
    63 public:
       
    64     static KeyStatus validateWepKey(const QString &key);
       
    65     static KeyStatus validateWpaKey(const QString &key);
       
    66     static KeyStatus isAscii(const QString &key);
       
    67     static KeyStatus isHex(const QString &key);
       
    68     static SsidStatus validateSsid(const QString &ssid);
       
    69     
       
    70 signals:
       
    71     
       
    72 public slots:
       
    73     
       
    74 protected:
       
    75 
       
    76 protected slots:
       
    77 
       
    78 private:
       
    79     Q_DISABLE_COPY(WlanWizardUtils)
       
    80 
       
    81 private slots:
       
    82 
       
    83 private: // data
       
    84 };
       
    85 
       
    86 /*! @} */
       
    87 
       
    88 #endif /* WLANWIZARDUTILS_H */