locationmanager/ReverseGeocode/inc/internalreversegeocode.h
changeset 43 c5e73110f733
parent 36 aa5a574040a4
child 48 1389872e7c51
equal deleted inserted replaced
40:910a23996aa0 43:c5e73110f733
    31                     public MClientObserver, 
    31                     public MClientObserver, 
    32                     public MXmlHandlerObserver,
    32                     public MXmlHandlerObserver,
    33                     public MConnectionTimeoutHandlerInterface
    33                     public MConnectionTimeoutHandlerInterface
    34     {
    34     {
    35 public:
    35 public:
    36     /**
    36    /**
    37         * Factory function to create the instance
    37     * Factory function to create the instance
    38         * @param aObserver The observer instance that is to be notified when reverse geocoding is over
    38     * @param aObserver The observer instance that is to be notified when reverse geocoding is over
    39         * @return A pointer to the CInternalReverseGeocode instance
    39     * @return A pointer to the CInternalReverseGeocode instance
    40         */
    40     */
    41     static CInternalReverseGeocode* NewL( MReverseGeocodeObserver& aObserver );
    41     static CInternalReverseGeocode* NewL( MReverseGeocodeObserver& aObserver );
    42 
    42 
    43     /**
    43    /**
    44         * Gets the address for the given geo-coordinaates.
    44     * Gets the address for the given geo-coordinaates.
    45         * @param aLocality  The locality information
    45     * @param aLocality  The locality information
    46         *		   aOption    The connection option whether 	its silent or not
    46     *		   aOption    The connection option whether 	its silent or not
    47         */			
    47     */			
    48     virtual void GetAddressByCoordinateL( TLocality aLocality, const TConnectionOption aOption );
    48     virtual void GetAddressByCoordinateL( TLocality aLocality, const TConnectionOption aOption );
    49 
    49 
    50     /**
    50     /**
    51         * Checks if a silent connection is allowed
    51      * Checks if a silent connection is allowed
    52         * @return ETrue If silentconnection is allowed
    52      * @return ETrue If silentconnection is allowed
    53         */	
    53      */	
    54     virtual TBool SilentConnectionAllowed();
    54     virtual TBool SilentConnectionAllowed();
    55     
    55    
    56     
    56    /**
    57     /**
    57     * Helper function to get the appropriate language for the request.
    58         * Helper function to get the appropriate language for the request.
    58     * @param aLanguage  The language for the request 
    59         * @param aLanguage  The language for the request 
    59     */    
    60         */    
       
    61     void GetLanguageForTheRequest( TDes8& aLanguage );
    60     void GetLanguageForTheRequest( TDes8& aLanguage );
    62 
    61 
    63 
    62 
    64     /**
    63    /**
    65         * destructor
    64     * destructor
    66         *
    65     *
    67         */	
    66     */	
    68     ~CInternalReverseGeocode();
    67     ~CInternalReverseGeocode();
    69 
    68 
    70     // MConnectionTimeoutHandlerInterface
    69    // MConnectionTimeoutHandlerInterface
    71     /**
    70    /**
    72         * Closes the connection once it times out
    71     * Closes the connection once it times out
    73         * @param aErrorCode The Error code
    72     * @param aErrorCode The Error code
    74         */    
    73     */    
    75     void HandleTimedoutEvent(TInt aErrorCode);
    74     void HandleTimedoutEvent(TInt aErrorCode);
    76     
    75     
    77 protected:
    76 protected:
    78    
    77    
       
    78    /**
       
    79     * Second phase construction
       
    80     */    
       
    81     void ConstructL();
       
    82   
    79     /**
    83     /**
    80         * Second phase construction
    84     * First phase construction.
    81         */    
    85     * @param aObserver The observer instance that is to be notified when reverse geocoding is over
    82     void ConstructL();
    86     */    
    83         
       
    84     
       
    85     /**
       
    86         * First phase construction.
       
    87         * @param aObserver The observer instance that is to be notified when reverse geocoding is over
       
    88         */    
       
    89     CInternalReverseGeocode( MReverseGeocodeObserver& aObserver );
    87     CInternalReverseGeocode( MReverseGeocodeObserver& aObserver );
    90         
    88         
    91     //From MClientObserver
    89     //From MClientObserver
    92     /**
    90     /**
    93         * callback which notifies progess of HTTP request
    91     * callback which notifies progess of HTTP request
    94         * @param aEvent The Httpstatus
    92     * @param aEvent The Httpstatus
    95         */    
    93     */    
    96     void ClientEvent( const THttpStatus& aEvent );
    94     void ClientEvent( const THttpStatus& aEvent );
    97 	
    95 	
    98     /**
    96     /**
    99         * callback through which the HTTP body data is recieved. 
    97     * callback through which the HTTP body data is recieved. 
   100         * @param aBodyData The body recieved
    98     * @param aBodyData The body recieved
   101         */	
    99     */	
   102     void ClientBodyReceived(const TDesC8& aBodyData);
   100     void ClientBodyReceived(const TDesC8& aBodyData);
   103 
   101 
   104     /*
   102     /*
   105     * Get registrer network country code
   103     * Get registrer network country code
   106     *
   104     *
   108     */
   106     */
   109     RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw();
   107     RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw();
   110 
   108 
   111     //From MXmlHandlerObserver    
   109     //From MXmlHandlerObserver    
   112     /**
   110     /**
   113         * callback which notifys the completion of parsing.
   111     * callback which notifys the completion of parsing.
   114         * @param aError The err code
   112     * @param aError The err code
   115         * 		   aAddressInfo The address info obtained after parsing
   113     * 		   aAddressInfo The address info obtained after parsing
   116         */    
   114     */    
   117     void OnParseCompletedL( TInt aError, MAddressInfo& aAddressInfo ); 
   115     void OnParseCompletedL( TInt aError, MAddressInfo& aAddressInfo ); 
   118     
   116     
   119     /*
   117     /*
   120     * UE is registered to home network?
   118     * UE is registered to home network?
   121     *
   119     *
   133         GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag);
   131         GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag);
   134 
   132 
   135 private:
   133 private:
   136 
   134 
   137     /**
   135     /**
   138         * Starts the timer
   136      * Starts the timer
   139         */		
   137      */		
   140     void StartTimer();
   138     void StartTimer();
   141 
   139 
   142     /**
   140     /**
   143         * Closes the http connection and notifies the observer
   141      * Closes the http connection and notifies the observer
   144         */	
   142      */	
   145     void CloseConnection();
   143     void CloseConnection();
   146 
   144 
   147 private:
   145 private:
   148     CXmlHandler *iXmlHandler;
   146     CXmlHandler *iXmlHandler;
   149     CClientEngine *iClientEngine;
   147     CClientEngine *iClientEngine;