wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_iap_data.h
changeset 0 c40eb8fe8501
child 6 e0f767079796
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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 the License "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:  Class holding all IAP related data
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CORE_IAP_DATA_H
       
    20 #define CORE_IAP_DATA_H
       
    21 
       
    22 #include "core_types.h"
       
    23 #include "core_type_list.h"
       
    24 
       
    25 /**
       
    26  * Class holding all IAP related data
       
    27  * @lib wlmserversrv.lib
       
    28  * @since S60 v3.1
       
    29  */
       
    30 NONSHARABLE_CLASS( core_iap_data_c )
       
    31     {
       
    32 
       
    33 public:
       
    34 
       
    35     /**
       
    36      * Constructor
       
    37      *
       
    38      * @since S60 v3.1
       
    39      * @param iap_data containing structure of IAP data
       
    40      */
       
    41     core_iap_data_c(
       
    42         const core_iap_data_s& iap_data );
       
    43 
       
    44     /**
       
    45      * Destructor
       
    46      */
       
    47     ~core_iap_data_c();
       
    48     
       
    49     /**
       
    50      * Return the ID of the IAP.
       
    51      *
       
    52      * @since S60 v3.1
       
    53      * @return The ID of the IAP.
       
    54      */
       
    55     u32_t id() const;
       
    56     
       
    57     /**
       
    58      * Return the IAP ID of the IAP.
       
    59      *
       
    60      * @since S60 v5.2
       
    61      * @return The IAP ID of the IAP.
       
    62      */
       
    63     u32_t iap_id() const;
       
    64     
       
    65     /**
       
    66      * Return the configured operating mode.
       
    67      *
       
    68      * @since S60 v3.1
       
    69      * @return The configured operating mode.
       
    70      */    
       
    71     core_operating_mode_e operating_mode() const;        
       
    72     
       
    73     /**
       
    74      * Return the configured SSID.
       
    75      *
       
    76      * @since S60 v3.1
       
    77      * @return The configured SSID.
       
    78      */
       
    79     const core_ssid_s& ssid() const;
       
    80     
       
    81     /**
       
    82      * Check whether the SSID is hidden.
       
    83      *
       
    84      * @since S60 v3.1
       
    85      * @return Whether the SSID is hidden.
       
    86      */    
       
    87     bool_t is_hidden() const;
       
    88     
       
    89     /**
       
    90      * Return the requested WEP key.
       
    91      *
       
    92      * @since S60 v3.1
       
    93      * @param Index of the WEP key ( 1 - 4 ).
       
    94      * @return The requested WEP key.
       
    95      */    
       
    96     const core_wep_key_s& wep_key(
       
    97         u32_t key_index ) const;
       
    98 
       
    99     /**
       
   100      * Return the index of the default WEP key.
       
   101      *
       
   102      * @since S60 v3.1
       
   103      * @return The index of the default WEP key.
       
   104      */        
       
   105     u32_t default_wep_key_index() const;
       
   106 
       
   107     /**
       
   108      * Return the configured security mode.
       
   109      *
       
   110      * @since S60 v3.1
       
   111      * @return The configured security mode.
       
   112      */     
       
   113     core_security_mode_e security_mode() const;
       
   114 
       
   115     /**
       
   116      * Return the configured authentication mode.
       
   117      *
       
   118      * @since S60 v3.1
       
   119      * @return The configured authentication mode.
       
   120      */    
       
   121     core_authentication_mode_e authentication_mode() const;
       
   122 
       
   123     /**
       
   124      * Set the authentication mode to the given mode.
       
   125      *
       
   126      * @since S60 v3.2
       
   127      * @param mode Authentication mode to be set.     
       
   128      */
       
   129     void set_authentication_mode(
       
   130         core_authentication_mode_e mode );
       
   131 
       
   132     /**
       
   133      * Check whether PSK is used or not.
       
   134      *
       
   135      * @since S60 v3.1
       
   136      * @return Whether PSK is used or not.
       
   137      */
       
   138     bool_t is_psk_used() const;
       
   139     
       
   140     /**
       
   141      * Check whether PSK key has been overridden.
       
   142      *
       
   143      * @since S60 v3.1
       
   144      * @return Whether PSK key has been overridden.
       
   145      */    
       
   146     bool_t is_psk_overridden() const;
       
   147     
       
   148     /**
       
   149      * Return the overridden PSK key.
       
   150      *
       
   151      * @since S60 v3.1
       
   152      * @return The overridden PSK key.
       
   153      */    
       
   154     const core_wpa_preshared_key_s& psk_key() const;
       
   155     
       
   156     /**
       
   157      * Return the used ad-hoc channel.
       
   158      *
       
   159      * @since S60 v3.1 
       
   160      * @return The used ad-hoc channel. 0 if automatic configuration is used.
       
   161      */
       
   162     u32_t adhoc_channel() const;
       
   163     
       
   164     /**
       
   165      * Check whether IP address is configured dynamically.
       
   166      *
       
   167      * @since S60 v3.1
       
   168      * @return Whether IP address is configured dynamically.
       
   169      */   
       
   170     bool_t is_dynamic_ip_addr() const;
       
   171     
       
   172     /**
       
   173      * Check whether roaming between APs is allowed.
       
   174      *
       
   175      * @since S60 v3.1
       
   176      * @return Whether roaming between APs is allowed.
       
   177      */    
       
   178     bool_t is_roaming_allowed() const;
       
   179     
       
   180     /**
       
   181      * Check whether the configured security mode uses EAP.
       
   182      *
       
   183      * @since S60 v3.1
       
   184      * @return Whether the configured security mode uses EAP.
       
   185      */
       
   186     bool_t is_eap_used() const;
       
   187 
       
   188     /**
       
   189      * Check whether the configured security mode uses WAPI.
       
   190      *
       
   191      * @since S60 v3.2
       
   192      * @return Whether the configured security mode uses WAPI.
       
   193      */
       
   194     bool_t is_wapi_used() const;
       
   195     
       
   196     /**
       
   197      * Check whether the configured security mode is 802.1x.
       
   198      *
       
   199      * @since S60 v3.1
       
   200      * @return Whether the configured security mode is 802.1x.
       
   201      */   
       
   202     bool_t is_802dot1x_used() const;
       
   203     
       
   204     /**
       
   205      * Check whether the IAP whitelist is empty.
       
   206      *
       
   207      * @since S60 v3.1
       
   208      * @return Whether the IAP whitelist is empty.
       
   209      */    
       
   210     bool_t is_iap_whitelist_empty() const;
       
   211     
       
   212     /**
       
   213      * Check whether the given MAC address is whitelisted.
       
   214      *
       
   215      * @since S60 v3.1
       
   216      * @param mac MAC address to be checked.
       
   217      * @return Whether the given MAC address is whitelisted.
       
   218      */    
       
   219     bool_t is_mac_in_iap_whitelist(
       
   220         const core_mac_address_s& mac );
       
   221 
       
   222     /**
       
   223      * Check whether the given MAC address is blacklisted.
       
   224      *
       
   225      * @since S60 v3.1
       
   226      * @param mac MAC address to be checked.
       
   227      * @return Whether the given MAC address is blacklisted.
       
   228      */    
       
   229     bool_t is_mac_in_iap_blacklist(
       
   230         const core_mac_address_s& mac );
       
   231 
       
   232     /**
       
   233      * Add a MAC address to the IAP whitelist.
       
   234      *
       
   235      * @since S60 v3.1
       
   236      * @param mac MAC address to be added.
       
   237      */    
       
   238     void add_mac_to_iap_whitelist(
       
   239         const core_mac_address_s& mac );
       
   240 
       
   241     /**
       
   242      * Remove a MAC address from the IAP whitelist.
       
   243      *
       
   244      * @since S60 v3.1
       
   245      * @param mac MAC address to be removed.
       
   246      */    
       
   247     void remove_mac_from_iap_whitelist(
       
   248         const core_mac_address_s& mac );
       
   249 
       
   250     /**
       
   251      * Add a MAC address to the IAP blacklist.
       
   252      *
       
   253      * @since S60 v3.1
       
   254      * @param mac MAC address to be added.
       
   255      */           
       
   256     void add_mac_to_iap_blacklist(
       
   257         const core_mac_address_s& mac );
       
   258 
       
   259     /**
       
   260      * Remove a MAC address from the IAP blacklist.
       
   261      *
       
   262      * @since S60 v3.1
       
   263      * @param mac MAC address to be removed.
       
   264      */    
       
   265     void remove_mac_from_iap_blacklist(
       
   266         const core_mac_address_s& mac );
       
   267     
       
   268 private: // data
       
   269 
       
   270     /** Adaptation side data about the WLAN connection */
       
   271     core_iap_data_s iap_data_m;
       
   272 
       
   273     /** IAP whitelist of APs. */
       
   274     core_type_list_c<core_mac_address_s> iap_whitelist_m;
       
   275 
       
   276     /** IAP blacklist of APs. */
       
   277     core_type_list_c<core_mac_address_s> iap_blacklist_m;
       
   278     };
       
   279 
       
   280 #endif // CORE_IAP_DATA_H