supl/locationomasuplprotocolhandler/provisioninghandler/inc/epos_comasuplprovhandler.h
changeset 56 4e949f03ecc5
equal deleted inserted replaced
-1:000000000000 56:4e949f03ecc5
       
     1 /*
       
     2 * Copyright (c) 2005 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:   Class definition for COMASuplProvHandler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef C_COMASUPLPROVHANDLER_H
       
    22 #define C_COMASUPLPROVHANDLER_H
       
    23 
       
    24 #include "CWPAdapter.h"
       
    25 
       
    26 
       
    27 class COMASuplParameters;
       
    28 class COMASuplSettings;
       
    29 class CCommsDatabase;
       
    30 class COMASuplSettingsRepository;
       
    31 class COMASuplTrace;
       
    32 
       
    33 
       
    34 /**
       
    35  * COMASuplProvHandler handles SUPL provisioning settings.
       
    36  */ 
       
    37 class COMASuplProvHandler : public CWPAdapter
       
    38     {
       
    39     
       
    40 public:
       
    41 
       
    42     /**
       
    43      * Factory function that instantiates a new object of COMASuplProvHandler
       
    44      *
       
    45      */
       
    46     static COMASuplProvHandler* NewL();
       
    47 
       
    48     /**
       
    49      * Destructor
       
    50      *
       
    51      */
       
    52     virtual ~COMASuplProvHandler();
       
    53 
       
    54 public: // From base class CWPAdapter
       
    55 
       
    56     /**
       
    57      * From CWPAdapter
       
    58      * 
       
    59      */     
       
    60     TInt ItemCount() const;
       
    61     
       
    62     /**
       
    63      * From CWPAdapter
       
    64      * 
       
    65      */     
       
    66     const TDesC16& SummaryTitle( TInt aIndex ) const;
       
    67 
       
    68     /**
       
    69      * From CWPAdapter
       
    70      * 
       
    71      */     
       
    72     const TDesC16& SummaryText( TInt aIndex ) const;
       
    73 
       
    74     /**
       
    75      * From CWPAdapter
       
    76      * 
       
    77      */     
       
    78     void SaveL( TInt aItem );
       
    79 
       
    80     /**
       
    81      * From CWPAdapter
       
    82      * 
       
    83      */     
       
    84     TBool CanSetAsDefault( TInt aItem ) const;
       
    85 
       
    86     /**
       
    87      * From CWPAdapter
       
    88      * 
       
    89      */     
       
    90     void SetAsDefaultL( TInt aItem );
       
    91 
       
    92     /**
       
    93      * From CWPAdapter
       
    94      * 
       
    95      */     
       
    96     TInt DetailsL( TInt aItem, MWPPairVisitor& aVisitor );
       
    97 
       
    98 private: // From base class MWPVisitor
       
    99 
       
   100     /**
       
   101      * From MWPVisitor
       
   102      * 
       
   103      */     
       
   104     void VisitL( CWPCharacteristic& aElement );
       
   105 
       
   106     /**
       
   107      * From MWPVisitor
       
   108      * 
       
   109      */     
       
   110     void VisitL( CWPParameter& aElement );
       
   111 
       
   112     /**
       
   113      * From MWPVisitor
       
   114      * 
       
   115      */     
       
   116     void VisitLinkL( CWPCharacteristic& aCharacteristic );
       
   117 
       
   118 private: 
       
   119 
       
   120     /**
       
   121      * C++ default constructor.
       
   122      * 
       
   123      */     
       
   124     COMASuplProvHandler();
       
   125 
       
   126     /**
       
   127      * Symbian 2nd phase constructor.
       
   128      * 
       
   129      */     
       
   130     void ConstructL();
       
   131 
       
   132 private:  // New functions
       
   133 
       
   134     /**
       
   135      * Check for SUPL settings; returns ETrue if settings accepted
       
   136      * 
       
   137      */      
       
   138     TBool AcceptedSettingGroup();
       
   139 
       
   140     /**
       
   141      * Add SUPL setting to iSuplSettings array
       
   142      */
       
   143     void AddSuplSettingsL( COMASuplParameters* aItem );
       
   144 
       
   145     /**
       
   146      * Initializes the local variation flag
       
   147      */
       
   148     void SetVariation();
       
   149 
       
   150 private:
       
   151 
       
   152     /** 
       
   153      * Handle to the Comms DB
       
   154      */
       
   155     CCommsDatabase*                 iCommsDb;
       
   156 
       
   157     /** 
       
   158      * Stores complete settings pairs
       
   159      */
       
   160     CArrayPtr<COMASuplSettings>*    iSuplSettings;
       
   161 
       
   162     /** 
       
   163      * Current setting item.
       
   164      */   
       
   165     COMASuplParameters*             iCurrentItem;
       
   166 
       
   167     /**
       
   168      * Title text for SUPL settings
       
   169      */
       
   170     HBufC*                          iTitle;
       
   171     
       
   172     /**
       
   173      * Handle to instance of COMASuplSettingsRepository
       
   174      */
       
   175     COMASuplSettingsRepository*     iRepository;
       
   176     
       
   177     /**
       
   178      * Handle to an instance of COMASuplTrace used for tracing
       
   179      */ 
       
   180     COMASuplTrace*		            iTrace;
       
   181     
       
   182     /*
       
   183      * Local Variation Flag
       
   184      */
       
   185     TBool                           iVariantEnabled;
       
   186     
       
   187     };
       
   188 
       
   189 #endif	// C_COMASUPLPROVHANDLER_H