wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanssidlistdb.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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 implementing a file-based storage for SSID lists.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WLANSSIDLISTDB_H
       
    20 #define WLANSSIDLISTDB_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 #include <s32std.h>
       
    25 #include "wlanssidlist.h"
       
    26 
       
    27 /**
       
    28  * This class implements a file-based storage for SSID lists.
       
    29  *
       
    30  * @since S60 v5.1
       
    31  */
       
    32 NONSHARABLE_CLASS( CWlanSsidListDb ) : public CBase
       
    33     {
       
    34 
       
    35 public:
       
    36 
       
    37     /**
       
    38      * This class stores information about SSID list mappings.
       
    39      */
       
    40     class TWlanSsidListMapEntry
       
    41         {
       
    42     public:
       
    43 
       
    44         /**
       
    45          * Constructor.
       
    46          */
       
    47         TWlanSsidListMapEntry(
       
    48             TUint aIap ) : iIap( aIap ), iStreamId( KNullStreamIdValue ) { }
       
    49 
       
    50     public: // data
       
    51 
       
    52         /** 
       
    53          * IAP ID this list is attached to.
       
    54          * */
       
    55         TUint iIap;
       
    56 
       
    57         /** 
       
    58          * Stream ID for file storage. 
       
    59          */
       
    60         TStreamId iStreamId;
       
    61 
       
    62         };
       
    63 
       
    64     /**
       
    65      * Two-phased constructor.
       
    66      */
       
    67     static CWlanSsidListDb* NewL();
       
    68 
       
    69     /**
       
    70      * Destructor.
       
    71      */
       
    72     virtual ~CWlanSsidListDb();
       
    73 
       
    74     /**
       
    75      * Store the given SSID list to disk.
       
    76      *
       
    77      * @since S60 v5.1
       
    78      * @param aIap IAP ID the list is attached to.
       
    79      * @param aSsidList SSID list to store.
       
    80      */
       
    81     void WriteListL(
       
    82         TUint aIap,
       
    83         const CWlanSsidList& aSsidList );
       
    84 
       
    85     /**
       
    86      * Read a SSID list from disk.
       
    87      * 
       
    88      * @since S60 v5.1
       
    89      * @param aIap IAP ID the list is attached to.
       
    90      * @param aSsidList SSID list to store contents into.
       
    91      */    
       
    92     void ReadListL(
       
    93         TUint aIap,        
       
    94         CWlanSsidList& aSsidList );     
       
    95 
       
    96     /**
       
    97      * Delete an SSID list from disk.
       
    98      * 
       
    99      * @since S60 v5.1
       
   100      * @param aIap IAP ID the list is attached to.
       
   101      */
       
   102     void DeleteListL(
       
   103         TUint aIap );
       
   104 
       
   105     /**
       
   106      * Check whether an IAP has an SSID list attached.
       
   107      *
       
   108      * @since S60 v5.1
       
   109      * @param aIap IAP ID the list is attached to.
       
   110      * @return ETrue if an list exists, EFalse otherwise.
       
   111      */
       
   112     TBool IsListAttached(
       
   113         TUint aIap );    
       
   114 
       
   115 private:
       
   116 
       
   117     /**
       
   118      * Constructor.
       
   119      */
       
   120     CWlanSsidListDb();
       
   121 
       
   122     /**
       
   123      * 2nd state constructor.
       
   124      */
       
   125     void ConstructL();
       
   126 
       
   127 private: // data
       
   128 
       
   129     /**
       
   130      * List of SSID list mapping entries.
       
   131      */
       
   132     RArray<TWlanSsidListMapEntry> iSsidListMap;    
       
   133 
       
   134     };
       
   135 
       
   136 #endif // WLANSSIDLISTDB_H