alwayson_net_plugin/pdpcontextmanager2/inc/maoconnectionmanager.h
changeset 0 5a93021fdf25
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Defines MAOConnectionManager interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MAOCONNECTIONMANAGER_H
       
    20 #define MAOCONNECTIONMANAGER_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 
       
    26 /**
       
    27  *  Connection manager interface.
       
    28  *
       
    29  *  @lib PDPContextManager.lib
       
    30  *  @since S60 v3.1
       
    31  */
       
    32 class MAOConnectionManager
       
    33     {
       
    34 public: // Data types
       
    35 
       
    36     /**
       
    37      * Network type
       
    38      */
       
    39     enum TNetworkType
       
    40         {
       
    41         ENotRegistered,
       
    42         EHPLMN,
       
    43         EVPLMN
       
    44         };
       
    45 
       
    46     /**
       
    47      * Failure reason
       
    48      */
       
    49     enum TFailureReason
       
    50         {
       
    51         ETemporary,
       
    52         EPermanent,
       
    53         EDisconnected
       
    54         };
       
    55         
       
    56 public:
       
    57 
       
    58     /**
       
    59      * Activate PDP context.
       
    60      * Asynchronous.
       
    61      *
       
    62      * @since S60 v3.1
       
    63      */
       
    64     virtual void ActivatePDPContextL() = 0;
       
    65     
       
    66     /**
       
    67      * Checks if we have a PDP context active.
       
    68      * Synchronous.
       
    69      *
       
    70      * @since S60 v3.1
       
    71      * @return ETrue if PDP context is active
       
    72      */
       
    73     virtual TBool IsPDPContextActive() const = 0;       
       
    74 
       
    75     /**
       
    76      * Closes current connection.
       
    77      * Synchronous.
       
    78      *
       
    79      * @since S60 v3.1
       
    80      */
       
    81     virtual void CloseConnection() = 0;
       
    82     
       
    83     /**
       
    84      * Closes current connection without stopping it.
       
    85      * Synchronous.
       
    86      *
       
    87      * @since S60 v3.2
       
    88      */
       
    89     virtual void DetachConnection() = 0;
       
    90     
       
    91     /**
       
    92      * Gets current network type.
       
    93      * Synchronous.
       
    94      *
       
    95      * @since S60 v3.1
       
    96      * @return TNetworkType
       
    97      */
       
    98     virtual TNetworkType NetworkType() const = 0;       
       
    99     
       
   100     /**
       
   101      * Gets numer of currently active connections.
       
   102      * Synchronous.
       
   103      *
       
   104      * @since 3.0
       
   105      * @return TInt
       
   106      */     
       
   107     virtual TInt NumberOfConnections() = 0;
       
   108     
       
   109     /**
       
   110      * Handles settings changes.
       
   111      *
       
   112      * @since S60 v3.2
       
   113      */
       
   114     virtual void HandleSettingsChangedL() = 0;
       
   115     
       
   116 protected:
       
   117 
       
   118     /**
       
   119      * Prohibit destruction
       
   120      *
       
   121      * @since S60 v3.1
       
   122      */
       
   123     virtual ~MAOConnectionManager(){};
       
   124     };
       
   125 
       
   126 #endif /* MAOCONNECTIONMANAGER_H */