lbs.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : Lbs.h
00004 *  Part of     : Location Framework/Location FW
00005 *  Interface   : Location Acquisition API
00006 *  Description : Client-Server communication
00007 *  Version     : %vesion: %
00008 *
00009 *  Copyright (c) 2002-2006 Nokia Corporation.
00010 *  This material, including documentation and any related
00011 *  computer programs, is protected by copyright controlled by
00012 *  Nokia Corporation. All rights are reserved. Copying,
00013 *  including reproducing, storing, adapting or translating, any
00014 *  or all of this material requires the prior written consent of
00015 *  Nokia Corporation. This material also contains confidential
00016 *  information which may not be disclosed to others without the
00017 *  prior written consent of Nokia Corporation.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef __LBS_H__
00022 #define __LBS_H__
00023 
00024 #include <LbsPositionInfo.h>
00025 #include <LbsIpc.h>
00026 #include <LbsCommon.h>
00027 #include <LbsRequestor.h>
00028 #include <LbsCriteria.h>
00029 
00030 // Forward declarations
00031 class CPositioningPtrHolder;
00032 class CServerPositioningPtrHolder;
00033 
00044 class RPositionServer : public RSessionBase
00045         {
00046 public:
00050         IMPORT_C RPositionServer();
00051 
00062         IMPORT_C TInt Connect();
00063 
00075         IMPORT_C void Close();
00076 
00082         IMPORT_C TVersion Version() const;
00083 
00099         IMPORT_C TInt GetDefaultModuleId(TPositionModuleId& aModuleId) const;
00100 
00112         IMPORT_C TInt GetNumModules(TUint& aNumModules) const;
00113 
00127         IMPORT_C TInt GetModuleInfoByIndex(TInt aModuleIndex,
00128                                            TPositionModuleInfoBase& aModuleInfo) const;
00142         IMPORT_C TInt GetModuleInfoById(TPositionModuleId aModuleId,
00143                                         TPositionModuleInfoBase& aModuleInfo) const;
00144 
00154         IMPORT_C TInt GetModuleStatus(TPositionModuleStatusBase& aPosModuleStatus,
00155                                       TPositionModuleId aModuleId) const;
00156 
00183         IMPORT_C void NotifyModuleStatusEvent(TPositionModuleStatusEventBase& aStatusEvent,
00184                                               TRequestStatus& aStatus,
00185                                               const TPositionModuleId aModuleId = KPositionNullModuleId) const;
00186 
00202         IMPORT_C TInt CancelRequest(TInt aRequestId);
00203 
00204 private:
00205         void ConstructL();
00206         void Destruct();
00207         static TInt StartServer();
00208 
00209 private:
00212         CServerPositioningPtrHolder* iPtrHolder;
00214         TAny* iReserved;
00215         };
00216 
00217 
00223 class RPositionerSubSessionBase : public RSubSessionBase
00224         {
00225 public:
00243         IMPORT_C TInt CancelRequest(TInt aRequestId);
00244 protected:
00245         IMPORT_C RPositionerSubSessionBase();
00246         IMPORT_C virtual TAny* ExtendedInterface(TInt aFunctionNumber, TAny* aPtr1, TAny* aPtr2);
00247 private:
00249         TAny* iReserved;
00250         };
00251 
00252 
00266 class RPositioner : public RPositionerSubSessionBase
00267         {
00268 public:
00272         IMPORT_C RPositioner();
00273 
00291         IMPORT_C TInt Open(RPositionServer& aPosServer);
00292 
00314         IMPORT_C TInt Open(RPositionServer& aPosServer,
00315                            TPositionModuleId aModuleId);
00316 
00328         IMPORT_C TInt Open(RPositionServer& aPosServer,
00329                            const TPositionCriteriaBase& aCriteria);
00330 
00342         IMPORT_C void Close();
00343 
00367         IMPORT_C TInt SetRequestor(CRequestor::TRequestorType aType,
00368                                    CRequestor::TRequestorFormat aFormat,
00369                                    const TDesC& aData);
00370 
00392         IMPORT_C TInt SetRequestor(const RRequestorStack& aRequestorStack);
00393 
00414         IMPORT_C TInt SetUpdateOptions(const TPositionUpdateOptionsBase& aPosOption);
00415 
00428         IMPORT_C TInt GetUpdateOptions(TPositionUpdateOptionsBase& aPosOption) const;
00429 
00462         IMPORT_C void GetLastKnownPosition(TPositionInfoBase& aPosInfo,
00463                                            TRequestStatus& aStatus) const;
00464 
00507         IMPORT_C void NotifyPositionUpdate(TPositionInfoBase& aPosInfo,
00508                                            TRequestStatus& aStatus) const;
00509 
00510 protected:
00514         IMPORT_C virtual void ConstructL();
00518         IMPORT_C virtual void Destruct();
00519 
00520         /* Reserved for future expansion - derived classes should see documentation
00521         on how this is to be used. */
00522         IMPORT_C virtual TAny* ExtendedInterface(TInt aFunctionNumber, TAny* aPtr1, TAny* aPtr2);
00523 
00524 private:
00528         void SetRequestorImplL(const RRequestorStack& aRequestorStack) const;
00529 
00530 private:
00533         CPositioningPtrHolder* iPtrHolder;
00535         TAny* iReserved;
00536         };
00537 
00538 // __LBS_H__
00539 #endif

Copyright © Nokia Corporation 2001-2008
Back to top