connectionmonitoring/connmon/connectionmonitor/inc/ConnMonUtils.h
changeset 0 5a93021fdf25
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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:  ConnMon utilities.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CONNMONUTILS_H
       
    19 #define CONNMONUTILS_H
       
    20 
       
    21 #include <etelmm.h>
       
    22 #include <rconnmon.h>
       
    23 
       
    24 /**
       
    25  * Utility class
       
    26  */
       
    27 class ConnMonUtils
       
    28     {
       
    29 public:
       
    30     /**
       
    31      * Converts from TMobilePhoneNetworkMode to TConnMonMobilePhoneNetworkMode
       
    32      * @param aValue RMobilePhone::TMobilePhoneNetworkMode
       
    33      * @param aMode TConnMonMobilePhoneNetworkMode
       
    34      * @return errorcode
       
    35      */
       
    36     static TInt MobilePhoneNetworkModeToConnMonMobilePhoneNetworkMode(
       
    37             RMobilePhone::TMobilePhoneNetworkMode aMode,
       
    38             TConnMonMobilePhoneNetworkMode& aValue );
       
    39 
       
    40     /**
       
    41      * Converts from TDesC8 to build independent TDesC
       
    42      * @param aBuf8 to be converted
       
    43      * @param aInd result of the conversion
       
    44      */
       
    45     static void TDes8ToTDes( const TDes8& aBuf8, TDes& aInd );
       
    46 
       
    47     /**
       
    48      * Converts from TDesC to TDesC8
       
    49      * @param aSrc to be converted
       
    50      * @param aDest result of the conversion
       
    51      */
       
    52     static void TDesToTDes8( const TDes& aSrc, TDes8& aDest );
       
    53     };
       
    54 
       
    55 
       
    56 /*
       
    57 * The following declarations need to be kept to prevent modifications in
       
    58 * def-files and thus prevent binary brakes. These classes are otherwise
       
    59 * no longer used.
       
    60 */
       
    61 
       
    62 class TConnMonInap
       
    63     {
       
    64 public:
       
    65     TConnMonInap();
       
    66     virtual TBool Real() const = 0;
       
    67     virtual TBool Valid() const = 0;
       
    68     };
       
    69 
       
    70 class TConnMonVirtualIap : public TConnMonInap
       
    71     {
       
    72 public:
       
    73     TConnMonVirtualIap();
       
    74     // From base class TConnMonInap
       
    75     TBool Real() const;
       
    76     TBool Valid() const;
       
    77     };
       
    78 
       
    79 class TConnMonRealIap : public TConnMonInap
       
    80     {
       
    81 public:
       
    82     TConnMonRealIap();
       
    83     // From base class TConnMonInap
       
    84     TBool Real() const;
       
    85     TBool Valid() const;
       
    86     };
       
    87 
       
    88 class TConnMonSNAP
       
    89     {
       
    90 public:
       
    91     TConnMonSNAP();
       
    92     virtual ~TConnMonSNAP();
       
    93     TBool Valid() const;
       
    94     TConnMonSNAP( const TConnMonSNAP& aSNAP );
       
    95     TConnMonSNAP( TUint aId );
       
    96 protected:
       
    97     TUint iId;
       
    98     };
       
    99 
       
   100 class CConnMonSNAPsAvailabilityManager : public CBase
       
   101     {
       
   102 public:
       
   103     static CConnMonSNAPsAvailabilityManager* NewL();
       
   104     virtual ~CConnMonSNAPsAvailabilityManager();
       
   105 private:
       
   106     CConnMonSNAPsAvailabilityManager();
       
   107     };
       
   108 
       
   109 class CConnMonCommsDataNotifier : public CBase
       
   110     {
       
   111 public:
       
   112     static CConnMonCommsDataNotifier* NewL();
       
   113     virtual ~CConnMonCommsDataNotifier();
       
   114 private:
       
   115     CConnMonCommsDataNotifier();
       
   116     };
       
   117 
       
   118 class CConnMonIapsAvailabilityManager : public CBase
       
   119     {
       
   120 public:
       
   121     static CConnMonIapsAvailabilityManager* NewL();
       
   122     virtual ~CConnMonIapsAvailabilityManager();
       
   123 private:
       
   124     CConnMonIapsAvailabilityManager();
       
   125     };
       
   126 
       
   127 #endif // CONNMONUTILS_H
       
   128 
       
   129 // End-of-file