supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasupletel.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2002-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 for retirving location id from ETel.
       
    15 *  Version     : %version: 3 % << Don't touch! Updated by Synergy at check-out.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef EPOS_COMASUPLETEL_H
       
    21 #define EPOS_COMASUPLETEL_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32def.h>
       
    25 #include <e32base.h>
       
    26 #include <etelmm.h>
       
    27 
       
    28 #include "epos_tomasuplecellinfo.h"
       
    29 
       
    30 #ifdef USE_E_CELL_ID_STUB
       
    31 	#include "epos_rsuplmmcustomapi.h"
       
    32 #else
       
    33 	#include "rmmcustomapi.h"
       
    34 #endif
       
    35 
       
    36 //Forward declaration
       
    37 class COMASuplLocationId;
       
    38 class RMobilePhone;
       
    39 class COMASuplTrace;
       
    40 
       
    41 /**
       
    42 *  Observer class for listening to Etel Events
       
    43 *  @lib eposomasuplprotocolhandler.lib
       
    44 *  @since S60 v3.1u
       
    45 */
       
    46 
       
    47 class MOMASuplETelObserver
       
    48 	{
       
    49 	public:
       
    50 		// Location Id & Error while completing request
       
    51 		virtual void LocationIDRequestCompletedL(COMASuplLocationId* aLocationId,TInt aErrorCode) = 0;
       
    52 		
       
    53 		// ECell-Id & Error while completing request
       
    54 		virtual void LocationECellIdRequestCompletedL(TOMASuplECellInfo& aECId,TInt aErrorCode) = 0;
       
    55 		
       
    56 		// Location Id for comparision & Error while completing request
       
    57 		virtual void ComparisionLocationIDRequestCompletedL(COMASuplLocationId* aLocationId,TInt aErrorCode) = 0;
       
    58 		
       
    59 	};
       
    60 
       
    61 /**
       
    62 *  Class for getting the Cell Id information	
       
    63 *  @lib eposomasuplprotocolhandler.lib
       
    64 *  @since S60 v3.1u
       
    65 */
       
    66 
       
    67 class COMASuplETel : public CActive
       
    68     {
       
    69    
       
    70    
       
    71 	public:
       
    72 		enum TCellMode
       
    73 			{
       
    74 				EOMASuplCellId = 0,			
       
    75 				EOMASuplECellId,
       
    76 				EOMASuplCompareCellId
       
    77 			};   
       
    78 			
       
    79     public:  // Constructors and destructor
       
    80         
       
    81    		 /**
       
    82         * Performs construction of an object
       
    83         * @since S60  v3.1u
       
    84         * @param None
       
    85         * @return None
       
    86         */
       
    87    		static COMASuplETel* NewL(MOMASuplETelObserver& aObserver,RMobilePhone& aPhone);
       
    88    		
       
    89         /**
       
    90         * Performs destructor
       
    91         * @since S60  v3.1u
       
    92         * @param None
       
    93         * @return None
       
    94         */
       
    95         ~COMASuplETel();
       
    96         
       
    97         /**
       
    98         * Performs the retrieving of cell id information
       
    99         * @since S60  v3.1u
       
   100         * @param None
       
   101         * @return None
       
   102         */        
       
   103         void GetLocationID();
       
   104         
       
   105         /**
       
   106         * Performs the retrieving of E-cell id information
       
   107         * @since S60  v3.2
       
   108         * @param None
       
   109         * @return None
       
   110         */        
       
   111         void GetECellID();
       
   112         
       
   113         /**
       
   114          * Performs the retrieving of cell id information for comparision purposes
       
   115          * @since S60  v3.1u
       
   116          * @param None
       
   117          * @return None
       
   118          */ 
       
   119         void GetComparisionLocationID();
       
   120      private:
       
   121      
       
   122         /**
       
   123         * Handles the data retrived after LocationId
       
   124         * @since S60  v3.2
       
   125         * @param None
       
   126         * @return None
       
   127         */        
       
   128      	void HandleLocationIdL();
       
   129      	
       
   130 		/**
       
   131 		* Handles the data retrived after E-Cell Id
       
   132 		* @since S60  v3.2
       
   133 		* @param None
       
   134 		* @return None
       
   135 		*/        
       
   136 		void HandleECellIdL();
       
   137 		
       
   138 		/**
       
   139 		* FillECellWCDMAInfo Fills the data retrived after E-Cell Id into other struct
       
   140 		* @since S60  v3.2
       
   141 		* @param None
       
   142 		* @return None
       
   143 		*/        
       
   144 		void FillECellWCDMAInfoL();
       
   145 		
       
   146 		/**
       
   147 		* FillECellGSMInfo Fills the data retrived after E-Cell Id into other struct
       
   148 		* @since S60  v3.2
       
   149 		* @param None
       
   150 		* @return None
       
   151 		*/        
       
   152 		void FillECellGSMInfoL();
       
   153         
       
   154      private:
       
   155      
       
   156        /**
       
   157         * Performs construction of an object
       
   158         * @since S60  v3.1u
       
   159         * @param aObserver, MOMASuplETelObserver observer for request completion.
       
   160         * @param aPhone,RMobilePhone 
       
   161         * @return None
       
   162         */
       
   163         COMASuplETel(MOMASuplETelObserver& aObserver,RMobilePhone& aPhone);
       
   164 
       
   165      	/**
       
   166         * Performs Second phase constrcution
       
   167         * @since S60  v3.1u
       
   168         * @param None
       
   169         * @return None
       
   170         */
       
   171         void ConstructL();
       
   172 
       
   173     protected:  // CActive        
       
   174     	 /**
       
   175         * Performs cancelling of asynchronour request
       
   176         * @since S60  v3.1u
       
   177         * @param None
       
   178         * @return None
       
   179         */ 
       
   180         void DoCancel();
       
   181 
       
   182         /**
       
   183         * Performs RunL
       
   184         * @since S60  v3.1u
       
   185         * @param None
       
   186         * @return None
       
   187         */ 
       
   188         void RunL();  
       
   189         
       
   190         /**
       
   191         * Performs RunError
       
   192         * @since S60  v3.1u
       
   193         * @param aError, Error code containing leave reason
       
   194         * @return TInt , informs to activescheduler about handling of leave.
       
   195         */ 
       
   196         TInt RunError(TInt aError);  
       
   197         
       
   198     private:     
       
   199     
       
   200         /**
       
   201         * Performs Copies WCDMA data from RCustomAPI to ASN defined WCDMA data structure
       
   202         * @since S60  v3.1u
       
   203         * @param None
       
   204         * @return None
       
   205         */ 
       
   206     	void CopyWCDMAData();    
       
   207         
       
   208     private:    // Data
       
   209   
       
   210       	//For access to a mobile phone
       
   211         RMobilePhone& iPhone; 
       
   212         
       
   213         // For Network information 
       
   214         RMobilePhone::TMobilePhoneNetworkInfoV1 iNetworkInfo;
       
   215         
       
   216         //for network information
       
   217         RMobilePhone::TMobilePhoneNetworkInfoV1Pckg iNetworkInfoPkg;
       
   218         
       
   219      	 // For location information
       
   220         RMobilePhone::TMobilePhoneLocationAreaV1 iLocationInfo;
       
   221 
       
   222 		//Trace Utility
       
   223 		COMASuplTrace* iTrace;
       
   224 		
       
   225         //Observer for request completion
       
   226         MOMASuplETelObserver& iObserver;
       
   227 
       
   228 		// For type of request... Cell Id to E-CellId
       
   229 		TCellMode iCellMode;
       
   230 		
       
   231 		//For E-cell id
       
   232 		RMmCustomAPI iCustomAPI;
       
   233 		
       
   234 		//For holding E-Cell id
       
   235 		RMmCustomAPI::TMmCellInfo iMmCellInfo;
       
   236 		
       
   237 
       
   238 		TOMASuplECellInfo iOMASuplECellInfo;
       
   239  
       
   240 		TOMASuplWCDMACellinfo iOMASuplwcdmaCellInfo; 
       
   241  
       
   242 		RMmCustomAPI::TMmCellInfo::TWCDMACellInfo iCustomWCDMACellInfo; 
       
   243 		
       
   244 		//Added because of etel error
       
   245 		RMmCustomAPI::TMmCellInfoPckg iCellInfoPckg;
       
   246 		
       
   247     };
       
   248 
       
   249 #endif      // EPOS_COMASUPLETEL_H
       
   250             
       
   251 // End of File