serviceproviders/sapi_location/locationservice/inc/locationcoreimp.h
changeset 22 fc9cf246af83
parent 19 989d2f495d90
child 33 50974a8b132e
equal deleted inserted replaced
19:989d2f495d90 22:fc9cf246af83
    51 	     *
    51 	     *
    52 	     * @param aPositionServer subsession to location server
    52 	     * @param aPositionServer subsession to location server
    53 	     * @param aRequestorInfoStack requestor indenty
    53 	     * @param aRequestorInfoStack requestor indenty
    54 	     * @param aList List of position fields that should be retrived
    54 	     * @param aList List of position fields that should be retrived
    55 	     * @param aLocationInfoCategory information type required(Basic, Generic)
    55 	     * @param aLocationInfoCategory information type required(Basic, Generic)
    56 	     *
    56 	     * @param aModuleId the unique id of the module which should be used to 
       
    57 	     *         open the subsession with location server
    57 	     */
    58 	     */
    58 	    								
    59 	    								
    59 		IMPORT_C static CGetLoc* NewL( RPositionServer &aPositionServer , 
    60 		IMPORT_C static CGetLoc* NewL( RPositionServer &aPositionServer , 
    60 									   TPositionFieldIdList aList ,
    61 									   TPositionFieldIdList aList ,
    61 									   TInt aRequestType,
    62 									   TInt aRequestType,
    62 									   TInt aLocationInfoCategory  ) ;		
    63             TInt aLocationInfoCategory,
       
    64             TPositionModuleId aModuleId) ;		
    63 
    65 
    64 	    /**
    66 	    /**
    65 	     * Destructor.
    67 	     * Destructor.
    66 	     */
    68 	     */
    67 	    virtual ~CGetLoc() ; 
    69 	    virtual ~CGetLoc() ; 
    68 
    70 
    69 
    71 
    70 
    72 
    71 	    /**
    73     /**
    72 	     * Gets users current location Asynchronously calls the users callback 
    74      * Gets users current location Asynchronously calls the users callback 
    73 	     * function when updates are recived from location server
    75      * function when updates are recived from location server
    74 	     *
    76      * @param aLocationService pointer to the CLocationService class used in RunL
    75 	     * @param aCallBackObj callback object for updates notification
    77      * @param aCallBackObj callback object for updates notification
    76 	     * @param aUpdatesOptions update options for asynchronous calls
    78      * @param aUpdatesOptions update options for asynchronous calls
    77 	     *
    79      *
    78 	     */ 
    80      * @see TPositionUpdateOptions in LbsCommon.h for details
    79 	    TInt GetLocation( MLocationCallBack* aCallBackObj ,
    81      */ 
    80 	    					  const TPositionUpdateOptions* aUpdateOptions =NULL );
    82     TInt GetLocationUpdates( CLocationService* aLocationService, MLocationCallBack* aCallBackObj ,
       
    83             const TPositionUpdateOptions* aUpdateOptions = NULL );
    81 
    84 
    82 	    /**
       
    83 	     * Traces users location change
       
    84 	     * Any location change is informed to user via callback function
       
    85 	     *
       
    86 	     * @param aCallBackObj callback handle for async trace call 
       
    87 	     * @param aUpdateOptions updateoptions for trace call
       
    88 	     *
       
    89 	     * @see TPositionUpdateOptions in LbsCommon.h for details
       
    90 	     */
       
    91 	    TInt GetLocationUpdates( MLocationCallBack* aCallBackObj ,
       
    92 	    						 const TPositionUpdateOptions* aUpdateOptions = NULL );
       
    93 		
    85 		
    94 		void SetStatusComplete()
    86 		void SetStatusComplete()
    95 	    {
    87 	    {
    96 	    	iRequestStatus = 1;
    88 	    	iRequestStatus = 1;
    97 	    }
    89 	    }
   100 	    	if(iRequestStatus == 0)
    92 	    	if(iRequestStatus == 0)
   101 	    		return false;
    93 	    		return false;
   102 	    	else
    94 	    	else
   103 	    		return true;
    95 	    		return true;
   104 	    }	    						 
    96 	    }	    						 
   105 	    						 
    97     /*
   106     						 
    98      * Returns the MLocationCallBack object pointer stored by this class
   107     	
    99      */
       
   100 
       
   101     MLocationCallBack* GetCallBackobj() const
       
   102     {
       
   103     return iCallBack;  
       
   104     }					 
   108     				 
   105     				 
   109     protected:  
   106     protected:  
   110 
   107 
   111 	    /**
   108 	    /**
   112 	     * From CActive
   109 	     * From CActive
   115 	    void RunL();
   112 	    void RunL();
   116 
   113 
   117 
   114 
   118 	    private:  
   115 	    private:  
   119 
   116 
   120 	   /**
   117     /**
   121 		* By default Symbian 2nd phase constructor is private.
   118      * By default Symbian 2nd phase constructor is private.
   122 		*/
   119      * @param aPositionServer subsession to location server
   123 	     
   120      * @param aList List of position fields that should be retrived
   124 	    void ConstructL();
   121      * @param aRequestType The type of request serviced by this Active object(GetLocation,Trace)          
       
   122      * @param aModuleId aModuleId the unique id of the module which should be used to 
       
   123 	   *         open the subsession with location server
       
   124      */
       
   125 
       
   126     void ConstructL(RPositionServer &aPositionServer ,
       
   127             TPositionFieldIdList aList ,
       
   128             TInt aRequestType,	            
       
   129             TPositionModuleId aModuleId);
   125 	    /**
   130 	    /**
   126 	     * Default constructor
   131 	     * Default constructor
   127 	     */
   132 	     */
   128 	     
   133 	     
   129 	    CGetLoc(); 
   134 	    CGetLoc(); 
   163 	     */
   168 	     */
   164 	    TInt iRequestType ; 
   169 	    TInt iRequestType ; 
   165 	    
   170 	    
   166 	    TInt iRequestStatus;      
   171 	    TInt iRequestStatus;      
   167 
   172 
       
   173     /**
       
   174      * Pointer to CLocationService used in RunL()
       
   175      */
       
   176     CLocationService* iLocationService;
   168 
   177 
   169     };
   178     };
   170 
   179 
   171 
   180 
   172 
   181