connectionmonitoring/connectionmonitorui/inc/GprsConnectionInfo.h
branchRCL_3
changeset 58 83ca720e2b9a
parent 0 5a93021fdf25
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
       
     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:  Represents a connection
       
    15 *     
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef GPRSCONNECTIONINFO_H_INCLUDED
       
    21 #define GPRSCONNECTIONINFO_H_INCLUDED
       
    22 
       
    23 // INCLUDES
       
    24 #include    <rconnmon.h>
       
    25 #include    <stdlib.h>
       
    26 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    27 #include    <commsdat.h>
       
    28 #else
       
    29 #include    <commsdat.h>
       
    30 #include    <commsdat_partner.h>
       
    31 #endif
       
    32 #include    "ConnectionInfoBase.h"
       
    33 
       
    34 // CONSTANTS
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 * Represents a connection.
       
    42 */
       
    43 class CGprsConnectionInfo : public CConnectionInfoBase      
       
    44     {
       
    45     public: 
       
    46         /**
       
    47         * Static constructor
       
    48         * @param aConnectionId The id of the given connection.
       
    49         * @param aMonitor for refreshing details
       
    50         * @param aConnectionBearerType the bearer type of connection
       
    51         * @param aActiveWrapper the for refreshing
       
    52         */
       
    53         static CGprsConnectionInfo* NewL( TInt aConnectionId, 
       
    54                                   RConnectionMonitor* const aConnectionMonitor,
       
    55                                   TConnMonBearerType aConnectionBearerType,
       
    56                                   CActiveWrapper* aActiveWrapper );
       
    57                 
       
    58         /**
       
    59         * Destructor
       
    60         */
       
    61         virtual ~CGprsConnectionInfo();
       
    62     public:    
       
    63         /**
       
    64         * Give back a copy of connection. 
       
    65         */
       
    66         virtual CConnectionInfoBase* DeepCopyL();
       
    67     
       
    68         /**
       
    69         * Refresh required details of connection. 
       
    70         */
       
    71         virtual void RefreshDetailsL();
       
    72 
       
    73         /**
       
    74         * Refresh iListBoxItemText text, connection ListBox has a reference to
       
    75         * this text.
       
    76         */
       
    77         virtual void RefreshConnectionListBoxItemTextL();
       
    78 
       
    79         /**
       
    80         * Refresh details array of connection. DetailsListBox has a reference
       
    81         * to this array.
       
    82         */
       
    83         virtual void RefreshDetailsArrayL();
       
    84 
       
    85         /**
       
    86         * Gives back the icon id of connection type
       
    87         * @return the icon id of connection type
       
    88         */
       
    89         virtual TUint GetIconId() const;
       
    90 
       
    91     protected:
       
    92         /**
       
    93         * Constructor
       
    94         * @param aConnectionId The id of the given connection.
       
    95         * @param aMonitor for refreshing details
       
    96         * @param aConnectionBearerType the bearer type of connection
       
    97         * @param aActiveWrapper the for refreshing
       
    98         */
       
    99         CGprsConnectionInfo( TInt aConnectionId, 
       
   100                              RConnectionMonitor* const aConnectionMonitor,
       
   101                              TConnMonBearerType aConnectionBearerType,
       
   102                              CActiveWrapper* aActiveWrapper );
       
   103 
       
   104         /**
       
   105         * Second phase construction
       
   106         */
       
   107         void ConstructL();
       
   108 
       
   109     protected:
       
   110         /**
       
   111         * Creates an array with requrired details of connection to
       
   112         * the listbox which visulaize details of connection. This member
       
   113         * is called at initialization.
       
   114         */
       
   115         virtual void ToArrayDetailsL();
       
   116 
       
   117         /**
       
   118         * Creates a string from Access Point name of the connection.
       
   119         * @return string representation count of Access Point name of 
       
   120         * the connection.
       
   121         */
       
   122         HBufC* ToStringApNameLC() const;
       
   123 
       
   124     private:
       
   125 
       
   126     protected: // Data members
       
   127     
       
   128         TBuf<CommsDat::KMaxTextLength> iApName;    ///< Used AccessPoint name
       
   129         
       
   130     };
       
   131 
       
   132 
       
   133 #endif // GPRSCONNECTIONINFO_H_INCLUDED
       
   134 
       
   135 // Enf of File