satengine/SatServer/inc/MSatApnHandler.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002-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:  Interface for APN handler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MSATAPNHANDLER_H
       
    20 #define MSATAPNHANDLER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <etelsat.h>
       
    25 #include <etelpckt.h>
       
    26 // CLASS DECLARATION
       
    27 
       
    28 /**
       
    29 *  Interface for APN operations with CMManager.
       
    30 *
       
    31 *  @lib SatEngine
       
    32 *  @since S60 3.0
       
    33 */
       
    34 class MSatApnHandler
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37 
       
    38         /**
       
    39         * C++ default constructor.
       
    40         */
       
    41         MSatApnHandler() {};
       
    42 
       
    43         /**
       
    44         * Destructor.
       
    45         */
       
    46         virtual ~MSatApnHandler() {};
       
    47 
       
    48     public: // New functions
       
    49 
       
    50         /**
       
    51         * Locates APN from CMManager Session, creates new APN if not  
       
    52         * found, and returns IAP id and Network ID in referenced parameters
       
    53         * @param aName Accesspoint to locate / create
       
    54         * @param aUserLogin, User name in case new APN is needed
       
    55         * @param aUserPwd, Password in case, new APN is needed
       
    56         * @param aIapId, after completion, holds the IAP id of the APN
       
    57         * @param aNwId, after completion, holds the Network id of the APN
       
    58         * @param aApnCreated indicates is new APN created
       
    59         * @param aPdpType, indicates whether the address type is IPv4  or IPv6
       
    60         * @param aLocalAddress, represents the Local Address provided by NAA
       
    61         */
       
    62         virtual void GetApnInfoL( 
       
    63             const RSat::TAccessName& aName,
       
    64             const RSat::TTextString& aUserLogin,
       
    65             const RSat::TTextString& aUserPwd,
       
    66             TUint32& aIapId,
       
    67             TUint32& aNwId,
       
    68             TBool& aApnCreated, 
       
    69             const RPacketContext::TProtocolType& aPdpType,
       
    70             const TDesC8& aLocalAddress ) = 0;
       
    71 
       
    72         /**
       
    73         * Deletes APN from connection method list with given APN ID. Note  
       
    74         * that aApnId is the same id that GetApnInfoL returns in aNwId.
       
    75         * @param aApnId APN to delete
       
    76         */
       
    77         virtual void DeleteApnL( TUint32 aApnId ) = 0;
       
    78 
       
    79         /**
       
    80          * Find the default APN Id
       
    81          * @param aPdpType, indicates the address type is IPv4  or IPv6
       
    82          * @return a default iap id
       
    83          */
       
    84         virtual TUint32 FindDefaultApL(
       
    85                 const RPacketContext::TProtocolType& aPdpType ) = 0;
       
    86     private:
       
    87 
       
    88         // Prohibit copy constructor if not deriving from CBase.
       
    89         MSatApnHandler( const MSatApnHandler& );
       
    90 
       
    91         // Prohibit assigment operator if not deriving from CBase.
       
    92         MSatApnHandler& operator=( const MSatApnHandler& );
       
    93 
       
    94     };
       
    95 
       
    96 #endif      // MSATAPNHANDLER_H
       
    97 
       
    98 // End of File