epoc32/include/lbs.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/lbs.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/lbs.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,9 +1,9 @@
     1.4  // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5  // All rights reserved.
     1.6  // This component and the accompanying materials are made available
     1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// under the terms of "Eclipse Public License v1.0"
     1.9  // which accompanies this distribution, and is available
    1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12  //
    1.13  // Initial Contributors:
    1.14  // Nokia Corporation - initial contribution.
    1.15 @@ -17,6 +17,7 @@
    1.16  #define __LBS_H__
    1.17  
    1.18  #include <lbspositioninfo.h>
    1.19 +#include <lbsareainfo.h>
    1.20  #include <lbsipc.h>
    1.21  #include <lbscommon.h>
    1.22  #include <lbsrequestor.h>
    1.23 @@ -35,19 +36,46 @@
    1.24  
    1.25  The RPositionServer class can also be used to discover what position
    1.26  technology "modules" are available. However, this is only required if a
    1.27 -client application actually needs to use a particular module.
    1.28 +client application actually needs to use a particular module. It is also
    1.29 +used for requests to clear(empty) the last known position store.
    1.30 +
    1.31 +Asynchronous requests can be cancelled using the method CancelRequest() with
    1.32 +a value from the enumeration _TReqestId corresponding to the particular
    1.33 +operation being cancelled.
    1.34  
    1.35  @publishedAll
    1.36  @released
    1.37   */
    1.38  	{
    1.39  public:
    1.40 +	/** Type for values defined in _TRequestId
    1.41 +	@publishedPartner
    1.42 +	@prototype*/
    1.43 +	typedef TInt TRequestId;
    1.44 +
    1.45 + 	/** Identification numbers used for cancelling requests.
    1.46 + 	Note that the TRequestId enum may be extended in the future by adding
    1.47 + 	more enumerated values. To maintain compatibility any unrecognized values 
    1.48 + 	must be handled as EReqUnknown.
    1.49 + 	@publishedPartner
    1.50 +	@prototype*/
    1.51 +	enum _TRequestId
    1.52 +		{
    1.53 +		/** Unknown/undefined Id */
    1.54 +		EReqUnknown						= 0,
    1.55 +		/** The id of the RPositionServer::NotifyModuleStatusEvent request */
    1.56 +		EReqNotifyModuleStatusEvent     = 1,
    1.57 +		/** The id of the RPositionServer::EmptyLastKnownPositionStore request */
    1.58 +		EReqEmptyLastKnownPositionStore = 2
    1.59 +		};
    1.60 +		
    1.61 +public:
    1.62  	IMPORT_C RPositionServer();
    1.63  
    1.64  	IMPORT_C TInt Connect();
    1.65  	IMPORT_C void Close();
    1.66  
    1.67 -	IMPORT_C TInt CancelRequest(TInt aRequestId);
    1.68 +	IMPORT_C TInt CancelRequest(TRequestId aRequestId);
    1.69  	IMPORT_C TVersion Version() const;
    1.70  
    1.71  	IMPORT_C TInt GetDefaultModuleId(TPositionModuleId& aModuleId) const;
    1.72 @@ -63,6 +91,8 @@
    1.73  	IMPORT_C void NotifyModuleStatusEvent(TPositionModuleStatusEventBase& aStatusEvent,
    1.74  	                                      TRequestStatus& aStatus,
    1.75  	                                      const TPositionModuleId aModuleId = KPositionNullModuleId) const;
    1.76 +	                                      
    1.77 +	IMPORT_C void EmptyLastKnownPositionStore(TRequestStatus& aStatus);
    1.78  
    1.79  private:
    1.80  	void ConstructL();
    1.81 @@ -83,13 +113,42 @@
    1.82  /**
    1.83  Abstract base class for all positioning sub-sessions, including RPositioner.
    1.84  
    1.85 +Asynchronous requests issued from derived classess are cancelled using the
    1.86 +method CancelRequest() with a value from the enumeration _TReqestId corresponding
    1.87 +to the particular operation being cancelled.
    1.88 +
    1.89  @see RPositioner
    1.90  @publishedAll
    1.91  @released
    1.92   */
    1.93  	{
    1.94 +	
    1.95  public:
    1.96 -	IMPORT_C TInt CancelRequest(TInt aRequestId);
    1.97 +
    1.98 +	/** Type for values defined in _TRequestId
    1.99 +	@publishedPartner
   1.100 +	@prototype*/
   1.101 +	typedef TInt TRequestId;
   1.102 +
   1.103 +	/** Identification numbers used for cancelling requests.
   1.104 + 	Note that the TRequestId enum may be extended in the future by adding
   1.105 + 	more enumerated values. To maintain compatibility any unrecognized values 
   1.106 + 	must be handled as EReqUnknown.
   1.107 + 	@publishedPartner
   1.108 +	@prototype*/
   1.109 +	enum _TRequestId
   1.110 +		{
   1.111 +		/** Unknown/undefined Id */
   1.112 +		EReqUnknown					 = 0,
   1.113 +		/** The id of the GetLastKnownPosition request */
   1.114 +		EReqGetLastKnownPosition     = 1,
   1.115 +		/** The id of the GetLastKnownPositionArea request */
   1.116 +		EReqGetLastKnownPositionArea = 2,
   1.117 +		/** The id of the ReqNotifyPositionUpdate request */
   1.118 +		EReqNotifyPositionUpdate     = 3
   1.119 +		};
   1.120 +public:
   1.121 +	IMPORT_C TInt CancelRequest(TRequestId aRequestId);
   1.122  
   1.123  	IMPORT_C TInt CompleteRequest(TInt aRequestId);
   1.124  
   1.125 @@ -109,9 +168,10 @@
   1.126  This class is used to create a sub-session with the server for the
   1.127  purpose of obtaining the current position. In addition to actually
   1.128  obtaining position information, this class also provides mechanisms
   1.129 -for obtaining the last known position, the general status of the
   1.130 -positioning module, changing how often it wishes to receive position
   1.131 -updates, as well as identifying itself to the location framework. 
   1.132 +for obtaining the last known position, the last known position with 
   1.133 +area information, the general status of the positioning module,
   1.134 +changing how often it wishes to receive position updates, as well as 
   1.135 +identifying itself to the location framework. 
   1.136  
   1.137  Before using the class, a primary connection must have already been
   1.138  established with the server.
   1.139 @@ -121,6 +181,7 @@
   1.140  @released
   1.141   */
   1.142  	{
   1.143 +
   1.144  public:
   1.145  	IMPORT_C RPositioner();
   1.146  
   1.147 @@ -141,6 +202,11 @@
   1.148  
   1.149  	IMPORT_C void GetLastKnownPosition(TPositionInfoBase& aPosInfo,
   1.150  	                                   TRequestStatus& aStatus) const;
   1.151 +	                                   
   1.152 +	IMPORT_C void GetLastKnownPositionArea(TPositionInfoBase& aPosInfo,
   1.153 +					      				 TPositionAreaInfoBase& aAreaInfo,
   1.154 +	                                   	 TRequestStatus& aStatus) const;
   1.155 +
   1.156  	IMPORT_C void NotifyPositionUpdate(TPositionInfoBase& aPosInfo,
   1.157  	                                   TRequestStatus& aStatus) const;
   1.158  
   1.159 @@ -149,9 +215,6 @@
   1.160  	IMPORT_C virtual void Destruct();
   1.161      IMPORT_C virtual TAny* ExtendedInterface(TInt aFunctionNumber, TAny* aPtr1, TAny* aPtr2);
   1.162  
   1.163 -private:
   1.164 -	void SetRequestorImplL(const RRequestorStack& aRequestorStack) const;
   1.165 -	
   1.166  public:
   1.167  	TInt OpenImpl(RPositionServer& aPosServer, TPositionModuleId aModuleId, const TPositionCriteriaBase& aCriteria, TBool aOpenedUsingModuleId);
   1.168  private: