vpnengine/dmadipsecvpn/inc/dmadstorevpnap.h
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2002-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 "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:   VPN AP storer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __DMADSTOREVPNAP_H__
       
    21 #define __DMADSTOREVPNAP_H__
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <cmmanagerext.h>
       
    25 
       
    26 typedef TInt32 TVpnApCommsId; 
       
    27 const TInt KVpnApSvrMaxFieldLength = 50;
       
    28 
       
    29 class TVpnApParms
       
    30     {
       
    31     public:
       
    32         enum TRealConnRefType
       
    33             {
       
    34             EIapRealConnRef,
       
    35             ESnapRealConnRef
       
    36             };
       
    37     
       
    38         TBuf<KVpnApSvrMaxFieldLength>   iName;
       
    39         TBuf<KVpnApSvrMaxFieldLength>   iPolicyId;
       
    40         
       
    41         TRealConnRefType                iRealConnRefType;
       
    42         TVpnApCommsId                   iRealConnRef;        
       
    43     };
       
    44 
       
    45 
       
    46 class RCmConnectionMethodExt;
       
    47 
       
    48 /**
       
    49  *  Store VPN AP
       
    50  *
       
    51  *  Store VPN accesspoints data to commsdb.
       
    52  *
       
    53  *  @lib (internal) dmadipsecvpn.lib
       
    54  *  @since S60 3.0
       
    55  */
       
    56 class CVpnAp : public CBase
       
    57     {
       
    58 public:
       
    59     static CVpnAp* NewL(void);
       
    60     ~CVpnAp();
       
    61 
       
    62     TBool FindVpnApL(TVpnApCommsId aId);
       
    63     void DeleteVpnApL(TVpnApCommsId aId);    
       
    64     void ListVpnApsL(RArray<TVpnApCommsId>& aIdArray);
       
    65     void GetVpnApL(TVpnApCommsId aId, TVpnApParms& aVpnApParms);
       
    66     TVpnApCommsId AddVpnApL(const TVpnApParms& aVpnApParms);
       
    67     void UpdateVpnApL(TVpnApCommsId aId, const TVpnApParms& aVpnApParms);
       
    68 
       
    69 private: // implementation
       
    70     void ConstructL(void);
       
    71     CVpnAp();
       
    72     
       
    73     
       
    74     void UpdateVpnApL(RCmConnectionMethodExt& aConnectionMethod, 
       
    75                       const TVpnApParms& aVpnApParms);
       
    76     
       
    77     TBool IsVpnConnectionMethodL(RCmConnectionMethodExt& aConnectionMethod) const;
       
    78      
       
    79 private: // data
       
    80     
       
    81     RCmManagerExt   iCmManagerExt;
       
    82     
       
    83     };
       
    84 
       
    85 #endif // __DMADSTOREVPNAP_H__
       
    86 
       
    87