# HG changeset patch # User Billy Gibson # Date 1270829952 -3600 # Node ID 90477588756a9101e18d4df32e9707bd9c9f1f12 # Parent 2cd881e4a6fb712aa87f347e40c446e2cc189d25 Draft APIs for Converting Cell and/or WLAN information to a latitudes and longitude diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionClientApi/BWINS/lbslocationinfoconverteru.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionClientApi/BWINS/lbslocationinfoconverteru.def Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,15 @@ +EXPORTS + ??1CLbsLocationInfoConverter@@UAE@XZ @ 1 NONAME ; CLbsLocationInfoConverter::~CLbsLocationInfoConverter(void) + ??1CLbsLocationResolver@@UAE@XZ @ 2 NONAME ; CLbsLocationResolver::~CLbsLocationResolver(void) + ?CancelConvertLocationInfo@CLbsLocationInfoConverter@@QAEXXZ @ 3 NONAME ; void CLbsLocationInfoConverter::CancelConvertLocationInfo(void) + ?CancelResolveLocation@CLbsLocationResolver@@QAEXXZ @ 4 NONAME ; void CLbsLocationResolver::CancelResolveLocation(void) + ?ConvertLocationInfoL@CLbsLocationInfoConverter@@QAEXAAV?$RPointerArray@VCLbsLocationInfoBase@@@@KK@Z @ 5 NONAME ; void CLbsLocationInfoConverter::ConvertLocationInfoL(class RPointerArray &, unsigned long, unsigned long) + ?ConvertLocationInfoL@CLbsLocationInfoConverter@@QAEXAAVCLbsLocationInfoBase@@KK@Z @ 6 NONAME ; void CLbsLocationInfoConverter::ConvertLocationInfoL(class CLbsLocationInfoBase &, unsigned long, unsigned long) + ?NewL@CLbsLocationInfoConverter@@SAPAV1@AAVMLbsLocationInfoConverterObserver@@@Z @ 7 NONAME ; class CLbsLocationInfoConverter * CLbsLocationInfoConverter::NewL(class MLbsLocationInfoConverterObserver &) + ?NewL@CLbsLocationInfoConverter@@SAPAV1@AAVMLbsLocationInfoConverterObserver@@VTUid@@@Z @ 8 NONAME ; class CLbsLocationInfoConverter * CLbsLocationInfoConverter::NewL(class MLbsLocationInfoConverterObserver &, class TUid) + ?NewL@CLbsLocationResolver@@SAPAV1@AAVMLbsLocationResolverObserver@@@Z @ 9 NONAME ; class CLbsLocationResolver * CLbsLocationResolver::NewL(class MLbsLocationResolverObserver &) + ?NewL@CLbsLocationResolver@@SAPAV1@AAVMLbsLocationResolverObserver@@VTUid@@@Z @ 10 NONAME ; class CLbsLocationResolver * CLbsLocationResolver::NewL(class MLbsLocationResolverObserver &, class TUid) + ?ResolveLocationL@CLbsLocationResolver@@QAEXABVCLbsLocationInfo@@@Z @ 11 NONAME ; void CLbsLocationResolver::ResolveLocationL(class CLbsLocationInfo const &) + ?Version@MLbsLocationInfoConverterObserver@@UBE?AVTVersion@@XZ @ 12 NONAME ; class TVersion MLbsLocationInfoConverterObserver::Version(void) const + ?Version@MLbsLocationResolverObserver@@UBE?AVTVersion@@XZ @ 13 NONAME ; class TVersion MLbsLocationResolverObserver::Version(void) const + diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionClientApi/EABI/lbslocationinfoconverteru.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionClientApi/EABI/lbslocationinfoconverteru.def Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,23 @@ +EXPORTS + _ZN20CLbsLocationResolver16ResolveLocationLERK16CLbsLocationInfo @ 1 NONAME + _ZN20CLbsLocationResolver21CancelResolveLocationEv @ 2 NONAME + _ZN20CLbsLocationResolver4NewLER28MLbsLocationResolverObserver @ 3 NONAME + _ZN20CLbsLocationResolver4NewLER28MLbsLocationResolverObserver4TUid @ 4 NONAME + _ZN20CLbsLocationResolverD0Ev @ 5 NONAME + _ZN20CLbsLocationResolverD1Ev @ 6 NONAME + _ZN20CLbsLocationResolverD2Ev @ 7 NONAME + _ZN25CLbsLocationInfoConverter20ConvertLocationInfoLER13RPointerArrayI20CLbsLocationInfoBaseEmm @ 8 NONAME + _ZN25CLbsLocationInfoConverter20ConvertLocationInfoLER20CLbsLocationInfoBasemm @ 9 NONAME + _ZN25CLbsLocationInfoConverter25CancelConvertLocationInfoEv @ 10 NONAME + _ZN25CLbsLocationInfoConverter4NewLER33MLbsLocationInfoConverterObserver @ 11 NONAME + _ZN25CLbsLocationInfoConverter4NewLER33MLbsLocationInfoConverterObserver4TUid @ 12 NONAME + _ZN25CLbsLocationInfoConverterD0Ev @ 13 NONAME + _ZN25CLbsLocationInfoConverterD1Ev @ 14 NONAME + _ZN25CLbsLocationInfoConverterD2Ev @ 15 NONAME + _ZNK28MLbsLocationResolverObserver7VersionEv @ 16 NONAME + _ZNK33MLbsLocationInfoConverterObserver7VersionEv @ 17 NONAME + _ZTI28MLbsLocationResolverObserver @ 18 NONAME ; ## + _ZTI33MLbsLocationInfoConverterObserver @ 19 NONAME ; ## + _ZTV28MLbsLocationResolverObserver @ 20 NONAME ; ## + _ZTV33MLbsLocationInfoConverterObserver @ 21 NONAME ; ## + diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionClientApi/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionClientApi/group/bld.inf Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,26 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +PRJ_EXPORTS +../inc/lbslocationinfoconverter.h lbs/lbslocationinfoconverter.h +../inc/lbslocationresolver.h lbs/lbslocationresolver.h + + +lbslocationinfoconverter.iby /epoc32/rom/include/lbslocationinfoconverter.iby + + +PRJ_MMPFILES +lbslocationinfoconverter.mmp diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionClientApi/group/lbslocationinfoconverter.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionClientApi/group/lbslocationinfoconverter.iby Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef __LBS_LOCATIONINFOCONVERTER_IBY__ +#define __LBS_LOCATIONINFOCONVERTER_IBY__ +//#if !defined(SYMBIAN_EXCLUDE_LOCATION) + +file=ABI_DIR\DEBUG_DIR\lbslocationinfoconverter.dll sys\bin\lbslocationinfoconverter.dll + +//#endif // SYMBIAN_EXCLUDE_LOCATION + +#endif //__LBS_LOCATIONINFOCONVERTER_IBY__ diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionClientApi/group/lbslocationinfoconverter.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionClientApi/group/lbslocationinfoconverter.mmp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,39 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +TARGET lbslocationinfoconverter.dll +TARGETTYPE dll +UID 0x1000008d 0x102871F9 + +VENDORID 0x70000001 +CAPABILITY ALL -TCB + +SOURCEPATH ../src +SOURCE lbslocationinfoconverter.cpp +SOURCE lbslocationresolver.cpp + + +USERINCLUDE ../inc + +SYSTEMINCLUDE /epoc32/include + +LIBRARY euser.lib +LIBRARY lbslocationinfodatatypes.lib +LIBRARY lbs.lib +LIBRARY estor.lib + +SMPSAFE + diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionClientApi/inc/lbslocationinfoconverter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionClientApi/inc/lbslocationinfoconverter.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,224 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class used by client applications to convert location +* information +* +*/ + +/** +@file +@publishedPartner +@prototype +*/ + +#ifndef LBS_LOCATION_INFO_CONVERTER_H +#define LBS_LOCATION_INFO_CONVERTER_H + + +// OS wide +#include + +// LBS wide +#include +#include +#include + + +/** +* The MLbsLocationInfoConverterObserver class is used in partnership with +* CLbsLocationInfoConverter. The observer interface is used by the LBS +* subsystem to inform a client application when a Locality conversion +* process initiated through the CLbsLocationInfoConverter class has been +* finished. In OnResolveLocationComplete the results will be returned +* as an argument of the function, while OnConversionComplete indicates that the results +* have been written in to the data that was passed in using ConvertLocationInfoL. +* +* Although all the interface methods in the MLbsLocationInfoConverterObserver +* class are synchronous, the client application should ensure they return quickly +* (e.g. any extensive processing of the received data is scheduled in another +* active object). +*/ +class MLbsLocationInfoConverterObserver + { + +public: + + /** + * Gets the current version of the observer interface. + * Derived classes should not change the implementation. + * + * @return Version number (currently 1.0.0) + */ + IMPORT_C virtual TVersion Version() const; + + /** + * The callback is used by the LBS subsystem to inform a client application + * that a general purpose Locality conversion process initiated through the + * CLbsLocationInfoConverter::ConvertLocationInfoL method has been finished. + * + * Receiving the callback indicates that, unless the conversion was not successful, + * the location data structures passed through the + * CLbsLocationInfoConverter::ConvertLocationInfoL method have been updated with the + * requested information. + * + * @param aStatusCode Result of the conversion operation; + * KErrNone if at least one conversion have been successful and + * the related location data structure(s) passed through the + * CLbsLocationInfoConverter::ConvertLocationInfoL method + * have been updated with the requested information; + * KErrNotSupported if the conversion type specified by + * aRequestedInfo is not supported by converter plugin + * KErrNotFound if none of conversions have been successful; + * Or other system wide error code othervise. +In here I think we should say that when the caller uses ConvertLocationInfoL( RLbsLocationInfoBaseArray& aLocationInfoArray, ..) then on OnConversionComplete the caller should iterate around all 'n' of the entries of the aLocationInfoArray and call GetAreaInfoL to see if there is any conversion results. OH I see below that you say something near the ConvertLocationInfoL method. Maybe should say it here as well to ti e together + */ + virtual void OnConversionComplete(TInt aStatusCode) = 0; + + }; + + + + +/** +* The CLbsLocationInfoConverter interface is used in partnership with MLbsLocationInfoConverterObserver +* and provides the services to convert location information between different formats. +* +* Completion of conversions is indicated by the LBS subsystem by invoking callbacks defined +* by the MLbsLocationInfoConverterObserver class. +* +* Currently the only supported conversion is from WLAN and/or GSM and/or WCDMA info into a geographic +* Locality. +*/ +NONSHARABLE_CLASS(CLbsLocationInfoConverter) : public CBase + { + +public: + + /** + * Allocates and construct a new CLbsLocationInfoConverter + * @param[in] aObserver An observer for location conversion event. + * @param[in] aConverterModuleId UID of the conversion plugin to be used. + */ + IMPORT_C static CLbsLocationInfoConverter* NewL( + MLbsLocationInfoConverterObserver& aObserver, + const TUid aConverterModuleId); + + /** + * Allocates and construct a new CLbsLocationInfoConverter + * Note here to say that impementations for both OnResolveLocationComplete and OnConversionComplete MUST be provided even though only interested in say, ConvertLocationFingerPrintToLocalityL + * Opens the default module. + * @param[in] aObserver An observer for location conversion event. + */ + IMPORT_C static CLbsLocationInfoConverter* NewL( + MLbsLocationInfoConverterObserver& aObserver); + + /** + * Destructor. + */ + IMPORT_C ~CLbsLocationInfoConverter(); + + /** + * A general purpose function that converts a single locationinfo. + * Completion of the conversion is indicated by the LBS subsystem by invoking the + * MLbsLocationInfoConverterObserver::OnConversionComplete + * and the caller can then iterate through the results returned in aLocationInfo + * + * @capability Location + * + * @param[in] aLocationInfo location information to be converted. + * @param[in] aConversionPrefs Conversion preferences suggested by client + * @param[in] aRequestedInfo Location information that is requested. Currently + * the only supported conversion is from WLAN and/or GSM and/or WCDMA info into + * a geographic position, hence the parameter should be set to ELbsConversionOutputPosition) + * Need to say that can only do one of either ConvertLocationFingerPrintToLocalityL or ConvertLocationInfoL at a time or else user is panicked + + * @leave KErrNoMemory if there is not enough memory available to perform the conversion. + * KErrArgument If the location info pointer is NULL. + */ + IMPORT_C void ConvertLocationInfoL( CLbsLocationInfoBase& aLocationInfo, + const TLbsConversionPrefs aConversionPrefs, + const TLbsConversionOutputInfoMask aRequestedInfo ); + + + /** + * A general purpose function that converts multiple locationinfos. + * The maximum allowable batch size is defined by KPositionMaxBatchSize which is 500. + * Exceeding KPositionMaxBatchSize will result in KErrNotSupported being reported. + * + * Completion of the conversion is indicated by the LBS subsystem by invoking the + * MLbsLocationInfoConverterObserver::OnConversionComplete + * and the caller can then iterate through the results returned in aLocationInfoArray + * + * @capability Location + * + * @param[in] aLocationInfo An array of location information to be converted. + * @param[in] aConversionPrefs Conversion preferences suggested by client + * @param[in] aRequestedInfo Location information that is requested. Currently + * the only supported conversion is from WLAN and/or GSM and/or WCDMA info into + * a geographic position, hence the parameter should be set to ELbsConversionOutputPosition) + * + * @leave KErrNoMemory if there is not enough memory available to perform the conversion. + * KErrArgument If the location info pointer is NULL. + * KErrNotSupported if the conversion type specified by + * aRequestedInfo is not supported or if the bitmask specified by the + * client has all options set. This error is also returned if the + * batch size exceeds KPositionMaxBatchSize. + */ + IMPORT_C void ConvertLocationInfoL( RLbsLocationInfoBaseArray& aLocationInfoArray, + const TLbsConversionPrefs aConversionPrefs, + const TLbsConversionOutputInfoMask aRequestedInfo ); + + /** + * Cancels an ongoing conversion operation. + * If there is no ongoing conversion the cancellation request is ignored. + * + * Neither of the The MLbsLocationInfoConverterObserver callbacks will not be invoked if cancellation is successful. + */ + IMPORT_C void CancelConvertLocationInfo(); + +private: + + /** + * Default constructor + */ + CLbsLocationInfoConverter(); + + /** + * Symbian 2nd phase constructor. + */ + void ConstructL(MLbsLocationInfoConverterObserver& aObserver, + const TUid aConverterModuleId); + + /** + * Copy constructor. Restricted by default. + */ + CLbsLocationInfoConverter( CLbsLocationInfoConverter& ); + + /** + * Overloaded assignment operator. Restricted by default. + */ + CLbsLocationInfoConverter& operator=( CLbsLocationInfoConverter& ); + +private: + + /** + * Pointer to implementation class + */ + TAny* iLocationInfoConverterImpl; + + }; + + + +#endif // LBS_LOCATION_INFO_CONVERTER_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionClientApi/inc/lbslocationresolver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionClientApi/inc/lbslocationresolver.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,142 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class used by client applications to convert data +* such as such as WlanInfo or CellIds into TLocality position information +* +*/ + +/** +@file +@publishedPartner +@prototype +*/ + +#ifndef LBS_LOCATIONRESOLVER_H +#define LBS_LOCATIONRESOLVER_H + + +#include +#include +#include +#include + + +class MLbsLocationResolverObserver + { + +public: + + /** + * Gets the current version of the observer interface. + * Derived classes should not change the implementation. + * + * @return Version number (currently 1.0.0) + */ + IMPORT_C virtual TVersion Version() const; + + /** + * The callback is used by the LBS subsystem to inform a client application + * that a simple CLbsLocationResolver conversion process initiated through the + * CLbsLocationResolver::ResolveLocationL method has been finished. + * + * @param aStatus status of conversion, KErrNone for success, standard system error code + * in other cases. Note that in the event of a cancellation this method will not execute. + * @param aBasicLocationInfo the location conversion that was requested. + * If the conversion has failed the values will be uninitialised + */ + virtual void OnResolveLocationComplete(TInt aStatus, const TLocality& aLocality) = 0; + + }; + + +NONSHARABLE_CLASS(CLbsLocationResolver) : public CBase + { + +public: + + /** + * Allocates and construct a new CLbsLocationResolver + * @param[in] aObserver An observer for location conversion event. + * @param[in] aConverterModuleId UID of the conversion plugin to be used. + */ + IMPORT_C static CLbsLocationResolver* NewL(MLbsLocationResolverObserver& aObserver, + const TUid aConverterModuleId); + + /** + * Allocates and construct a new CLbsLocationResolver + * @param[in] aObserver An observer for location conversion event. + */ + IMPORT_C static CLbsLocationResolver* NewL(MLbsLocationResolverObserver& aObserver); + + /** + * Destructor. + */ + IMPORT_C ~CLbsLocationResolver(); + + /** + * A simple function that converts a single Location Info into a TLocality + * No preferences or masks may be set. + * The result is returned in the MLbsLocationResolverObserver + * callback via OnResolveLocationComplete + * + * Only one outstanding conversion can be open at a time for each client. + * Attempting to perform more than one will result in a leave with KErrInUse + * + * @param[in] aLocationInfo the information to be converted into a location. + */ + IMPORT_C void ResolveLocationL(const CLbsLocationInfo& aLocationInfo); + + /** + * Cancels an ongoing conversion operation. + * If there is no ongoing conversion the cancellation request is ignored. + * + * The MLbsLocationResolverObserver callback will not be invoked + * if cancellation is successful. + */ + IMPORT_C void CancelResolveLocation(); + +protected: + /** + * Default constructor + */ + CLbsLocationResolver(); + + /** + * Symbian 2nd phase constructor. + */ + void ConstructL(MLbsLocationResolverObserver& aObserver, const TUid aConverterModuleId); + + +private: + /** + * Copy constructor. Restricted by default. + */ + CLbsLocationResolver(CLbsLocationResolver&); + + /** + * Overloaded assignment operator. Restricted by default. + */ + CLbsLocationResolver& operator=(CLbsLocationResolver&); + +private: + + /** + * Pointer to implementation class + */ + TAny* iLocationResolverImpl; + + }; + + +#endif // LBS_LOCATIONRESOLVER_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionClientApi/src/lbslocationinfoconverter.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionClientApi/src/lbslocationinfoconverter.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,117 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class used by client applications to convert location +* information +* +*/ + +#include +#include +#include + + +EXPORT_C TVersion MLbsLocationInfoConverterObserver::Version() const + { + return TVersion(1, 0, 0); + } + + + +//---------------------------------------------------------------- +// CLbsLocationInfoConverter::NewL +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C CLbsLocationInfoConverter* CLbsLocationInfoConverter::NewL( + MLbsLocationInfoConverterObserver& aObserver, + const TUid aConverterModuleId ) + { + CLbsLocationInfoConverter* self = new( ELeave ) CLbsLocationInfoConverter; + CleanupStack::PushL( self ); + self->ConstructL( aObserver,aConverterModuleId ); + CleanupStack::Pop( self ); + return self; + } + +//---------------------------------------------------------------- +// CLbsLocationInfoConverter::NewL +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C CLbsLocationInfoConverter* CLbsLocationInfoConverter::NewL( + MLbsLocationInfoConverterObserver& aObserver ) + { + CLbsLocationInfoConverter* self = new( ELeave ) CLbsLocationInfoConverter; + CleanupStack::PushL( self ); + self->ConstructL( aObserver,TUid::Uid( KNullUidValue ) ); + CleanupStack::Pop( self ); + return self; + } + +//---------------------------------------------------------------- +// CLbsLocationInfoConverter::~CLbsLocationInfoConverter +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C CLbsLocationInfoConverter::~CLbsLocationInfoConverter() + { + delete iLocationInfoConverterImpl; + iLocationInfoConverterImpl = NULL; + } + +//---------------------------------------------------------------- +// CLbsLocationInfoConverter::ConvertLocationInfoL +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C void CLbsLocationInfoConverter::ConvertLocationInfoL( + CLbsLocationInfoBase& /*aLocationInfo*/, + const TLbsConversionPrefs /*aConversionPrefs*/, + const TLbsConversionOutputInfoMask /*aRequestedInfo*/ ) + { + } + +//---------------------------------------------------------------- +// CLbsLocationInfoConverter::ConvertLocationInfoL +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C void CLbsLocationInfoConverter::ConvertLocationInfoL( + RLbsLocationInfoBaseArray& /*aLocationInfoArray*/, + const TLbsConversionPrefs /*aConversionPrefs*/, + const TLbsConversionOutputInfoMask /*aRequestedInfo*/ ) + { + } + +//---------------------------------------------------------------- +// CLbsLocationInfoConverter::CancelConvertLocationInfo +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C void CLbsLocationInfoConverter::CancelConvertLocationInfo() + { + } + +//---------------------------------------------------------------- +// CLbsLocationInfoConverter::ConstructL +// (other items were commented in a header). +//---------------------------------------------------------------- +void CLbsLocationInfoConverter::ConstructL( + MLbsLocationInfoConverterObserver& /*aObserver*/, + const TUid /*aConverterModuleId*/ ) + { + } + +//---------------------------------------------------------------- +// CLbsLocationInfoConverter::CLbsLocationInfoConverter +// (other items were commented in a header). +//---------------------------------------------------------------- +CLbsLocationInfoConverter::CLbsLocationInfoConverter() + { + + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionClientApi/src/lbslocationresolver.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionClientApi/src/lbslocationresolver.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,105 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class used by client applications to convert location +* information +* +*/ + +#include +#include +#include + + +EXPORT_C TVersion MLbsLocationResolverObserver::Version() const + { + return TVersion(1, 0, 0); + } + + + +//---------------------------------------------------------------- +// CLbsLocationResolver::NewL +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C CLbsLocationResolver* CLbsLocationResolver::NewL( + MLbsLocationResolverObserver& aObserver, + const TUid aConverterModuleId ) + { + CLbsLocationResolver* self = new( ELeave ) CLbsLocationResolver; + CleanupStack::PushL( self ); + self->ConstructL( aObserver,aConverterModuleId ); + CleanupStack::Pop( self ); + return self; + } + +//---------------------------------------------------------------- +// CLbsLocationResolver::NewL +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C CLbsLocationResolver* CLbsLocationResolver::NewL( + MLbsLocationResolverObserver& aObserver ) + { + CLbsLocationResolver* self = new( ELeave ) CLbsLocationResolver; + CleanupStack::PushL( self ); + self->ConstructL( aObserver,TUid::Uid( KNullUidValue ) ); + CleanupStack::Pop( self ); + return self; + } + +//---------------------------------------------------------------- +// CLbsLocationResolver::~CLbsLocationResolver +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C CLbsLocationResolver::~CLbsLocationResolver() + { + delete iLocationResolverImpl; + iLocationResolverImpl = NULL; + } + +//---------------------------------------------------------------- +// CLbsLocationResolver::ConvertLocationInfoToBasicLocationInfoL +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C void CLbsLocationResolver::ResolveLocationL(const CLbsLocationInfo& /*aLocationInfo*/) + { + } + + + +//---------------------------------------------------------------- +// CLbsLocationResolver::CancelResolveLocation +// (other items were commented in a header). +//---------------------------------------------------------------- +EXPORT_C void CLbsLocationResolver::CancelResolveLocation() + { + } + +//---------------------------------------------------------------- +// CLbsLocationResolver::ConstructL +// (other items were commented in a header). +//---------------------------------------------------------------- +void CLbsLocationResolver::ConstructL( + MLbsLocationResolverObserver& /*aObserver*/, + const TUid /*aConverterModuleId*/ ) + { + } + +//---------------------------------------------------------------- +// CLbsLocationResolver::CLbsLocationResolver +// (other items were commented in a header). +//---------------------------------------------------------------- +CLbsLocationResolver::CLbsLocationResolver() + { + + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionCommon/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionCommon/group/bld.inf Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,18 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +PRJ_EXPORTS +../inc/lbslocationinfoconvertercommon.h lbs/lbslocationinfoconvertercommon.h diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionCommon/inc/lbslocationinfoconvertercommon.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionCommon/inc/lbslocationinfoconvertercommon.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,115 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Common enumerations used by client applications and plugins +* for conversion of location information. +* +*/ + +/** +@file +@publishedPartner +@prototype +*/ + +#ifndef LBS_LOCATION_INFO_CONVERTER_COMMON_H +#define LBS_LOCATION_INFO_CONVERTER_COMMON_H + +#include + +/** + * Conversion preferences + */ +typedef TUint32 TLbsConversionPrefs; + + +/** + * Enumeration to define the preferences a client can specify while requesting + * location information. The conversion preferences enumeration shall not be + * used as a bitmask. + * The preferences are used by conversion module in order to decide if/how + * a connection to an external server should be established. + */ +enum _TLbsConversionPrefs + { + + /** + * Indicates that no preferences are specified. + */ + ELbsConversionNotDefined = 0x0000, + + /** + * Use only local cache to retrieve information. + */ + ELbsConversionCacheOnly = 0x0001, + + /** + * Disable prompt while making a connection to an external service for + * conversion. + * Ignored if a conversion module does not require external connection. + */ + ELbsConversionSilent = 0x0002, + + /** + * Allow prompt while making a connection to an external service for + * conversion. + * Ignored if a conversion module does not require external connection. + */ + ELbsConversionPrompt = 0x0004 + + }; + + +/** + * Output Location Information + */ +typedef TUint32 TLbsConversionOutputInfoMask; + + +/** + * Enumeration to define the type(s) of location information being communicated + */ +enum _TLbsConversionOutputInfoMask + { + + /** + * Used to initialise data only. Should not be used when requesting conversions. + */ + ELbsConversionOutputNotDefined = 0x0000, + + /** + * Indicates that the input data should be converted to a geographical coordinate + * @see CLbsPositionInfo + */ + ELbsConversionOutputPosition = 0x0001, + + /** + * Indicates that the input data should be converted to a GSM Cell information + * @see CLbsGsmCellInfo + */ + ELbsConversionOutputGsm = 0x0002, + + /** + * Indicates that the input data should be converted to a WCDMA Cell information + * @see CLbsWcdmaCellInfo + */ + ELbsConversionOutputWcdma = 0x0004, + + /** + * Indicates that the input data should be converted to a WLAN information + * @see CLbsWlanInfo + */ + ELbsConversionOutputWlan = 0x0008 + }; + +#endif // LBS_LOCATION_INFO_CONVERTER_COMMON_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/BWINS/lbslocationinfoconverterpluginu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/BWINS/lbslocationinfoconverterpluginu.def Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,13 @@ +EXPORTS + ??0TLbsLocInfoConverterPluginClassTypeBase@@IAE@XZ @ 1 NONAME ; TLbsLocInfoConverterPluginClassTypeBase::TLbsLocInfoConverterPluginClassTypeBase(void) + ??0TLbsLocInfoConverterPluginParams@@QAE@AAVMLbsLocInfoConverterPluginObserver@@@Z @ 2 NONAME ; TLbsLocInfoConverterPluginParams::TLbsLocInfoConverterPluginParams(class MLbsLocInfoConverterPluginObserver &) + ??1CLbsLocInfoConverterPluginBase@@UAE@XZ @ 3 NONAME ; CLbsLocInfoConverterPluginBase::~CLbsLocInfoConverterPluginBase(void) + ?ClassSize@TLbsLocInfoConverterPluginClassTypeBase@@QBEIXZ @ 4 NONAME ; unsigned int TLbsLocInfoConverterPluginClassTypeBase::ClassSize(void) const + ?ClassType@TLbsLocInfoConverterPluginClassTypeBase@@QBEKXZ @ 5 NONAME ; unsigned long TLbsLocInfoConverterPluginClassTypeBase::ClassType(void) const + ?ExtendedInterface@CLbsLocInfoConverterPluginBase@@UAEPAXHPAX0@Z @ 6 NONAME ; void * CLbsLocInfoConverterPluginBase::ExtendedInterface(int, void *, void *) + ?ExtendedInterface@MLbsLocInfoConverterPluginObserver@@EAEPAXHPAX0@Z @ 7 NONAME ; void * MLbsLocInfoConverterPluginObserver::ExtendedInterface(int, void *, void *) + ?NewL@CLbsLocInfoConverterPluginBase@@SAPAV1@VTUid@@AAVTLbsLocInfoConverterPluginParams@@@Z @ 8 NONAME ; class CLbsLocInfoConverterPluginBase * CLbsLocInfoConverterPluginBase::NewL(class TUid, class TLbsLocInfoConverterPluginParams &) + ?Observer@TLbsLocInfoConverterPluginParams@@QBEAAVMLbsLocInfoConverterPluginObserver@@XZ @ 9 NONAME ; class MLbsLocInfoConverterPluginObserver & TLbsLocInfoConverterPluginParams::Observer(void) const + ?Version@CLbsLocInfoConverterPluginBase@@UBE?AVTVersion@@XZ @ 10 NONAME ; class TVersion CLbsLocInfoConverterPluginBase::Version(void) const + ?Version@MLbsLocInfoConverterPluginObserver@@UBE?AVTVersion@@XZ @ 11 NONAME ; class TVersion MLbsLocInfoConverterPluginObserver::Version(void) const + diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/EABI/lbslocationinfoconverterpluginu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/EABI/lbslocationinfoconverterpluginu.def Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,21 @@ +EXPORTS + _ZN30CLbsLocInfoConverterPluginBase17ExtendedInterfaceEiPvS0_ @ 1 NONAME + _ZN30CLbsLocInfoConverterPluginBase4NewLE4TUidR32TLbsLocInfoConverterPluginParams @ 2 NONAME + _ZN30CLbsLocInfoConverterPluginBaseD0Ev @ 3 NONAME + _ZN30CLbsLocInfoConverterPluginBaseD1Ev @ 4 NONAME + _ZN30CLbsLocInfoConverterPluginBaseD2Ev @ 5 NONAME + _ZN32TLbsLocInfoConverterPluginParamsC1ER34MLbsLocInfoConverterPluginObserver @ 6 NONAME + _ZN32TLbsLocInfoConverterPluginParamsC2ER34MLbsLocInfoConverterPluginObserver @ 7 NONAME + _ZN34MLbsLocInfoConverterPluginObserver17ExtendedInterfaceEiPvS0_ @ 8 NONAME + _ZN39TLbsLocInfoConverterPluginClassTypeBaseC1Ev @ 9 NONAME + _ZN39TLbsLocInfoConverterPluginClassTypeBaseC2Ev @ 10 NONAME + _ZNK30CLbsLocInfoConverterPluginBase7VersionEv @ 11 NONAME + _ZNK32TLbsLocInfoConverterPluginParams8ObserverEv @ 12 NONAME + _ZNK34MLbsLocInfoConverterPluginObserver7VersionEv @ 13 NONAME + _ZNK39TLbsLocInfoConverterPluginClassTypeBase9ClassSizeEv @ 14 NONAME + _ZNK39TLbsLocInfoConverterPluginClassTypeBase9ClassTypeEv @ 15 NONAME + _ZTI30CLbsLocInfoConverterPluginBase @ 16 NONAME ; ## + _ZTI34MLbsLocInfoConverterPluginObserver @ 17 NONAME ; ## + _ZTV30CLbsLocInfoConverterPluginBase @ 18 NONAME ; ## + _ZTV34MLbsLocInfoConverterPluginObserver @ 19 NONAME ; ## + diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/group/bld.inf Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,27 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +PRJ_EXPORTS +../inc/lbslocinfoconverterpluginbase.h lbs/lbslocinfoconverterpluginbase.h +../inc/lbslocinfoconverterpluginclasstypes.h lbs/lbslocinfoconverterpluginclasstypes.h +../inc/lbslocinfoconverterplugincommon.h lbs/lbslocinfoconverterplugincommon.h +../inc/lbslocinfoconverterpluginbase.hrh lbs/lbslocinfoconverterpluginbase.hrh + +lbslocationinfoconverterplugin.iby /epoc32/rom/include/lbslocationinfoconverterplugin.iby + + +PRJ_MMPFILES +lbslocationinfoconverterplugin.mmp diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/group/lbslocationinfoconverterplugin.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/group/lbslocationinfoconverterplugin.iby Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,26 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +//#ifndef __LBS_LOCATIONINFOCONVERTERPLUGIN_IBY__ +#define __LBS_LOCATIONINFOCONVERTERPLUGIN_IBY__ +//#if !defined(SYMBIAN_EXCLUDE_LOCATION) + +file=ABI_DIR\DEBUG_DIR\lbslocationinfoconverterplugin.dll sys\bin\lbslocationinfoconverterplugin.dll + + +//#endif // SYMBIAN_EXCLUDE_LOCATION + +//#endif //__LBS_LOCATIONINFOCONVERTERPLUGIN_IBY__ diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/group/lbslocationinfoconverterplugin.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/group/lbslocationinfoconverterplugin.mmp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,35 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +TARGET lbslocationinfoconverterplugin.dll +TARGETTYPE dll +UID 0x1000008d 0x102871FA + +VENDORID 0x70000001 +CAPABILITY ALL -TCB + +SOURCEPATH ../src +SOURCE lbslocinfoconverterpluginbase.cpp +SOURCE lbslocinfoconverterplugincommon.cpp + +USERINCLUDE ../inc +SYSTEMINCLUDE /epoc32/include + +LIBRARY euser.lib +LIBRARY ecom.lib +LIBRARY lbslocationinfodatatypes.lib + +SMPSAFE diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/inc/lbslocinfoconverterpluginbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/inc/lbslocinfoconverterpluginbase.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,294 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Location information converter plug in API +* +*/ + + +/** +* @file +* @publishedPartner +* @prototype +*/ + + +#ifndef LBS_LOC_INFO_CONVERSION_PLUGIN_BASE_H +#define LBS_LOC_INFO_CONVERSION_PLUGIN_BASE_H + + +// System wide +#include + +// Common LBS data types +#include +#include + +// Component specific +#include +#include + + +class TLbsLocInfoConverterPluginParams; + + +/** +* The MLbsLocInfoConverterPluginObserver class is used in partnership with +* CLbsLocInfoConverterPluginBase. The observer interface is used by a +* conversion plugin to inform LBS when a coordinate conversion process +* initiated through the CLbsLocInfoConverterPluginBase class is completed. +* +* Although all the interface methods in the MLbsLocInfoConverterPluginObserver +* class are synchronous, the LBS subsystem ensures they return quickly. +*/ +class MLbsLocInfoConverterPluginObserver + { + +public: + + /** + * Gets the current version of the observer interface. + * Derived classes should not change the implementation. + * + * @return Version number (currently 1.0.0) + */ + IMPORT_C virtual TVersion Version() const; + + /** + * The callback is used by the conversion plugin to inform the LBS + * subsystem that a validation request initiated through the + * CLbsLocInfoConverterPluginBase::ValidateClient method is completed. + * + * @param aStatusCode Result of the validation operation. + * KErrNone if the access is granted. + * KErrPermissionDenied due to a potential security violation. + * Other system wide error codes. + */ + IMPORT_C virtual void OnValidationComplete( TInt aStatusCode ) = 0; + + /** + * The callback is used by the conversion plugin to inform the LBS + * subsystem that a coordinate conversion process initiated through the + * CLbsLocInfoConverterPluginBase::ConvertLocationInfoL method is + * completed. + * + * Receiving the callback indicates that, unless the conversion was not + * successful, the location data structures passed through the + * CLbsLocInfoConverterPluginBase::ConvertLocationInfoL method have been + * updated with the requested information. + * + * @param aStatusCode Result of the conversion operation. + * KErrNone if at least one conversion have been successful and + * the related location data structure(s) passed through the + * CLbsLocInfoConverterPluginBase::ConvertLocationInfoL method + * have been updated with the requested information; + * KErrKErrNotFound if none of conversions have been successful + * Or other system wide error code otherwise. + */ + IMPORT_C virtual void OnConversionComplete( TInt aStatusCode ) = 0; + +private: + + /** + * This methods is reserved for future expansion and should not be used or + * implemented by derived classes. + */ + IMPORT_C virtual TAny* ExtendedInterface( TInt aFunctionNumber, + TAny* aPtr1, + TAny* aPtr2 ); + + }; + + +/** +* The CLbsLocInfoConverterPluginBase is the abstract Ecom interface to a +* coordinate conversion Plugin. All coordinate conversion Plugins must derive +* from and implement this interface. +* +* The interface is used in partnership with MLbsLocInfoConverterPluginObserver +* and is used by the LBS subsystem to request conversion of location +* information between different formats. +* +* Completion of conversions must be indicated by a plugin by invoking +* callback(s) defined by the MLbsLocInfoConverterPluginObserver class. +* +* Although all the interface methods in the class are synchronous they must +* return immediately. When the LBS subsystem makes a request via +* CLbsLocInfoConverterPluginBase the Plugin must queue the request internally +* and return control to the caller immediately. Later on, when plugin provides +* a response, it uses the corresponding notification method in the +* MLbsLocInfoConverterPluginObserver class. +*/ +class CLbsLocInfoConverterPluginBase : public CBase + { + +public: + + /** + * Loads a coordinate conversion Plugin and initalises it. + * + * @param[in] aImplementationUid An implementation Uid of the module to be + * loaded. + * @param[in] aParams Arguments sent to conversion plugin. + * + * @return Pointer to the new coordinate conversion plugin. + */ + IMPORT_C static CLbsLocInfoConverterPluginBase* NewL( + TUid aImplementationUid, + TLbsLocInfoConverterPluginParams& aParams ); + + /** + * Destructor + */ + IMPORT_C virtual ~CLbsLocInfoConverterPluginBase(); + + /** + * Gets the current version of the interface implemented by a Plugin. + * Derived classes should not change the implementation. + * + * @return Version number (currently 1.0.0) + */ + IMPORT_C virtual TVersion Version() const; + + /** + * Validates a client before a request is processed. This method is called + * by the Location Monitor Server, everytime, before a conversion request is + * sent. + * The result of validation is indicated by the plugin by invoking the + * MLbsLocInfoConverterPluginObserver::OnValidationComplete callback. + * + * @param[in] aSecureId The secure ID of the client application/process + * @param[in] aVendorId The vendor ID of the client application/process + * @param{in] aRequestedInfo The requested converted information. This + * bit field would be checked by the plugin to determine if the specified + * conversion can be supported for the requesting client. + */ + IMPORT_C virtual void ValidateClient( const TSecureId& aSecureId, + const TVendorId& aVendorId, + const TLbsConversionOutputInfoMask aRequestedInfo) = 0; + + /** + * Cancels an ongoing validation operation. + * If there is no ongoing validation operation, the cancellation request + * is ignored. + * + * The MLbsLocInfoConverterPluginObserver::OnValidationComplete callback is + * not invoked. + */ + IMPORT_C virtual void CancelValidateClient() = 0; + + /** + * Converts multiple location information. + * + * Completion of the conversion is indicated by a Plugin by invoking the + * MLbsLocInfoConverterPluginObserver::OnConversionComplete callback + * + * @param[in] aLocationInfo An array of location information for which + * corresponding position information is expected. + * @param[in] aConversionPrefs Conversion preferences suggested by client + * @param[in] aRequestedInfo Location information that is requested. + + * @leave KErrNoMemory if there is not enough memory available to perform + * the conversion. + * KErrArgument If the location info pointer is NULL. + * KErrNotSupported if the conversion type specified by aRequestedInfo is + * not supported. + * Or any other system wide error code. + */ + IMPORT_C virtual void ConvertLocationInfoL( + RLbsLocationInfoArray& aLocationInfoArray, + const TLbsConversionPrefs aConversionPrefs, + const TLbsConversionOutputInfoMask aRequestedInfo ) = 0; + + /** + * Cancels an ongoing conversion operation. + * If there is no ongoing conversion the cancellation request is ignored. + * + * The MLbsLocInfoConverterPluginObserver::OnConversionComplete callback is + * not invoked. + */ + IMPORT_C virtual void CancelConvertLocationInfo() = 0; + + /** + * This method is reserved for future expansion and should not be used + * or implemented by derived classes. + */ + IMPORT_C virtual TAny* ExtendedInterface( TInt aFunctionNumber, + TAny* aPtr1, + TAny* aPtr2 ); + +private: // data + + /** + * Instance identifier key. When instance of an implementation is + * created by ECOM framework, the framework will assign UID + * for it. The UID is used in destructor to notify framework that + * this instance is being destroyed and resources can be released. + */ + TUid iDtor_ID_Key; + + }; + + +/** +* This class encapsulates the construction parameters for a Coordinate +* Conversion plugin. +* +* These parameters are passed by the LBS subsystem to the implementation +* of the Plugin module via ECom. The ECom constructor +* should take a single TAny* parameter. That parameter should be cast to +* a variable of type TLbsLocInfoConverterPluginParams. +* +* @see CLbsLocInfoConverterPluginBase::NewL +*/ +class TLbsLocInfoConverterPluginParams : public TLbsLocInfoConverterPluginClassTypeBase + { + +public: + + /** + * This class encapsulates the construction parameters for a Coordinate + * Conversion plugin implementation. + * + * When created, the LBS subsystem must provide a reference to the + * plugin's observer. + * + * @see MLbsLocInfoConverterPluginObserver + * @see CLbsLocInfoConverterPluginBase::NewL + */ + IMPORT_C TLbsLocInfoConverterPluginParams( + MLbsLocInfoConverterPluginObserver& aObserver ); + + /** + * Returns a reference to the observer. + * + * @see MLbsLocInfoConverterPluginObserver + * @see CLbsLocInfoConverterPluginBase::NewL + */ + IMPORT_C MLbsLocInfoConverterPluginObserver& Observer() const; + +protected: + + /** + * Handle to the plugin observer + */ + MLbsLocInfoConverterPluginObserver& iObserver; + + /** + * Reserved for future use + */ + TUint8 iReserved[20]; + + }; + +#endif // LBS_LOC_INFO_CONVERSION_PLUGIN_BASE_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/inc/lbslocinfoconverterpluginbase.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/inc/lbslocinfoconverterpluginbase.hrh Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,33 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Resource headers for project +* +*/ + + +/** +* @file +* @publishedPartner +* @prototype +*/ + + +#ifndef LBSLOCINFOCONVERTERPLUGINBASE_HRH +#define LBSLOCINFOCONVERTERPLUGINBASE_HRH + +// ECom interface ID for Location information converter Plugin API +#define KLbsLocInfoConverterPlugInInterfaceId (0x10287201) + + +#endif // LBSLOCINFOCONVERTERPLUGINBASE_HRH diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/inc/lbslocinfoconverterpluginclasstypes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/inc/lbslocinfoconverterpluginclasstypes.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Common enumerations used by client applications and plugins +* for conversion of location information. +* +*/ + +/** +@file +@publishedPartner +@prototype +*/ + + +#ifndef LBS_LOC_INFO_CONV_PLUGIN_CLASS_TYPES_H +#define LBS_LOC_INFO_CONV_PLUGIN_CLASS_TYPES_H + + +/** Type used for identifying class types */ +typedef TUint32 TLbsLocInfoConverterPluginParamsClassType; + + +/** + * Class types for TLbsLocInfoConverterPluginParams and its derived classes + */ +enum _TLbsLocInfoConverterPluginParamsClassType + { + /** Should be used for data initialisation only */ + ELbsLocInfoConverterPluginParamsUnknownClass = 0x00, + + /** Identifier for TLbsLocInfoConverterPluginParams class */ + ELbsLocInfoConverterPluginParamsClass = 0x01, + + /** Not used. */ + ELbsLocInfoConverterPluginParamsLastClass = 0xFFFFFFFF + }; + + +#endif // LBS_LOC_INFO_CONV_PLUGIN_CLASS_TYPES_H + diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/inc/lbslocinfoconverterplugincommon.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/inc/lbslocinfoconverterplugincommon.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,52 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Base class for all the class representing +* location informations. +* +*/ + +/** +@file +@publishedPartner +@prototype +*/ + +#ifndef LBS_LOCATION_CONVERTER_PLUGIN_COMMON_H +#define LBS_LOCATION_CONVERTER_PLUGIN_COMMON_H + +#include + + +/** +The generic base for classes that store conversion Plugin Interface +related information +*/ +class TLbsLocInfoConverterPluginClassTypeBase + { +public: + IMPORT_C TUint32 ClassType() const; + IMPORT_C TUint ClassSize() const; + +protected: + IMPORT_C TLbsLocInfoConverterPluginClassTypeBase(); + +protected: + /** The type of the derived class */ + TUint32 iClassType; + /** The size of the derived class */ + TUint iClassSize; + }; + + +#endif // LBS_LOCATION_CONVERTER_PLUGIN_COMMON_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/src/lbslocinfoconverterpluginbase.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/src/lbslocinfoconverterpluginbase.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,120 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implentation of functions shared between all +* implementations of the LBS Network Protocol Module +* interface/ECom plugin. +* +*/ + + +#include +#include + +#include +#include + + +// --------------------------------------------------------------------------- +// MLbsLocInfoConverterPluginObserver::ExtendedInterface() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TVersion MLbsLocInfoConverterPluginObserver::Version() const + { + return TVersion( 1, 0, 0 ); + } + +// --------------------------------------------------------------------------- +// MLbsLocInfoConverterPluginObserver::ExtendedInterface() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TAny* MLbsLocInfoConverterPluginObserver::ExtendedInterface( + TInt /*aFunctionNumber*/, + TAny* /*aPtr1*/, + TAny* /*aPtr2*/ ) + { + return NULL; + } + +// --------------------------------------------------------------------------- +// CLbsLocInfoConverterPluginBase::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsLocInfoConverterPluginBase* CLbsLocInfoConverterPluginBase::NewL( + TUid aImplementationUid, + TLbsLocInfoConverterPluginParams& aParams ) + { + TAny* ptr = REComSession::CreateImplementationL( aImplementationUid, + _FOFF( CLbsLocInfoConverterPluginBase, iDtor_ID_Key ), + reinterpret_cast( &aParams ) ); + + return reinterpret_cast(ptr); + } + +// --------------------------------------------------------------------------- +// CLbsLocInfoConverterPluginBase::~CLbsLocInfoConverterPluginBase() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsLocInfoConverterPluginBase::~CLbsLocInfoConverterPluginBase() + { + REComSession::DestroyedImplementation( iDtor_ID_Key ); + } + +// --------------------------------------------------------------------------- +// CLbsLocInfoConverterPluginBase::Version() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TVersion CLbsLocInfoConverterPluginBase::Version() const + { + return TVersion( 1, 0, 0 ); + } + +// --------------------------------------------------------------------------- +// CLbsLocInfoConverterPluginBase::ExtendedInterface() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TAny* CLbsLocInfoConverterPluginBase::ExtendedInterface( + TInt /*aFunctionNumber*/, + TAny* /*aPtr1*/, + TAny* /*aPtr2*/ ) + { + return NULL; + } + +// --------------------------------------------------------------------------- +// TLbsLocInfoConverterPluginParams::TLbsLocInfoConverterPluginParams() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TLbsLocInfoConverterPluginParams::TLbsLocInfoConverterPluginParams( + MLbsLocInfoConverterPluginObserver& aObserver ):iObserver(aObserver) + { + iClassType = ELbsLocInfoConverterPluginParamsClass; + iClassSize = sizeof(TLbsLocInfoConverterPluginParams); + } + +// --------------------------------------------------------------------------- +// TLbsLocInfoConverterPluginParams::Observer() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C MLbsLocInfoConverterPluginObserver& TLbsLocInfoConverterPluginParams::Observer() const + { + return iObserver; + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/src/lbslocinfoconverterplugincommon.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/ConversionPluginApi/src/lbslocinfoconverterplugincommon.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,53 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implentation of functions shared between all +* implementations of the LBS Network Protocol Module +* interface/ECom plugin. +* +*/ + +#include +#include + + +// --------------------------------------------------------------------------- +// TLbsLocInfoConverterPluginClassTypeBase::TLbsLocInfoConverterPluginClassTypeBase() +// Default constructor for TLbsLocInfoConverterPluginClassTypeBase +// --------------------------------------------------------------------------- +// +EXPORT_C TLbsLocInfoConverterPluginClassTypeBase::TLbsLocInfoConverterPluginClassTypeBase() +: iClassType(0), + iClassSize(0) + { + } + +// --------------------------------------------------------------------------- +// TLbsLocInfoConverterPluginClassTypeBase::ClassSize() +// Returns the size of the TLbsLocInfoConverterPluginClassTypeBase-derived class +// --------------------------------------------------------------------------- +// +EXPORT_C TUint TLbsLocInfoConverterPluginClassTypeBase::ClassSize() const + { + return iClassSize; + } + +// --------------------------------------------------------------------------- +// TLbsLocInfoConverterPluginClassTypeBase::ClassType() +// Returns the type of the TLbsLocInfoConverterPluginClassTypeBase-derived class +// --------------------------------------------------------------------------- +// +EXPORT_C TUint32 TLbsLocInfoConverterPluginClassTypeBase::ClassType() const + { + return iClassType; + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/group/ABLD.BAT --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/group/ABLD.BAT Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,15 @@ +@ECHO OFF + +REM Bldmake-generated batch file - ABLD.BAT +REM ** DO NOT EDIT ** + +perl -S ABLD.PL "\Lbs-Features\geocodding\ConversionApi\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 +if errorlevel==1 goto CheckPerl +goto End + +:CheckPerl +perl -v >NUL +if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? +goto End + +:End diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionApi/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionApi/group/bld.inf Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file provides the information required for building the +* location monitor component. +* +*/ + +#include "../../ConversionDataTypes/group/bld.inf" +#include "../ConversionCommon/group/bld.inf" +#include "../ConversionClientApi/group/bld.inf" +#include "../ConversionPluginApi/group/bld.inf" + + +// End of file diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/BWINS/lbslocationinfodatatypesu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/BWINS/lbslocationinfodatatypesu.def Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,79 @@ +EXPORTS + ??0TLbsGsmNeighbourCellInfo@@QAE@HHH@Z @ 1 NONAME ; TLbsGsmNeighbourCellInfo::TLbsGsmNeighbourCellInfo(int, int, int) + ??0TLbsGsmNeighbourCellInfo@@QAE@XZ @ 2 NONAME ; TLbsGsmNeighbourCellInfo::TLbsGsmNeighbourCellInfo(void) + ??0TLbsWcdmaNeighbourCellInfo@@QAE@HHHH@Z @ 3 NONAME ; TLbsWcdmaNeighbourCellInfo::TLbsWcdmaNeighbourCellInfo(int, int, int, int) + ??0TLbsWcdmaNeighbourCellInfo@@QAE@XZ @ 4 NONAME ; TLbsWcdmaNeighbourCellInfo::TLbsWcdmaNeighbourCellInfo(void) + ??1CLbsAreaInfoBase@@UAE@XZ @ 5 NONAME ; CLbsAreaInfoBase::~CLbsAreaInfoBase(void) + ??1CLbsGsmCellInfo@@UAE@XZ @ 6 NONAME ; CLbsGsmCellInfo::~CLbsGsmCellInfo(void) + ??1CLbsLocationInfo@@UAE@XZ @ 7 NONAME ; CLbsLocationInfo::~CLbsLocationInfo(void) + ??1CLbsLocationInfoBase@@UAE@XZ @ 8 NONAME ; CLbsLocationInfoBase::~CLbsLocationInfoBase(void) + ??1CLbsPositionInfo@@UAE@XZ @ 9 NONAME ; CLbsPositionInfo::~CLbsPositionInfo(void) + ??1CLbsWcdmaCellInfo@@UAE@XZ @ 10 NONAME ; CLbsWcdmaCellInfo::~CLbsWcdmaCellInfo(void) + ??1CLbsWlanInfo@@UAE@XZ @ 11 NONAME ; CLbsWlanInfo::~CLbsWlanInfo(void) + ?AddAreaInfoL@CLbsLocationInfo@@QAEXPAVCLbsAreaInfoBase@@@Z @ 12 NONAME ; void CLbsLocationInfo::AddAreaInfoL(class CLbsAreaInfoBase *) + ?AddNeighbouringCellInfoL@CLbsGsmCellInfo@@QAEXPAVTLbsGsmNeighbourCellInfo@@@Z @ 13 NONAME ; void CLbsGsmCellInfo::AddNeighbouringCellInfoL(class TLbsGsmNeighbourCellInfo *) + ?AddNeighbouringCellInfoL@CLbsWcdmaCellInfo@@QAEXPAVTLbsWcdmaNeighbourCellInfo@@@Z @ 14 NONAME ; void CLbsWcdmaCellInfo::AddNeighbouringCellInfoL(class TLbsWcdmaNeighbourCellInfo *) + ?Arfcn@TLbsGsmNeighbourCellInfo@@QBEHXZ @ 15 NONAME ; int TLbsGsmNeighbourCellInfo::Arfcn(void) const + ?Bsic@TLbsGsmNeighbourCellInfo@@QBEHXZ @ 16 NONAME ; int TLbsGsmNeighbourCellInfo::Bsic(void) const + ?CellId@CLbsGsmCellInfo@@QBEHXZ @ 17 NONAME ; int CLbsGsmCellInfo::CellId(void) const + ?ExternaliseL@CLbsAreaInfoBase@@QBEXAAVRWriteStream@@@Z @ 18 NONAME ; void CLbsAreaInfoBase::ExternaliseL(class RWriteStream &) const + ?ExternaliseL@CLbsLocationInfoBase@@QBEXAAVRWriteStream@@@Z @ 19 NONAME ; void CLbsLocationInfoBase::ExternaliseL(class RWriteStream &) const + ?GetAreaInfoL@CLbsLocationInfo@@QAEXAAV?$RPointerArray@VCLbsAreaInfoBase@@@@K@Z @ 20 NONAME ; void CLbsLocationInfo::GetAreaInfoL(class RPointerArray &, unsigned long) + ?GetLocality@CLbsPositionInfo@@QBEXAAVTLocality@@@Z @ 21 NONAME ; void CLbsPositionInfo::GetLocality(class TLocality &) const + ?GetMacAddress@CLbsWlanInfo@@QBEXAAVTDes8@@@Z @ 22 NONAME ; void CLbsWlanInfo::GetMacAddress(class TDes8 &) const + ?GetNeighbouringCellInfoL@CLbsGsmCellInfo@@QBEXAAV?$RArray@VTLbsGsmNeighbourCellInfo@@@@@Z @ 23 NONAME ; void CLbsGsmCellInfo::GetNeighbouringCellInfoL(class RArray &) const + ?GetNeighbouringCellInfoL@CLbsWcdmaCellInfo@@QBEXAAV?$RArray@VTLbsWcdmaNeighbourCellInfo@@@@@Z @ 24 NONAME ; void CLbsWcdmaCellInfo::GetNeighbouringCellInfoL(class RArray &) const + ?InternaliseL@CLbsAreaInfoBase@@QAEXAAVRReadStream@@@Z @ 25 NONAME ; void CLbsAreaInfoBase::InternaliseL(class RReadStream &) + ?InternaliseL@CLbsLocationInfoBase@@QAEXAAVRReadStream@@@Z @ 26 NONAME ; void CLbsLocationInfoBase::InternaliseL(class RReadStream &) + ?LocationAreaCode@CLbsGsmCellInfo@@QBEHXZ @ 27 NONAME ; int CLbsGsmCellInfo::LocationAreaCode(void) const + ?MobileCountryCode@CLbsGsmCellInfo@@QBEHXZ @ 28 NONAME ; int CLbsGsmCellInfo::MobileCountryCode(void) const + ?MobileCountryCode@CLbsWcdmaCellInfo@@QBEHXZ @ 29 NONAME ; int CLbsWcdmaCellInfo::MobileCountryCode(void) const + ?MobileNetworkCode@CLbsGsmCellInfo@@QBEHXZ @ 30 NONAME ; int CLbsGsmCellInfo::MobileNetworkCode(void) const + ?MobileNetworkCode@CLbsWcdmaCellInfo@@QBEHXZ @ 31 NONAME ; int CLbsWcdmaCellInfo::MobileNetworkCode(void) const + ?NewL@CLbsGsmCellInfo@@SAPAV1@HHHH@Z @ 32 NONAME ; class CLbsGsmCellInfo * CLbsGsmCellInfo::NewL(int, int, int, int) + ?NewL@CLbsGsmCellInfo@@SAPAV1@XZ @ 33 NONAME ; class CLbsGsmCellInfo * CLbsGsmCellInfo::NewL(void) + ?NewL@CLbsLocationInfo@@SAPAV1@XZ @ 34 NONAME ; class CLbsLocationInfo * CLbsLocationInfo::NewL(void) + ?NewL@CLbsPositionInfo@@SAPAV1@ABVTLocality@@@Z @ 35 NONAME ; class CLbsPositionInfo * CLbsPositionInfo::NewL(class TLocality const &) + ?NewL@CLbsPositionInfo@@SAPAV1@XZ @ 36 NONAME ; class CLbsPositionInfo * CLbsPositionInfo::NewL(void) + ?NewL@CLbsWcdmaCellInfo@@SAPAV1@HHH@Z @ 37 NONAME ; class CLbsWcdmaCellInfo * CLbsWcdmaCellInfo::NewL(int, int, int) + ?NewL@CLbsWcdmaCellInfo@@SAPAV1@XZ @ 38 NONAME ; class CLbsWcdmaCellInfo * CLbsWcdmaCellInfo::NewL(void) + ?NewL@CLbsWlanInfo@@SAPAV1@ABV?$TBuf8@$0BC@@@H@Z @ 39 NONAME ; class CLbsWlanInfo * CLbsWlanInfo::NewL(class TBuf8<18> const &, int) + ?NewL@CLbsWlanInfo@@SAPAV1@XZ @ 40 NONAME ; class CLbsWlanInfo * CLbsWlanInfo::NewL(void) + ?NewLC@CLbsLocationInfo@@SAPAV1@XZ @ 41 NONAME ; class CLbsLocationInfo * CLbsLocationInfo::NewLC(void) + ?Pathloss@TLbsWcdmaNeighbourCellInfo@@QBEHXZ @ 42 NONAME ; int TLbsWcdmaNeighbourCellInfo::Pathloss(void) const + ?ResetAreaInfo@CLbsLocationInfo@@QAEXK@Z @ 43 NONAME ; void CLbsLocationInfo::ResetAreaInfo(unsigned long) + ?ResetNeighbouringCellInfo@CLbsGsmCellInfo@@QAEXXZ @ 44 NONAME ; void CLbsGsmCellInfo::ResetNeighbouringCellInfo(void) + ?ResetNeighbouringCellInfo@CLbsWcdmaCellInfo@@QAEXXZ @ 45 NONAME ; void CLbsWcdmaCellInfo::ResetNeighbouringCellInfo(void) + ?RxLevel@CLbsGsmCellInfo@@QBEHXZ @ 46 NONAME ; int CLbsGsmCellInfo::RxLevel(void) const + ?RxLevel@TLbsGsmNeighbourCellInfo@@QBEHXZ @ 47 NONAME ; int TLbsGsmNeighbourCellInfo::RxLevel(void) const + ?ScramblingCode@CLbsWcdmaCellInfo@@QBEHXZ @ 48 NONAME ; int CLbsWcdmaCellInfo::ScramblingCode(void) const + ?ScramblingCode@TLbsWcdmaNeighbourCellInfo@@QBEHXZ @ 49 NONAME ; int TLbsWcdmaNeighbourCellInfo::ScramblingCode(void) const + ?SetArfcn@TLbsGsmNeighbourCellInfo@@QAEXH@Z @ 50 NONAME ; void TLbsGsmNeighbourCellInfo::SetArfcn(int) + ?SetBsic@TLbsGsmNeighbourCellInfo@@QAEXH@Z @ 51 NONAME ; void TLbsGsmNeighbourCellInfo::SetBsic(int) + ?SetCellId@CLbsGsmCellInfo@@QAEXH@Z @ 52 NONAME ; void CLbsGsmCellInfo::SetCellId(int) + ?SetLocality@CLbsPositionInfo@@QAEXABVTLocality@@@Z @ 53 NONAME ; void CLbsPositionInfo::SetLocality(class TLocality const &) + ?SetLocationAreaCode@CLbsGsmCellInfo@@QAEXH@Z @ 54 NONAME ; void CLbsGsmCellInfo::SetLocationAreaCode(int) + ?SetMacAddress@CLbsWlanInfo@@QAEXABVTDesC8@@@Z @ 55 NONAME ; void CLbsWlanInfo::SetMacAddress(class TDesC8 const &) + ?SetMobileCountryCode@CLbsGsmCellInfo@@QAEXH@Z @ 56 NONAME ; void CLbsGsmCellInfo::SetMobileCountryCode(int) + ?SetMobileCountryCode@CLbsWcdmaCellInfo@@QAEXH@Z @ 57 NONAME ; void CLbsWcdmaCellInfo::SetMobileCountryCode(int) + ?SetMobileNetworkCode@CLbsGsmCellInfo@@QAEXH@Z @ 58 NONAME ; void CLbsGsmCellInfo::SetMobileNetworkCode(int) + ?SetMobileNetworkCode@CLbsWcdmaCellInfo@@QAEXH@Z @ 59 NONAME ; void CLbsWcdmaCellInfo::SetMobileNetworkCode(int) + ?SetPathloss@TLbsWcdmaNeighbourCellInfo@@QAEXH@Z @ 60 NONAME ; void TLbsWcdmaNeighbourCellInfo::SetPathloss(int) + ?SetRxLevel@CLbsGsmCellInfo@@QAEXH@Z @ 61 NONAME ; void CLbsGsmCellInfo::SetRxLevel(int) + ?SetRxLevel@TLbsGsmNeighbourCellInfo@@QAEXH@Z @ 62 NONAME ; void TLbsGsmNeighbourCellInfo::SetRxLevel(int) + ?SetScramblingCode@CLbsWcdmaCellInfo@@QAEXH@Z @ 63 NONAME ; void CLbsWcdmaCellInfo::SetScramblingCode(int) + ?SetScramblingCode@TLbsWcdmaNeighbourCellInfo@@QAEXH@Z @ 64 NONAME ; void TLbsWcdmaNeighbourCellInfo::SetScramblingCode(int) + ?SetSignalStrength@CLbsWlanInfo@@QAEXH@Z @ 65 NONAME ; void CLbsWlanInfo::SetSignalStrength(int) + ?SetSignalStrength@TLbsWcdmaNeighbourCellInfo@@QAEXH@Z @ 66 NONAME ; void TLbsWcdmaNeighbourCellInfo::SetSignalStrength(int) + ?SetTimingAdvance@CLbsGsmCellInfo@@QAEXH@Z @ 67 NONAME ; void CLbsGsmCellInfo::SetTimingAdvance(int) + ?SetUniqueCellId@CLbsWcdmaCellInfo@@QAEXH@Z @ 68 NONAME ; void CLbsWcdmaCellInfo::SetUniqueCellId(int) + ?SetUniqueCellId@TLbsWcdmaNeighbourCellInfo@@QAEXH@Z @ 69 NONAME ; void TLbsWcdmaNeighbourCellInfo::SetUniqueCellId(int) + ?SignalStrength@CLbsWlanInfo@@QBEHXZ @ 70 NONAME ; int CLbsWlanInfo::SignalStrength(void) const + ?SignalStrength@TLbsWcdmaNeighbourCellInfo@@QBEHXZ @ 71 NONAME ; int TLbsWcdmaNeighbourCellInfo::SignalStrength(void) const + ?TimingAdvance@CLbsGsmCellInfo@@QBEHXZ @ 72 NONAME ; int CLbsGsmCellInfo::TimingAdvance(void) const + ?Type@CLbsAreaInfoBase@@UAEKXZ @ 73 NONAME ; unsigned long CLbsAreaInfoBase::Type(void) + ?Type@CLbsLocationInfo@@MAEKXZ @ 74 NONAME ; unsigned long CLbsLocationInfo::Type(void) + ?Type@CLbsLocationInfoBase@@UAEKXZ @ 75 NONAME ; unsigned long CLbsLocationInfoBase::Type(void) + ?UniqueCellId@CLbsWcdmaCellInfo@@QBEHXZ @ 76 NONAME ; int CLbsWcdmaCellInfo::UniqueCellId(void) const + ?UniqueCellId@TLbsWcdmaNeighbourCellInfo@@QBEHXZ @ 77 NONAME ; int TLbsWcdmaNeighbourCellInfo::UniqueCellId(void) const + diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/EABI/lbslocationinfodatatypesu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/EABI/lbslocationinfodatatypesu.def Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,97 @@ +EXPORTS + _ZN12CLbsWlanInfo13SetMacAddressERK6TDesC8 @ 1 NONAME + _ZN12CLbsWlanInfo17SetSignalStrengthEi @ 2 NONAME + _ZN12CLbsWlanInfo4NewLERK5TBuf8ILi18EEi @ 3 NONAME + _ZN12CLbsWlanInfo4NewLEv @ 4 NONAME + _ZN12CLbsWlanInfoD0Ev @ 5 NONAME + _ZN12CLbsWlanInfoD1Ev @ 6 NONAME + _ZN12CLbsWlanInfoD2Ev @ 7 NONAME + _ZN15CLbsGsmCellInfo10SetRxLevelEi @ 8 NONAME + _ZN15CLbsGsmCellInfo16SetTimingAdvanceEi @ 9 NONAME + _ZN15CLbsGsmCellInfo19SetLocationAreaCodeEi @ 10 NONAME + _ZN15CLbsGsmCellInfo20SetMobileCountryCodeEi @ 11 NONAME + _ZN15CLbsGsmCellInfo20SetMobileNetworkCodeEi @ 12 NONAME + _ZN15CLbsGsmCellInfo24AddNeighbouringCellInfoLEP24TLbsGsmNeighbourCellInfo @ 13 NONAME + _ZN15CLbsGsmCellInfo25ResetNeighbouringCellInfoEv @ 14 NONAME + _ZN15CLbsGsmCellInfo4NewLEiiii @ 15 NONAME + _ZN15CLbsGsmCellInfo4NewLEv @ 16 NONAME + _ZN15CLbsGsmCellInfo9SetCellIdEi @ 17 NONAME + _ZN15CLbsGsmCellInfoD0Ev @ 18 NONAME + _ZN15CLbsGsmCellInfoD1Ev @ 19 NONAME + _ZN15CLbsGsmCellInfoD2Ev @ 20 NONAME + _ZN16CLbsAreaInfoBase12InternaliseLER11RReadStream @ 21 NONAME + _ZN16CLbsAreaInfoBase4TypeEv @ 22 NONAME + _ZN16CLbsAreaInfoBaseD0Ev @ 23 NONAME + _ZN16CLbsAreaInfoBaseD1Ev @ 24 NONAME + _ZN16CLbsAreaInfoBaseD2Ev @ 25 NONAME + _ZN16CLbsLocationInfo12AddAreaInfoLEP16CLbsAreaInfoBase @ 26 NONAME + _ZN16CLbsLocationInfo12GetAreaInfoLER13RPointerArrayI16CLbsAreaInfoBaseEm @ 27 NONAME + _ZN16CLbsLocationInfo13ResetAreaInfoEm @ 28 NONAME + _ZN16CLbsLocationInfo4NewLEv @ 29 NONAME + _ZN16CLbsLocationInfo4TypeEv @ 30 NONAME + _ZN16CLbsLocationInfo5NewLCEv @ 31 NONAME + _ZN16CLbsLocationInfoD0Ev @ 32 NONAME + _ZN16CLbsLocationInfoD1Ev @ 33 NONAME + _ZN16CLbsLocationInfoD2Ev @ 34 NONAME + _ZN16CLbsPositionInfo11SetLocalityERK9TLocality @ 35 NONAME + _ZN16CLbsPositionInfo4NewLERK9TLocality @ 36 NONAME + _ZN16CLbsPositionInfo4NewLEv @ 37 NONAME + _ZN16CLbsPositionInfoD0Ev @ 38 NONAME + _ZN16CLbsPositionInfoD1Ev @ 39 NONAME + _ZN16CLbsPositionInfoD2Ev @ 40 NONAME + _ZN17CLbsWcdmaCellInfo15SetUniqueCellIdEi @ 41 NONAME + _ZN17CLbsWcdmaCellInfo17SetScramblingCodeEi @ 42 NONAME + _ZN17CLbsWcdmaCellInfo20SetMobileCountryCodeEi @ 43 NONAME + _ZN17CLbsWcdmaCellInfo20SetMobileNetworkCodeEi @ 44 NONAME + _ZN17CLbsWcdmaCellInfo24AddNeighbouringCellInfoLEP26TLbsWcdmaNeighbourCellInfo @ 45 NONAME + _ZN17CLbsWcdmaCellInfo25ResetNeighbouringCellInfoEv @ 46 NONAME + _ZN17CLbsWcdmaCellInfo4NewLEiii @ 47 NONAME + _ZN17CLbsWcdmaCellInfo4NewLEv @ 48 NONAME + _ZN17CLbsWcdmaCellInfoD0Ev @ 49 NONAME + _ZN17CLbsWcdmaCellInfoD1Ev @ 50 NONAME + _ZN17CLbsWcdmaCellInfoD2Ev @ 51 NONAME + _ZN20CLbsLocationInfoBase12InternaliseLER11RReadStream @ 52 NONAME + _ZN20CLbsLocationInfoBase4TypeEv @ 53 NONAME + _ZN20CLbsLocationInfoBaseD0Ev @ 54 NONAME + _ZN20CLbsLocationInfoBaseD1Ev @ 55 NONAME + _ZN20CLbsLocationInfoBaseD2Ev @ 56 NONAME + _ZN24TLbsGsmNeighbourCellInfo10SetRxLevelEi @ 57 NONAME + _ZN24TLbsGsmNeighbourCellInfo7SetBsicEi @ 58 NONAME + _ZN24TLbsGsmNeighbourCellInfo8SetArfcnEi @ 59 NONAME + _ZN24TLbsGsmNeighbourCellInfoC1Eiii @ 60 NONAME + _ZN24TLbsGsmNeighbourCellInfoC1Ev @ 61 NONAME + _ZN24TLbsGsmNeighbourCellInfoC2Eiii @ 62 NONAME + _ZN24TLbsGsmNeighbourCellInfoC2Ev @ 63 NONAME + _ZN26TLbsWcdmaNeighbourCellInfo11SetPathlossEi @ 64 NONAME + _ZN26TLbsWcdmaNeighbourCellInfo15SetUniqueCellIdEi @ 65 NONAME + _ZN26TLbsWcdmaNeighbourCellInfo17SetScramblingCodeEi @ 66 NONAME + _ZN26TLbsWcdmaNeighbourCellInfo17SetSignalStrengthEi @ 67 NONAME + _ZN26TLbsWcdmaNeighbourCellInfoC1Eiiii @ 68 NONAME + _ZN26TLbsWcdmaNeighbourCellInfoC1Ev @ 69 NONAME + _ZN26TLbsWcdmaNeighbourCellInfoC2Eiiii @ 70 NONAME + _ZN26TLbsWcdmaNeighbourCellInfoC2Ev @ 71 NONAME + _ZNK12CLbsWlanInfo13GetMacAddressER5TDes8 @ 72 NONAME + _ZNK12CLbsWlanInfo14SignalStrengthEv @ 73 NONAME + _ZNK15CLbsGsmCellInfo13TimingAdvanceEv @ 74 NONAME + _ZNK15CLbsGsmCellInfo16LocationAreaCodeEv @ 75 NONAME + _ZNK15CLbsGsmCellInfo17MobileCountryCodeEv @ 76 NONAME + _ZNK15CLbsGsmCellInfo17MobileNetworkCodeEv @ 77 NONAME + _ZNK15CLbsGsmCellInfo24GetNeighbouringCellInfoLER6RArrayI24TLbsGsmNeighbourCellInfoE @ 78 NONAME + _ZNK15CLbsGsmCellInfo6CellIdEv @ 79 NONAME + _ZNK15CLbsGsmCellInfo7RxLevelEv @ 80 NONAME + _ZNK16CLbsAreaInfoBase12ExternaliseLER12RWriteStream @ 81 NONAME + _ZNK16CLbsPositionInfo11GetLocalityER9TLocality @ 82 NONAME + _ZNK17CLbsWcdmaCellInfo12UniqueCellIdEv @ 83 NONAME + _ZNK17CLbsWcdmaCellInfo14ScramblingCodeEv @ 84 NONAME + _ZNK17CLbsWcdmaCellInfo17MobileCountryCodeEv @ 85 NONAME + _ZNK17CLbsWcdmaCellInfo17MobileNetworkCodeEv @ 86 NONAME + _ZNK17CLbsWcdmaCellInfo24GetNeighbouringCellInfoLER6RArrayI26TLbsWcdmaNeighbourCellInfoE @ 87 NONAME + _ZNK20CLbsLocationInfoBase12ExternaliseLER12RWriteStream @ 88 NONAME + _ZNK24TLbsGsmNeighbourCellInfo4BsicEv @ 89 NONAME + _ZNK24TLbsGsmNeighbourCellInfo5ArfcnEv @ 90 NONAME + _ZNK24TLbsGsmNeighbourCellInfo7RxLevelEv @ 91 NONAME + _ZNK26TLbsWcdmaNeighbourCellInfo12UniqueCellIdEv @ 92 NONAME + _ZNK26TLbsWcdmaNeighbourCellInfo14ScramblingCodeEv @ 93 NONAME + _ZNK26TLbsWcdmaNeighbourCellInfo14SignalStrengthEv @ 94 NONAME + _ZNK26TLbsWcdmaNeighbourCellInfo8PathlossEv @ 95 NONAME + diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/group/bld.inf Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,32 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +PRJ_EXPORTS +../inc/lbslocationclasstypes.h lbs/lbslocationclasstypes.h +../inc/lbslocationcommon.h lbs/lbslocationcommon.h +../inc/lbslocationposinfo.h lbs/lbslocationposinfo.h +../inc/lbslocationgsminfo.h lbs/lbslocationgsminfo.h +../inc/lbslocationgsmneighbourinfo.h lbs/lbslocationgsmneighbourinfo.h +../inc/lbslocationinfo.h lbs/lbslocationinfo.h +../inc/lbslocationwcdmainfo.h lbs/lbslocationwcdmainfo.h +../inc/lbslocationwcdmaneighbourinfo.h lbs/lbslocationwcdmaneighbourinfo.h +../inc/lbslocationwlaninfo.h lbs/lbslocationwlaninfo.h + +lbslocationinfodatatypes.iby /epoc32/rom/include/lbslocationinfodatatypes.iby + +PRJ_MMPFILES +lbslocationinfodatatypes.mmp + diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/group/lbslocationinfodatatypes.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/group/lbslocationinfodatatypes.iby Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef __LBS_LOCATIONINFODATATYPES_IBY__ +#define __LBS_LOCATIONINFODATATYPES_IBY__ + +//#if !defined(SYMBIAN_EXCLUDE_LOCATION) + +file=ABI_DIR\DEBUG_DIR\lbslocationinfodatatypes.dll sys\bin\lbslocationinfodatatypes.dll + +//#endif // SYMBIAN_EXCLUDE_LOCATION +#endif //__LBS_LOCATIONINFODATATYPES_IBY__ diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/group/lbslocationinfodatatypes.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/group/lbslocationinfodatatypes.mmp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,41 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +TARGET lbslocationinfodatatypes.dll +TARGETTYPE dll +UID 0x1000008d 0x102871FB + +VENDORID 0x70000001 +CAPABILITY ALL -TCB + +SOURCEPATH ../src +SOURCE lbslocationcommon.cpp +SOURCE lbslocationinfo.cpp +SOURCE lbslocationposinfo.cpp +SOURCE lbslocationgsminfo.cpp +SOURCE lbslocationwcdmainfo.cpp +SOURCE lbslocationwlaninfo.cpp +SOURCE lbslocationwcdmaneighbourinfo.cpp +SOURCE lbslocationgsmneighbourinfo.cpp + +USERINCLUDE ../inc +SYSTEMINCLUDE /epoc32/include + +LIBRARY euser.lib +LIBRARY estor.lib +LIBRARY lbs.lib + +SMPSAFE diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationclasstypes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationclasstypes.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,111 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +/** +* @file +* @publishedPartner +* @prototype +*/ + + +#ifndef LBS_LOCATION_CLASS_TYPES_H +#define LBS_LOCATION_CLASS_TYPES_H + + +/** + * Type used for identifying location info class types + */ +typedef TUint32 TLbsAreaInfoClassType; + +/** + * Enumeration to indicate the type of area information. + * This information is included when a client application creates + * a class derived from CLbsAreaInfoBase + */ +enum _TLbsAreaInfoClassType + { + /** + * Should be used for data initialisation only + */ + ELbsAreaInfoUnknownClass = 0x00, + + /** + * Identifier for CLbsPositionInfo class + */ + ELbsAreaPositionInfoClass = 0x01, + + /** + * Identifier for CLbsGsmCellInfo class + */ + ELbsAreaGsmCellInfoClass = 0x02, + + /** + * Identifier for CLbsGsmNeighbourCellInfo class + */ + ELbsAreaGsmNeighbourCellInfoClass = 0x04, + + /** + * Identifier for CLbsWcdmaCellInfo class + */ + ELbsAreaWcmdaCellInfoClass = 0x08, + + /** + * Identifier for CLbsWcdmaNeighbourCellInfo class + */ + ELbsAreaWcmdaNeighbourCellInfoClass = 0x10, + + /** + * Identifier for CLbsWlanInfo class + */ + ELbsAreaWlanInfoClass = 0x20, + + /** + * Not used + */ + ELbsAreaInfoLastClass = 0xFFFFFFFF + }; + + +/** + * Type used for identifying location info class types + */ +typedef TUint32 TLbsLocationInfoClassType; + +/** + * Enumeration to indicate the type of area information. + * This information is included when a client application creates + * a class derived from CLbsLocationInfoBase + */ +enum _TLbsLocationInfoClassType + { + /** + * Should be used for data initialisation only + */ + ELbsLocationInfoUnknownClass = 0x00, + + /** + * Identifier for CLbsLocationInfo class + */ + ELbsLocationInfoClass = 0x01, + + /** + * Not used + */ + ELbsLocationInfoLastClass = 0xFFFFFFFF + }; + +#endif //LBS_LOCATION_CLASS_TYPES_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationcommon.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationcommon.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,211 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Base class for all the class representing +* location informations. +* +*/ + + +/** +@file +@publishedPartner +@prototype +*/ + + +#ifndef LBS_LOCATION_COMMON_H +#define LBS_LOCATION_COMMON_H + + +#include +#include +#include + + +// Constants + +/** + * Defines the maximum allowable batch size supported by the system + */ +const TUint KPositionMaxBatchSize = 500; + + +/** + * Abstract base class for data class representing location area + * information. + */ +NONSHARABLE_CLASS(CLbsLocationInfoBase) : public CBase + { + +public: + + /** + * This method is implemented by each of the derived classes that + * extend this class. + */ + IMPORT_C virtual TLbsLocationInfoClassType Type(); + + /** + * Destructor + */ + IMPORT_C virtual ~CLbsLocationInfoBase(); + + /** + * Internalizes the geographical area information from a stream. + * + * @param[in] aStream Stream from which the object is internalized. + */ + IMPORT_C void InternaliseL( RReadStream& aStream ); + + /** + * Externalizes the geographical area information to a stream. + * + * @param[in] aStream Stream to which the object is to be + * externalized. + */ + IMPORT_C void ExternaliseL( RWriteStream& aStream ) const; + +protected: + + /** + * C++ default constructor + */ + CLbsLocationInfoBase(); + + /** + * Internalize method that subclass must implement. + * + * @param[in] aStream Stream from which the object is internalized. + */ + virtual void DoInternaliseL( RReadStream& aStream ) = 0; + + /** + * Externalize method that subclass must implement. + * + * @param[in] aStream Stream to which the object is to be + * externalized. + */ + virtual void DoExternaliseL( RWriteStream& aStream ) const = 0; + +private: + + /** + * Copy constructor. Prohibited by default. + */ + CLbsLocationInfoBase( CLbsLocationInfoBase& ); + + /** + * Overloaded assignment operator. Prohibited by default. + */ + CLbsLocationInfoBase& operator=( CLbsLocationInfoBase& ); + +private: + + /* + * Reserved for future use. + */ + TAny* iReserved; + + }; + +typedef RPointerArray RLbsLocationInfoBaseArray; + +/** + * Abstract base class for data types representing geogrphical area + * information. + * + * Geographical information may be a collection of GSM or WCDMA cells + * or WLAN information. + */ +NONSHARABLE_CLASS(CLbsAreaInfoBase) : public CBase + { + +public: + + /** + * This method is implemented by each of the geographical area type classes + * that extend this class. The method returns the type of geographical area + * being represented. + */ + IMPORT_C virtual TLbsAreaInfoClassType Type(); + + /** + * Destructor + */ + IMPORT_C virtual ~CLbsAreaInfoBase(); + + /** + * Internalizes the geographical area information from a stream. + * + * @param[in] aStream Stream from which the object is internalized. + */ + IMPORT_C void InternaliseL( RReadStream& aStream ); + + /** + * Externalizes the geographical area information to a stream. + * + * @param[in] aStream Stream to which the object is to be + * externalized. + */ + IMPORT_C void ExternaliseL( RWriteStream& aStream ) const; + + /** + * Validates area information. + */ + virtual void ValidateDataL() const = 0; + +protected: + + /** + * C++ default constructor + */ + CLbsAreaInfoBase(); + + /** + * Internalize method that subclass must implement. + * + * @param[in] aStream Stream from which the object is internalized. + */ + virtual void DoInternaliseL( RReadStream& aStream ) = 0; + + /** + * Externalize method that subclass must implement. + * + * @param[in] aStream Stream to which the object is to be + * externalized. + */ + virtual void DoExternaliseL( RWriteStream& aStream ) const = 0; + +private: + + /** + * Copy constructor. Prohibited by default. + */ + CLbsAreaInfoBase( CLbsAreaInfoBase& ); + + /** + * Overloaded assignment operator. Prohibited by default. + */ + CLbsAreaInfoBase& operator=( CLbsAreaInfoBase& ); + +private: + + /** + * Reserved for future use. + */ + TAny* iReserved; + + }; + +#endif // LBS_LOCATION_COMMON_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationgsminfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationgsminfo.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,317 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* cell information in a GSM PLMN. This class may also optionally contain +* neighbouring cell information +* +*/ + + +/** +* @file +* @publishedPartner +* @prototype +*/ + + +#ifndef LBS_GSM_CELL_INFO_H +#define LBS_GSM_CELL_INFO_H + + +#include +#include +#include + + +/** + * This class contains information related to a cell in GSM PLMN. An instance + * of this class may also contain information of one or more neighbouring + * GSM cells + */ +NONSHARABLE_CLASS(CLbsGsmCellInfo) : public CLbsAreaInfoBase + { + +public: + + /** + * Allocates and constructs a new GSM cell info object. In the returned + * instance, the country code, network code, location area code and cell ID + * are marked as undefined. + * + * @return Pointer to the new GSM cell info object. + * @leave Standard symbian error codes, such as KErrNoMemory + */ + IMPORT_C static CLbsGsmCellInfo* NewL(); + + /** + * Allocates and constructs a new GSM cell info object. + * + * @param[in] aCountryCode Network country code. + * @param[in] aNetworkCode Network code. + * @param[in] aLocationAreaCode Location area code. + * @param[in] aCellId Cell ID of a cell in GSM PLMN. + * @return Pointer to the new GSM cell info object. + * @leave standard symbian error codes, such as KErrNoMemory. + */ + IMPORT_C static CLbsGsmCellInfo* NewL( const TInt aCountryCode, + const TInt aNetworkCode, + const TInt aLocationAreaCode, + const TInt aCellId ); + + /** + * Destructor + */ + IMPORT_C ~CLbsGsmCellInfo(); + + /** + * Sets the Mobile Country Code information. + * + * @param[in] aCountryCode Mobile Country Code, range 0..999. + */ + IMPORT_C void SetMobileCountryCode(const TInt aCountryCode); + + /** + * Retrieves the Mobile Country Code information. + * + * @return Mobile Country Code, range 0..999; + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt MobileCountryCode() const; + + /** + * Sets the Mobile Network Code information. + * + * @param[in] aNetworkCode Mobilre Network Code, range 0..999. + */ + IMPORT_C void SetMobileNetworkCode( const TInt aNetworkCode ); + + /** + * Retrieves the Mobile Network Code information. + * + * @return Mobile Network Code, range 0..999. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt MobileNetworkCode() const; + + /** + * Sets the Location Area Code information. + * + * @param[in] aLocationAreaCode Location Area Code, range 0..65535. + */ + IMPORT_C void SetLocationAreaCode( const TInt aLocationAreaCode ); + + /** + * Retrieves the Location Area Code information. + * + * @return Location Area Code, range 0..65535. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt LocationAreaCode() const; + + /** + * Sets the Cell Identity information. + * + * @param[in] aCellId Cell Identity, range 0..65535. + */ + IMPORT_C void SetCellId( const TInt aCellId ); + + /** + * Retrieves the Cell Identity information. + * + * @return Cell Identity, range 0..65535. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt CellId() const; + + /** + * Initializes the signal strength parameter. + * + * @param[in] aRxLev Rx Level, range 0..63. + */ + IMPORT_C void SetRxLevel( const TInt aRxLev ); + + /** + * Retrieves the Rx level. + * + * @return Rx Level, range 0..63. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt RxLevel() const; + + /** + * Sets the Timing Advance information. + * + * @param[in] aTimingAdvance Timing Advance, range 0..255. + */ + IMPORT_C void SetTimingAdvance( const TInt aTimingAdvance ); + + /** + * Retrieves the Timing Advance information. + * + * @return Timing Advance, range 0..255. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt TimingAdvance() const; + + /** + * Adds a neighbouring cell information. + * + * @param[in] An instance of TLbsGsmNeighbourCellInfo class + * (memory ovnership is being transferred) + * @leave KErrArgument if the argument is NULL or one of standard symbian + * error codes + */ + IMPORT_C void AddNeighbouringCellInfoL( + TLbsGsmNeighbourCellInfo* aNeighbourCellInfo ); + + /** + * Retrieves a copy of neighbouring cell information information as an + * array. + * + * @param[in] aNeighbourCellInfo GSM neighbouring cell information + * (memory ownership is not being transferred to this function therefore + * it is the responsibility of the caller to ensure Close() is called to + * free resources) + */ + IMPORT_C void GetNeighbouringCellInfoL( + RLbsGsmNeighbourCellInfoArray& aNeighbourCellInfo ) const; + + /** + * Removes all neighbouring cell information. + */ + IMPORT_C void ResetNeighbouringCellInfo(); + +public: // from CLbsAreaInfoBase + + /** + * Returns the type of area information instance. + * + * @return Area type information + */ + virtual TLbsAreaInfoClassType Type(); + + /** + * Validates GSM cell information. + * This method checks for boundary conditions as well as the mandatory + * attributes. The attributes of this class become mandatory in a + * hierarchical manner. For instance, if location area code is + * specified then the mobile network code attribute is mandatory. If cell + * id is specified then, both LAC and MNC become mandatory attributes and + * so on. However, the mobile country code attribute is always mandatory + * which means client applications must at least specify the MCC attribute + * when specifying GSM cell information. + * This method is used internally to determine the correctness of + * information provided. Optionally, this method, may also be used by + * client applications to validate their input. + * + * @leave KErrArgument If the specified attributes dont meet the boundary + * conditions or the mandatory arguments are not specified. + */ + virtual void ValidateDataL() const; + +protected: // from CLbsAreaInfoBase + + /** + * Internalize method to write GSM cell information to a stream. + */ + virtual void DoInternaliseL( RReadStream& aStream ); + + /** + * Externalize method to read GSM cell information from a stream. + */ + virtual void DoExternaliseL( RWriteStream& aStream ) const; + +private: + + /** + * C++ default constructor + */ + CLbsGsmCellInfo(); + + /** + * Copy constructor. Prohibited by default. + */ + CLbsGsmCellInfo( CLbsGsmCellInfo& ); + + /** + * Overloaded assignment operator. Prohibited by default. + */ + CLbsGsmCellInfo& operator=( CLbsGsmCellInfo& ); + + /** + * Symbian 2 phase constructor + */ + void ConstructL(); + + /** + * Symbian 2 phase constructor + */ + void ConstructL( const TInt aCountryCode, const TInt aNetworkCode, + const TInt aLocationAreaCode, const TInt aCellId ); + +private: // attributes + + enum _TGsmDataValidationMask + { + EGsmDataNull = 0x00, + EGsmMCC = 0x01, + EGsmMNC = 0x02, + EGsmLAC = 0x04, + EGsmCI = 0x08, + EGsmRx = 0x10, + EGsmTA = 0x20 + }; + + /** + * Mobile country code + */ + TInt16 iMCC; + + /** + * Mobile network code + */ + TInt16 iMNC; + + /** + * Location area code + */ + TInt32 iLAC; + + /** + * Cell id + */ + TInt32 iCid; + + /** + * Signal strength + */ + TInt32 iRxLev; + + /** + * Timing advance + */ + TInt16 iTA; + + /** + * Data mask to determine initialized data. Used internally. + */ + TInt8 iDataValidationMask; + + /** + * Neighbouring cell info + */ + RLbsGsmNeighbourCellInfoArray iNeighbourCellInfo; + }; + +#endif //LBS_GSM_CELL_INFO_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationgsmneighbourinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationgsmneighbourinfo.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,136 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* cell information in a GSM PLMN. This class may also optionally contain +* neighbouring cell information +* +*/ + +/** +@file +@publishedPartner +@prototype +*/ + + +#ifndef LBS_GSM_NEIGHB_CELL_INFO_H +#define LBS_GSM_NEIGHB_CELL_INFO_H + +#include +#include + + +/** + * This class contains information related to a GSM neighbouring cell + * information. + */ +NONSHARABLE_CLASS(TLbsGsmNeighbourCellInfo) + { + +public: + + /** + * Allocates and constructs a new neighbour GSM cell info object. In the + * returned instance all data is marked as undefined + * + * @return Pointer to the new neighbour GSM cell info object. + */ + IMPORT_C TLbsGsmNeighbourCellInfo(); + + /** + * Allocates and constructs a new neighbour GSM cell info object. + + * @param[in] aARFCN Absolute Radio Frequency Channel Number + * @param[in] aBSIC Base station identity (colour) code. + * @param[in] aRxLev Rx level. + * + * @return Pointer to the new neighbour GSM cell info object. + */ + IMPORT_C TLbsGsmNeighbourCellInfo( const TInt aARFCN, + const TInt aBSIC, + const TInt aRxLev ); + + /** + *Sets the Absolute Radio Frequency Channel Number. + * + * @param[in] aARFCN Absolute Radio Frequency Channel Number, range 0..1023. + */ + IMPORT_C void SetArfcn(const TInt aARFCN); + + /** + * Retrieves the Absolute Radio Frequency Channel Number. + * + * @return Absolute Radio Frequency Channel Number, range 0..1023. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt Arfcn() const; + + /** + * Sets the Base station identity (colour) code. + * + * @param[in] iBSIC Base station identity code, range 0..63. + */ + IMPORT_C void SetBsic( const TInt aBSIC ); + + /** + * Retrieves the Base station identity code. + * + * @return Base station identity code, range 0..63. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt Bsic() const; + + /** + * Sets the Rx level. + * + * @param[in] aRxLev Rx Level, range 0..63. + */ + IMPORT_C void SetRxLevel( const TInt aRxLev ); + + /** + * Retrieves the Rx level. + * + * @return Rx Level, range 0..63. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt RxLevel() const; + +protected: // attributes + + /** + * Absolute Radio Frequency Channel Number + */ + TInt16 iARFCN; + + /** + * Base station identity code + */ + TInt8 iBSIC; + + /** + * Rx level + */ + TInt8 iRxLev; + + /** + * Reserved + */ + TUint8 iReserved[4]; + + }; + +typedef RArray RLbsGsmNeighbourCellInfoArray; + + +#endif //LBS_GSM_NEIGHB_CELL_INFO_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationinfo.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,204 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Container class representing geographical area information as a +* collection of GSM/WCDMA cell information and WLAN MAC IDs. +* +*/ + + +/** +* @file +* @publishedPartner +* @prototype +*/ + + +#ifndef C_LBSLOCATIONINFO_H +#define C_LBSLOCATIONINFO_H + + +#include +#include +#include +#include +#include +#include + + +/** + * Type definitions + */ + +/** + * Structure used to carry location information to be converted + */ +typedef RPointerArray RLbsAreaInfoBaseArray; + +/** + * This class contains information related to a collection of geographical area + * information. Client applications create an instance of this class to + * represent a geographical area for which a conversion is required. The + * corresponding coordinate values determined by the conversion plugins would + * be updated in the same instance of CLbsLocationInfo. Client applications + * may retrieve the position estimate(s) using GetPositionInfo method. + * + */ +NONSHARABLE_CLASS(CLbsLocationInfo) : public CLbsLocationInfoBase + { + +public: + + typedef TUint32 TAreaInfoMask; + + enum _TAreaInfoMask + { + /** + * Bit mask used to retrieve position information. + */ + ELbsPosInfo = 0x01, + + /** + * Bit mask used to retrieve GSM cell information. + */ + ELbsGsmInfo = 0x02, + + /** + * Bit mask used to retrieve WCDMA cell information. + */ + ELbsWcdmaInfo = 0x04, + + /** + * Bit mask used to retrieve WLAN AP information. + */ + ELbsWlanInfo = 0x08, + + /** + * Bit mask used to retrieve all area information. + */ + ELbsAreaInfoAll = 0xFFFFFFFF + }; + + /** + * Allocates and constructs a new location info object. + * + * @return Pointer to the new area info object. + * @leave Standard symbian error codes, such as KErrNoMemory + */ + IMPORT_C static CLbsLocationInfo* NewL(); + + /** + * Allocates and constructs a new location info object. This method will + * push the resultant object onto the cleanup stack. + * + * @return Pointer to the new area info object. + * @leave Standard symbian error codes, such as KErrNoMemory + */ + IMPORT_C static CLbsLocationInfo* NewLC(); + + /** + * Destructor + */ + IMPORT_C ~CLbsLocationInfo(); + + /** + * Appends the specified area info entry to the data structure. This + * method takes a pointer to CLbsAreaInfoBase type instances. + * + * @param[in] aAreaInfo Pointer to a CLbsAreaInfoBase type instance. + * @leave KErrArgument if the pointer to CLbsAreaInfoBase type is NULL + */ + IMPORT_C void AddAreaInfoL( CLbsAreaInfoBase* aAreaInfo ); + + /** + * Retrieves the area information that is stored in the internal + * data structure. Client applications can specify the type of information + * to be retrieved using the TAreaInfoMask. The result is updated in + * the instance of RLbsAreaInfoBaseArray. If there is no information stored + * for the requested type the instance of RLbsAreaInfoBaseArray will not be + * updated. Client applications would need to check the contents of the + * array to determine the information retrieved. + * + * @param[out] aAreaInfoArray Array that is filled with pointers to the + * area information retrieved. Note it is the callers responsibility to call + * Close() to free the pointers. However ownership of the objects pointed to + * is not transferred to the caller. + * @param[in] aLocInfoMask Specifies the type of information to be + * retrieved. + */ + IMPORT_C void GetAreaInfoL( RLbsAreaInfoBaseArray& aAreaInfoArray, + TAreaInfoMask aAreaInfoMask = ELbsAreaInfoAll ); + + /** + * Removes all entries of the specified type from the data structure. If + * the mask is not specified all entries would be removed. If there are no + * entries found for a specific type, no changes will be done. + * + * @param[in] aLocInfoMask Specifies the type of information to be + * removed. + */ + IMPORT_C void ResetAreaInfo( TAreaInfoMask aAreaInfoMask + = ELbsAreaInfoAll ); + +protected: // from CLbsLocationInfoBase + + /** + * Type of location info class + */ + virtual TLbsLocationInfoClassType Type(); + + /** + * Internalize method to write location information to a stream. + */ + virtual void DoInternaliseL( RReadStream& aStream ); + + /** + * Externalize method to read location information from a stream. + */ + virtual void DoExternaliseL( RWriteStream& aStream ) const; + +private: + + /** + * C++ default constructor + */ + CLbsLocationInfo(); + + /** + * Copy constructor. Prohibited by default. + */ + CLbsLocationInfo( CLbsLocationInfo& ); + + /** + * Overloaded assignment operator. Prohibited by default. + */ + CLbsLocationInfo& operator = ( CLbsLocationInfo& ); + + /** + * Symbian 2 phase constructor + */ + void ConstructL(); + +private: + + /** + * A collection of geographical area information. + */ + RPointerArray iAreaInfoArray; + + }; + +typedef RPointerArray RLbsLocationInfoArray; + + +#endif //C_LBSLOCATIONINFO_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationposinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationposinfo.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,165 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* latitude,longitude,altitude,horizontal accuracy and vertical accuracy. +* +*/ + +/** +* @file +* @publishedPartner +* @prototype +*/ + + +#ifndef LBS_COORDINATE_INFO_H +#define LBS_COORDINATE_INFO_H + + +#include +#include +#include + + +/** + * This class contains the basic coordinates of a location (latitude, longitude + * and altitude) along with vertical and horizontal accuracies. This class + * is different from TPositionInfo class defined in LBS and cannot be used + * interchangeably. @see TPositionInfo class for more details. + */ +NONSHARABLE_CLASS(CLbsPositionInfo) : public CLbsAreaInfoBase + { + +public: + + /** + * Allocates and constructs a new coordinate info object. In the returned + * instance, the longitude, latitude, altitude, horizontal accuracy and + * vertical accuracy are set to NaN. + * + * @return Pointer to the new coordinate info object. + * @leave Standard symbian error codes, such as KErrNoMemory + */ + IMPORT_C static CLbsPositionInfo* NewL(); + + /** + * Allocates and constructs a new coordinate info object. + * + * @param[in] aLocality Instance of TLocality class that contains + * coordinates along with the error estimates for the horizontal and + * vertical accuracy of the point. + */ + IMPORT_C static CLbsPositionInfo* NewL( const TLocality& aLocality ); + + /** + * Destructor + */ + IMPORT_C virtual ~CLbsPositionInfo(); + + /** + * Initializes the locality information. This includes + * latitude - should be between and including -90 and 90 degrees. + * longitude - should be between and including -180 and 180 degrees. + * altitude - Altitude information in meters. + * datum - datum information. Defaults to the constant for the + * coordinate system for a specific positioning system. + * horizontal accuracy - horizontal accuracy in meters. + * vertical accuracy - vertical accuracy in meters. + * + * @param[in] aLatitude Latitude information. + */ + IMPORT_C void SetLocality( const TLocality& aLocality ); + + /** + * Retrieves the Locality information. + * + * @return NaN if nothing specified or latitude information. + * network. + */ + IMPORT_C void GetLocality( TLocality& aLocality ) const; + +public: // from CLbsAreaInfoBase + + /** + * Returns the type of area information instance. + * + * @return Area type information + */ + virtual TLbsAreaInfoClassType Type(); + + /** + * Validates position information. + * This method checks for boundary conditions as well as the mandatory + * attributes. The latitude, longitude and horizontal accuracy attributes + * are mandatory and must be specified in the TLocality instance being + * passed as an argument to instantiate/initialize an instance of this + * class. + * This method is used internally to determine the correctness of + * information provided. Optionally, this method, may also be used by + * client applications to validate their input. + * + * @leave KErrArgument If the specified attributes dont meet the boundary + * conditions or the mandatory arguments are not specified. + */ + virtual void ValidateDataL() const; + +protected: // from CLbsAreaInfoBase + + /** + * Internalize method to write GSM cell information to a stream. + */ + virtual void DoInternaliseL( RReadStream& aStream ); + + /** + * Externalize method to read GSM cell information from a stream. + */ + virtual void DoExternaliseL( RWriteStream& aStream ) const; + +private: + + /** + * C++ default constructor + */ + CLbsPositionInfo(); + + /** + * Copy constructor. Prohibited by default. + */ + CLbsPositionInfo( CLbsPositionInfo& ); + + /** + * Overloaded assignment operator. Prohibited by default. + */ + CLbsPositionInfo& operator=( CLbsPositionInfo& ); + + /** + * Symbian 2 phase constructor + */ + void ConstructL(); + + /** + * Symbian 2 phase constuctor + */ + void ConstructL( const TLocality& aLocality ); + +private: // attributes + + /** + * Locality information + */ + TLocality iLocality; + + }; + +#endif //LBS_COORDINATE_INFO_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationwcdmainfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationwcdmainfo.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,273 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* cell information in a WCDMA PLMN. This class may also optionally contain +* neighbouring cell information +* +*/ + +/** +* @file +* @publishedPartner +* @prototype +*/ + + +#ifndef C_LBSWCDMACELLINFO_H +#define C_LBSWCDMACELLINFO_H + + +#include +#include +#include + + +/** + * This class contains information related to a cell in WCDMA PLMN. An instance + * of this class may also contain information of one or more neighbouring + * WCDMA cells + */ +NONSHARABLE_CLASS(CLbsWcdmaCellInfo) : public CLbsAreaInfoBase + { + +public: + + /** + * Allocates and constructs a new WCDMA cell info object. In the returned + * instance, the country code, network code and cell ID are set to zero. + * + * @return Pointer to the new WCDMA cell info object. + * @leave Standard symbian error codes, such as KErrNoMemory + */ + IMPORT_C static CLbsWcdmaCellInfo* NewL(); + + /** + * Allocates and constructs a new WCDMA cell info object. + * + * @param[in] aCountryCode Network country code. + * @param[in] aNetworkCode Network code. + * @param[in] aUniqueCellId Cell ID of a cell in WCDMA PLMN. + * @return Pointer to the new WCDMA cell info object. + * @leave KErrArgument in case of invalid input or other standard symbian + * error codes, such as KErrNoMemory. + */ + IMPORT_C static CLbsWcdmaCellInfo* NewL( const TInt aCountryCode, + const TInt aNetworkCode, + const TInt aUniqueCellId ); + + /** + * Destructor + */ + IMPORT_C ~CLbsWcdmaCellInfo(); + + /** + * Initializes the country code attribute. + * + * @param[in] aCountryCode Network country code, range 0..999 + */ + IMPORT_C void SetMobileCountryCode( const TInt aCountryCode); + + /** + * Retrieves the country code information. + + * @return Network country code, range 0..999 + KErrNotFound if the value is undefined. + */ + IMPORT_C TInt MobileCountryCode() const; + + /** + * Initializes the network code attribute. + * + * @param[in] aNetworkCode Network code, range 0..999 + */ + IMPORT_C void SetMobileNetworkCode( const TInt aNetworkCode ); + + /** + * Retrieves the network code information. + * + * @return Network code, range 0..999 + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt MobileNetworkCode() const; + + /** + * Sets the Cell Identity. + * + * @param[in] aUniqueCellId Cell Identity, range 0..268435455. + */ + IMPORT_C void SetUniqueCellId( const TInt aUniqueCellId ); + + /** + * Retrieves the Cell Identity. + * + * @return Cell Identity, range 0..268435455. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt UniqueCellId() const; + + /** + * Sets the scrambling code + * + * @param[in] aScramblingCode scrambling code , range 0..511. + */ + IMPORT_C void SetScramblingCode( const TInt aScramblingCode ); + + /** + * Retrieves the scrambling code . + * + * @return Base scrambling code, range 0..511. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt ScramblingCode() const; + + /** + * Adds a neighbouring cell information. + * + * @param[in] An instance of TLbsWcdmaNeighbourCellInfo class + * (memory ovnership is being transferred) + * @leave KErrArgument if the argument is NULL or one of standard symbian + * error codes + */ + IMPORT_C void AddNeighbouringCellInfoL( + TLbsWcdmaNeighbourCellInfo* aNeighbourCellInfo ); + + /** + * Retrieves a copy of neighbouring cell information information as an + * array. + * + * @param[in] aNeighbourCellInfo WCDMA neighbouring cell information + * (memory ownership is not being transferred to this function therefore + * it is the responsibility of the caller to ensure Close() is called to + * free resources) + */ + IMPORT_C void GetNeighbouringCellInfoL( + RLbsWcdmaNeighbourCellInfoArray& aNeighbourCellInfo ) const; + + /** + * Removes all neighbouring cell information. + */ + IMPORT_C void ResetNeighbouringCellInfo(); + +public: // from CLbsAreaInfoBase + + /** + * Returns the type of area information instance. + * + * @return Area type information + */ + virtual TLbsAreaInfoClassType Type(); + + /** + * Validates WCDMA information. + * This method checks for boundary conditions as well as the mandatory + * attributes. The attributes of this class become mandatory in a + * hierarchical manner. For instance, if scrambling code is specified then, + * all other attributes except the neighbouring cell information become + * mandatory. However, the mobile country code attribute is always + * mandatory which means client applications must at least specify the MCC + * attribute when specifying WCDMA cell information. + * This method is used internally to determine the correctness of + * information provided. Optionally, this method, may also be used by + * client applications to validate their input. + * + * @leave KErrArgument If the specified attributes dont meet the boundary + * conditions or the mandatory arguments are not specified. + */ + virtual void ValidateDataL() const; + +protected: // from CLbsAreaInfoBase + + /** + * Internalize method to write WCDMA cell information to a stream. + */ + virtual void DoInternaliseL( RReadStream& aStream ); + + /** + * Externalize method to read WCDMA cell information from a stream. + */ + virtual void DoExternaliseL( RWriteStream& aStream ) const; + +private: + + /** + * C++ default constructor + */ + CLbsWcdmaCellInfo(); + + /** + * Copy constructor. Prohibited by default. + */ + CLbsWcdmaCellInfo( CLbsWcdmaCellInfo& ); + + /** + * Overloaded assignment operator. Prohibited by default. + */ + CLbsWcdmaCellInfo& operator=( CLbsWcdmaCellInfo& ); + + /** + * Symbian 2 phase constructor + */ + void ConstructL(); + + /** + * Symbian 2 phase constructor + */ + void ConstructL( const TInt aCountryCode, + const TInt aNetworkCode, + const TInt aUniqueCellId ); + +private: // data + + enum _TWcdmaDataValidationMask + { + EWcdmaDataNull = 0x00, + EWcdmaMCC = 0x01, + EWcdmaMNC = 0x02, + EWcdmaUCid = 0x04, + EWcdmaSC = 0x08, + }; + + /** + * Mobile country code + */ + TInt16 iMCC; + + /** + * Mobile network code + */ + TInt16 iMNC; + + /** + * Unique cell identifier + */ + TInt32 iUCid; + + /** + * Scrambling code + */ + TInt16 iSCode; + + /** + * Data mask to determine initialized data. Used internally. + */ + TInt8 iDataValidationMask; + + /** + * Neighbouring cell info + */ + RLbsWcdmaNeighbourCellInfoArray iNeighbourCellInfo; + + }; + +#endif // C_POSWCDMACELLINFO_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationwcdmaneighbourinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationwcdmaneighbourinfo.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,158 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* cell information in a Wcdma PLMN. This class may also optionally contain +* neighbouring cell information +* +*/ + +/** +* @file +* @publishedPartner +* @prototype +*/ + + +#ifndef LBS_WCDMA_NEIGHB_CELL_INFO_H +#define LBS_WCDMA_NEIGHB_CELL_INFO_H + + +#include +#include + + +/** + * This class contains information related to a Wcdma neighbouring cell information + */ +NONSHARABLE_CLASS(TLbsWcdmaNeighbourCellInfo) + { + +public: + + /** + * Allocates and constructs a new neighbour Wcdma cell info object. In the returned + * instance all data is marked as undefined + * + * @return Pointer to the new neighbour Wcdma cell info object. + */ + IMPORT_C TLbsWcdmaNeighbourCellInfo(); + + /** + * Allocates and constructs a new neighbour Wcdma cell info object. + * + * @param[in] aUCid Cell Identity + * @param[in] aSCode Scrambling Code + * @param[in] aPathloss Pathloss + * @param[in] Received Signal Strength Indicator + * + * @return Pointer to the new neighbour Wcdma cell info object. + */ + IMPORT_C TLbsWcdmaNeighbourCellInfo(const TInt aUCid, + const TInt aSCode, + const TInt aPathloss, + const TInt aRssi ); + + /** + * Sets the Cell Identity. + * + * @param[in] aUniqueCellId Cell Identity, range 0..268435455. + */ + IMPORT_C void SetUniqueCellId( const TInt aUniqueCellId ); + + /** + * Retrieves the Cell Identity. + * + * @return Cell Identity, range 0..268435455. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt UniqueCellId() const; + + /** + * Sets the scrambling code + * + * @param[in] aScramblingCode scrambling code , range 0..511. + */ + IMPORT_C void SetScramblingCode( const TInt aScramblingCode ); + + /** + * Retrieves the scrambling code . + * + * @return Base scrambling code, range 0..511. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt ScramblingCode() const; + + /** + * Sets the Pathloss parameter + * + * @param[in] aPathloss Pathloss, range 46..173. + */ + IMPORT_C void SetPathloss( const TInt aPathloss ); + + /** + * Retrieves the pathloss information. + * + * @return pathloss, range 46..173. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt Pathloss() const; + + /** + * Sets the RSSI parameter + * + * @param[in] aRssi Received Signal Strength Indicator, range 0..127. + */ + IMPORT_C void SetSignalStrength( const TInt aRssi ); + + /** + * Retrieves the RSSI information. + * + * @return RSSI, range 0..127. + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt SignalStrength() const; + +protected: // attributes + + /** + * Cell Identity + */ + TInt32 iUniqueCellId; + + /** + * Scrambling Code + */ + TInt16 iScramblingCode; + + /** + * Path loss + */ + TInt16 iPathloss; + + /** + * RSSI + */ + TInt16 iRssi; + + /** + * Reserved + */ + TUint8 iReserved[8]; + + }; + +typedef RArray RLbsWcdmaNeighbourCellInfoArray; + + +#endif //LBS_WCDMA_NEIGHB_CELL_INFO_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationwlaninfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/inc/lbslocationwlaninfo.h Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,195 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* WLAN MAC ID. +* +*/ + +/** +* @file +* @publishedPartner +* @prototype +*/ + + +#ifndef LBSWLANINFO_H +#define LBSWLANINFO_H + + +#include +#include + + +/** + * Length of a WLAN MAC address. + */ +const TInt KLbsWlanMacAddressLength = 18; + + +/** + * WLAN MAC address consists of six hex numbers and is typically represented as + * a string with 6, colon separated hexadecimal numbers. (e.g. 11:22:33:44:55:66) + * + * In order so save memory the LBS subsystem does not use a string. A 6 byte long + * buffer is used instead. + * + * The leftmost number of the MAC address ("11" in the example) is stored in the first + * byte of the buffer. The rightmost number of the MAC address ("66" in the example) + * is stored in the last byte of the buffer. + */ +typedef TBuf8 TLbsWlanMacAddress; + + +/** + * This class contains information related to a WLAN radio map object. + */ +NONSHARABLE_CLASS(CLbsWlanInfo) : public CLbsAreaInfoBase + { + +public: + + /** + * Allocates and constructs a new WLAN info object. In the returned + * instance, the MAC ID and signal strength values are set to zero. + * + * @return Pointer to the new WLAN info object. + * @leave Standard symbian error codes, such as KErrNoMemory + */ + IMPORT_C static CLbsWlanInfo* NewL(); + + /** + * Allocates and constructs a new WLAN info object. + * + * The validation for the arguments is hierarchical. For instance, if + * signal strength is given, then specifying MAC ID is mandatory. + * + * @param[in] aMacAddress MAC address of the WLAN AP. + * @param[in] aRxStrength AP signal strength received at the SET. + + * @return Pointer to the new WLAN info object. + * @leave KErrArgument in case of invalid input or other standard symbian + * error codes, such as KErrNoMemory. + */ + IMPORT_C static CLbsWlanInfo* NewL( const TLbsWlanMacAddress& MacAddress, + const TInt aRxStrength ); + + /** + * Destructor + */ + IMPORT_C ~CLbsWlanInfo(); + + /** + * Initializes the MAC ID attribute. + * + * @param[in] aMacAddress MAC address of the WLAN AP + */ + IMPORT_C void SetMacAddress( const TDesC8& aMacAddress ); + + /** + * Retrieves the MAC ID information. + */ + IMPORT_C void GetMacAddress(TDes8& aMacAddress ) const; + + /** + * Initializes the AP signal strength received at the SET. + * + * @param[in] aRxStrength AP signal strength received at the SET, range 0..255 + */ + IMPORT_C void SetSignalStrength( const TInt aRxStrength ); + + /** + * Retrieves the AP signal strength received at the SET. + * + * @return AP signal strength received at the SET, range 0..255 + * KErrNotFound if the value is undefined. + */ + IMPORT_C TInt SignalStrength() const; + +public: // from CLbsAreaInfoBase + + /** + * Returns the type of area information instance. + * + * @return Area type information + */ + virtual TLbsAreaInfoClassType Type(); + + /** + * Validates WLAN information. + * This method checks for boundary conditions as well as the mandatory + * attributes. All attributes of this class are mandatory. + * This method is used internally to determine the correctness of + * information provided. Optionally, this method, may also be used by + * client applications to validate their input. + * + * @leave KErrArgument If the specified attributes dont meet the boundary + * conditions or the mandatory arguments are not specified. + */ + virtual void ValidateDataL() const; + +protected: // from CLbsAreaInfoBase + + /** + * Internalize method to write WLAN information to a stream. + */ + virtual void DoInternaliseL( RReadStream& aStream ); + + /** + * Externalize method to read WLAN information from a stream. + */ + virtual void DoExternaliseL( RWriteStream& aStream ) const; + +private: + + /** + * C++ default constructor + */ + CLbsWlanInfo(); + + /** + * Copy constructor. Prohibited by default. + */ + CLbsWlanInfo( CLbsWlanInfo& ); + + /** + * Overloaded assignment operator. Prohibited by default. + */ + CLbsWlanInfo& operator=( CLbsWlanInfo& ); + + /** + * Symbian 2 phase constructor + */ + void ConstructL(); + + /** + * Symbian 2 phase constructor + */ + void ConstructL( const TLbsWlanMacAddress& MacAddress, + const TInt aPowRx ); + +private: // data + + /** + * MAC code + */ + TLbsWlanMacAddress iMacAddress; + + /** + * Received signal strength + */ + TInt16 iPowRx; + + }; + +#endif // LBSWLANINFO_H diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationcommon.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationcommon.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,119 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Base class for all the class representing +* location informations. +* +*/ + + +#include +#include +#include + + +// --------------------------------------------------------------------------- +// CLbsLocationInfoBase::Type() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TLbsLocationInfoClassType CLbsLocationInfoBase::Type() + { + return ELbsAreaInfoUnknownClass; + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfoBase::~CLbsLocationInfoBase() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsLocationInfoBase::~CLbsLocationInfoBase() + { + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfoBase::InternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsLocationInfoBase::InternaliseL( RReadStream& aStream ) + { + DoInternaliseL( aStream ); + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfoBase::ExternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsLocationInfoBase::ExternaliseL( RWriteStream& aStream ) const + { + DoExternaliseL( aStream ); + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfoBase::CLbsLocationInfoBase() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +CLbsLocationInfoBase::CLbsLocationInfoBase() + { + } + +// --------------------------------------------------------------------------- +// CLbsAreaInfoBase::Type() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TLbsAreaInfoClassType CLbsAreaInfoBase::Type() + { + return ELbsAreaInfoUnknownClass; + } + +// --------------------------------------------------------------------------- +// CLbsAreaInfoBase::~CLbsAreaInfoBase() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsAreaInfoBase::~CLbsAreaInfoBase() + { + } + +// --------------------------------------------------------------------------- +// CLbsAreaInfoBase::~CLbsAreaInfoBase() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +CLbsAreaInfoBase::CLbsAreaInfoBase() + { + } + +// --------------------------------------------------------------------------- +// CLbsAreaInfoBase::InternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsAreaInfoBase::InternaliseL( RReadStream& aStream ) + { + DoInternaliseL( aStream ); + } + +// --------------------------------------------------------------------------- +// CLbsAreaInfoBase::ExternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsAreaInfoBase::ExternaliseL( RWriteStream& aStream ) const + { + DoExternaliseL( aStream ); + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationgsminfo.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationgsminfo.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,389 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* cell information in a GSM PLMN. This class may also optionally contain +* neighbouring cell information +* +*/ + + +#include +#include + + +// --------------------------------------------------------------------------- +// CPosGsmCellInfo::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsGsmCellInfo* CLbsGsmCellInfo::NewL() + { + CLbsGsmCellInfo* self = new( ELeave ) CLbsGsmCellInfo; + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsGsmCellInfo* CLbsGsmCellInfo::NewL( const TInt aCountryCode, + const TInt aNetworkCode, + const TInt aLocationAreaCode, + const TInt aCellId ) + { + CLbsGsmCellInfo* self = new( ELeave ) CLbsGsmCellInfo; + CleanupStack::PushL( self ); + self->ConstructL( aCountryCode, aNetworkCode, aLocationAreaCode, aCellId ); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::~CLbsGsmCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsGsmCellInfo::~CLbsGsmCellInfo() + { + ResetNeighbouringCellInfo(); + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::SetMobileCountryCodeL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsGsmCellInfo::SetMobileCountryCode( const TInt aCountryCode ) + { + iMCC = aCountryCode; + iDataValidationMask |= EGsmMCC; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::MobileCountryCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsGsmCellInfo::MobileCountryCode() const + { + return iMCC; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::SetMobileNetworkCodeL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsGsmCellInfo::SetMobileNetworkCode( const TInt aNetworkCode ) + { + iMNC = aNetworkCode; + iDataValidationMask |= EGsmMNC; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::MobileNetworkCodeL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsGsmCellInfo::MobileNetworkCode() const + { + return iMNC; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::SetLocationAreaCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsGsmCellInfo::SetLocationAreaCode( const TInt aLocationAreaCode ) + { + iLAC = aLocationAreaCode; + iDataValidationMask |= EGsmLAC; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::LocationAreaCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsGsmCellInfo::LocationAreaCode() const + { + return iLAC; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::SetCellId() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsGsmCellInfo::SetCellId( const TInt aCellId ) + { + iCid = aCellId; + iDataValidationMask |= EGsmCI; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::CellId() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsGsmCellInfo::CellId() const + { + return iCid; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::SetSetRxLevel() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsGsmCellInfo::SetRxLevel( const TInt aRxLev ) + { + iRxLev = aRxLev; + iDataValidationMask |= EGsmRx; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::RxLevel() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsGsmCellInfo::RxLevel() const + { + return iRxLev; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::SetTimingAdvance() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsGsmCellInfo::SetTimingAdvance( const TInt aTimingAdvance ) + { + iTA = aTimingAdvance; + iDataValidationMask |= EGsmTA; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::TimingAdvance() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsGsmCellInfo::TimingAdvance() const + { + return iTA; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::SetNeighbouringCellInfoList() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsGsmCellInfo::AddNeighbouringCellInfoL( + TLbsGsmNeighbourCellInfo* + aNeighbourCellInfo ) + { + if( !aNeighbourCellInfo ) + { + User::Leave( KErrArgument ); + } + + TLbsGsmNeighbourCellInfo neighbourCellInfo; + neighbourCellInfo.SetArfcn( aNeighbourCellInfo->Arfcn() ); + neighbourCellInfo.SetBsic( aNeighbourCellInfo->Bsic() ); + neighbourCellInfo.SetRxLevel( aNeighbourCellInfo->RxLevel() ); + + iNeighbourCellInfo.Append( neighbourCellInfo ); + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::GetNeighbouringCellInfoL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsGsmCellInfo::GetNeighbouringCellInfoL( + RLbsGsmNeighbourCellInfoArray& + aNeighbourCellInfo ) const + { + for( TInt i = 0; i < iNeighbourCellInfo.Count(); i++ ) + { + aNeighbourCellInfo.AppendL( iNeighbourCellInfo[i] ); + } + } + + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::ResetNeighbouringCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsGsmCellInfo::ResetNeighbouringCellInfo() + { + iNeighbourCellInfo.Reset(); + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::Type() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +TLbsAreaInfoClassType CLbsGsmCellInfo::Type() + { + return ELbsAreaGsmCellInfoClass; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::DoInternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsGsmCellInfo::DoInternaliseL( RReadStream& aStream ) + { + iMCC = aStream.ReadInt16L(); + iMNC = aStream.ReadInt16L(); + iLAC = aStream.ReadInt32L(); + iCid = aStream.ReadInt32L(); + iRxLev = aStream.ReadInt8L(); + iTA = aStream.ReadInt16L(); + TInt count = aStream.ReadInt8L(); + for( TInt i = 0;i < count;i++ ) + { + TLbsGsmNeighbourCellInfo cellInfo; + cellInfo.SetArfcn( aStream.ReadInt16L() ); + cellInfo.SetBsic( aStream.ReadInt8L() ); + cellInfo.SetRxLevel( aStream.ReadInt8L() ); + iNeighbourCellInfo.AppendL( cellInfo ); + } + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::DoExternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsGsmCellInfo::DoExternaliseL( RWriteStream& aStream ) const + { + aStream.WriteInt16L( iMCC ); + aStream.WriteInt16L( iMNC ); + aStream.WriteInt32L( iLAC ); + aStream.WriteInt32L( iCid ); + aStream.WriteInt8L( iRxLev ); + aStream.WriteInt16L( iTA ); + TInt count = iNeighbourCellInfo.Count(); + aStream.WriteInt8L( count ); + for( TInt i = 0;i < count;i++ ) + { + aStream.WriteInt16L( iNeighbourCellInfo[i].Arfcn() ); + aStream.WriteInt8L( iNeighbourCellInfo[i].Bsic() ); + aStream.WriteInt8L( iNeighbourCellInfo[i].RxLevel() ); + } + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::ValidateAreaInfoL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsGsmCellInfo::ValidateDataL() const + { + // The following condition is to check the hierarchy of data values specified + if( ( iMCC < 0 || iMCC > 999 ) || ( iMNC < 0 && iLAC > -1 ) || + ( iLAC < 0 && iCid > -1 ) || ( iCid < 0 && iTA > -1 ) || + ( iCid < 0 && iRxLev > -1 ) || + ( iCid < 0 && iNeighbourCellInfo.Count() ) ) + User::Leave( KErrArgument ); + + // Check for range values if they are set specifically by clients + if( iDataValidationMask & EGsmMNC ) + { + if( iMNC < 0 || iMNC > 999 ) + User::Leave( KErrArgument ); + } + if( iDataValidationMask & EGsmLAC ) + { + if( iLAC < 0 || iLAC > 65535 ) + User::Leave( KErrArgument ); + } + if( iDataValidationMask & EGsmCI ) + { + if( iCid < 0 || iCid > 65535 ) + User::Leave( KErrArgument ); + } + if( iDataValidationMask & EGsmRx ) + { + if( iRxLev < 0 || iRxLev > 63 ) + User::Leave( KErrArgument ); + } + if( iDataValidationMask & EGsmTA ) + { + if( iTA < 0 || iTA > 255 ) + User::Leave( KErrArgument ); + } + + // Check neighbouring cell information + for( TInt i = 0; i < iNeighbourCellInfo.Count(); i++ ) + { + if( iNeighbourCellInfo[i].Arfcn() < 0 || iNeighbourCellInfo[i].Arfcn() > 1023 || + iNeighbourCellInfo[i].Bsic() < 0 || iNeighbourCellInfo[i].Bsic() > 63 || + iNeighbourCellInfo[i].RxLevel() < 0 || iNeighbourCellInfo[i].RxLevel() > 63 ) + { + User::Leave( KErrArgument ); + } + } + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::CLbsGsmCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +CLbsGsmCellInfo::CLbsGsmCellInfo() + { + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::CLbsGsmCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsGsmCellInfo::ConstructL() + { + iMCC = -1; + iMNC = -1; + iLAC = -1; + iCid = -1; + iRxLev = -1; + iTA = -1; + iDataValidationMask = EGsmDataNull; + } + +// --------------------------------------------------------------------------- +// CLbsGsmCellInfo::CLbsGsmCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsGsmCellInfo::ConstructL( const TInt aCountryCode, const TInt aNetworkCode, + const TInt aLocationAreaCode, const TInt aCellId ) + { + SetMobileCountryCode( aCountryCode ); + SetMobileNetworkCode( aNetworkCode ); + SetLocationAreaCode( aLocationAreaCode ); + SetCellId( aCellId ); + iRxLev = -1; + iTA = -1; + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationgsmneighbourinfo.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationgsmneighbourinfo.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,107 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a neighbouring cell +* information in a GSM PLMN. +* +*/ + + +#include + + +// --------------------------------------------------------------------------- +// TLbsGsmNeighbourCellInfo::TLbsGsmNeighbourCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TLbsGsmNeighbourCellInfo::TLbsGsmNeighbourCellInfo() + { + iARFCN = -1; + iBSIC = -1; + iRxLev = -1; + } + +// --------------------------------------------------------------------------- +// TLbsGsmNeighbourCellInfo::TLbsGsmNeighbourCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TLbsGsmNeighbourCellInfo::TLbsGsmNeighbourCellInfo( const TInt aARFCN, + const TInt aBSIC, + const TInt aRxLev ) + { + iARFCN = aARFCN; + iBSIC = aBSIC; + iRxLev = aRxLev; + } + +// --------------------------------------------------------------------------- +// TLbsGsmNeighbourCellInfo::SetArfcn() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void TLbsGsmNeighbourCellInfo::SetArfcn( const TInt aARFCN ) + { + iARFCN = aARFCN; + } + +// --------------------------------------------------------------------------- +// TLbsGsmNeighbourCellInfo::TLbsGsmNeighbourCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt TLbsGsmNeighbourCellInfo::Arfcn() const + { + return iARFCN; + } + +// --------------------------------------------------------------------------- +// TLbsGsmNeighbourCellInfo::SetBsic() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void TLbsGsmNeighbourCellInfo::SetBsic( const TInt aBSIC ) + { + iBSIC = aBSIC; + } + +// --------------------------------------------------------------------------- +// TLbsGsmNeighbourCellInfo::Bsic() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt TLbsGsmNeighbourCellInfo::Bsic() const + { + return iBSIC; + } + +// --------------------------------------------------------------------------- +// TLbsGsmNeighbourCellInfo::SetRxLevel() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void TLbsGsmNeighbourCellInfo::SetRxLevel( const TInt aRxLev ) + { + iRxLev = aRxLev; + } + +// --------------------------------------------------------------------------- +// TLbsGsmNeighbourCellInfo::RxLevel() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt TLbsGsmNeighbourCellInfo::RxLevel() const + { + return iRxLev; + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationinfo.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationinfo.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,264 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Container class representing geographical area information as a +* collection of GSM/WCDMA cell information and WLAN MAC IDs. +* +*/ + + +#include +#include +#include + + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsLocationInfo* CLbsLocationInfo::NewL() + { + CLbsLocationInfo* self = new( ELeave ) CLbsLocationInfo; + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::NewLC() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsLocationInfo* CLbsLocationInfo::NewLC() + { + CLbsLocationInfo* self = new( ELeave ) CLbsLocationInfo; + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::~CLbsLocationInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsLocationInfo::~CLbsLocationInfo() + { + iAreaInfoArray.ResetAndDestroy(); + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::AddAreaInfoL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsLocationInfo::AddAreaInfoL( CLbsAreaInfoBase* + aAreaInfo ) + { + if( !aAreaInfo ) + { + User::Leave( KErrArgument ); + } + iAreaInfoArray.AppendL( aAreaInfo ); + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::GetAreaInfoL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsLocationInfo::GetAreaInfoL( RLbsAreaInfoBaseArray& aAreaInfoArray, + TAreaInfoMask aAreaInfoMask ) + { + for( TInt i = 0; i < iAreaInfoArray.Count(); i++ ) + { + switch( iAreaInfoArray[i]->Type() ) + { + case ELbsAreaPositionInfoClass: + if( aAreaInfoMask & ELbsPosInfo ) + { + aAreaInfoArray.AppendL( iAreaInfoArray[i] ); + } + break; + + case ELbsAreaGsmCellInfoClass: + if( aAreaInfoMask & ELbsGsmInfo ) + { + aAreaInfoArray.AppendL( iAreaInfoArray[i] ); + } + break; + + case ELbsAreaWcmdaCellInfoClass: + if( aAreaInfoMask & ELbsWcdmaInfo ) + { + aAreaInfoArray.AppendL( iAreaInfoArray[i] ); + } + break; + + case ELbsAreaWlanInfoClass: + if( aAreaInfoMask & ELbsWlanInfo ) + { + aAreaInfoArray.AppendL( iAreaInfoArray[i] ); + } + break; + + default: + break; + } + } + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::ResetAreaInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsLocationInfo::ResetAreaInfo( TAreaInfoMask aAreaInfoMask ) + { + // If the mask reflects reset all,then reset and destroy is called on + // areaInfoArray directly + if( aAreaInfoMask == ELbsAreaInfoAll ) + { + iAreaInfoArray.ResetAndDestroy(); + return; + } + + for( TInt i = 0; i < iAreaInfoArray.Count(); i++ ) + { + switch( iAreaInfoArray[i]->Type() ) + { + case ELbsAreaPositionInfoClass: + if( aAreaInfoMask & ELbsPosInfo ) + { + CLbsAreaInfoBase* areaInfo = iAreaInfoArray[i]; + iAreaInfoArray.Remove( i ); + delete areaInfo; + } + break; + + case ELbsAreaGsmCellInfoClass: + if( aAreaInfoMask & ELbsGsmInfo ) + { + CLbsAreaInfoBase* areaInfo = iAreaInfoArray[i]; + iAreaInfoArray.Remove( i ); + delete areaInfo; + } + break; + + case ELbsAreaWcmdaCellInfoClass: + if( aAreaInfoMask & ELbsWcdmaInfo ) + { + CLbsAreaInfoBase* areaInfo = iAreaInfoArray[i]; + iAreaInfoArray.Remove( i ); + delete areaInfo; + } + break; + + case ELbsAreaWlanInfoClass: + if( aAreaInfoMask & ELbsWlanInfo ) + { + CLbsAreaInfoBase* areaInfo = iAreaInfoArray[i]; + iAreaInfoArray.Remove( i ); + delete areaInfo; + } + break; + + default: + break; + } + } + } + + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::Type() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TLbsLocationInfoClassType CLbsLocationInfo::Type() + { + return ELbsLocationInfoClass; + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::DoInternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsLocationInfo::DoInternaliseL( RReadStream& aStream ) + { + TInt count = aStream.ReadInt8L(); + for( TInt i = 0; i < count; i++ ) + { + TLbsAreaInfoClassType type = aStream.ReadUint16L(); + CLbsAreaInfoBase* area = NULL; + if( ELbsAreaPositionInfoClass == type ) + { + area = CLbsPositionInfo::NewL(); + } + if( ELbsAreaGsmCellInfoClass == type ) + { + area = CLbsGsmCellInfo::NewL(); + } + if( ELbsAreaWcmdaCellInfoClass == type ) + { + area = CLbsWcdmaCellInfo::NewL(); + } + if( ELbsAreaWlanInfoClass == type ) + { + area = CLbsWlanInfo::NewL(); + } + if( area ) + { + area->InternaliseL( aStream ); + iAreaInfoArray.AppendL( area ); + } + } + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::DoExternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsLocationInfo::DoExternaliseL( RWriteStream& aStream ) const + { + TInt count = iAreaInfoArray.Count(); + aStream.WriteInt8L( count ); + for( TInt i = 0; i < count; i++ ) + { + TLbsAreaInfoClassType type = iAreaInfoArray[i]->Type(); + aStream.WriteUint16L( type ); + iAreaInfoArray[i]->ExternaliseL( aStream ); + } + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::CLbsLocationInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +CLbsLocationInfo::CLbsLocationInfo() + { + } + +// --------------------------------------------------------------------------- +// CLbsLocationInfo::ConstructL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsLocationInfo::ConstructL() + { + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationposinfo.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationposinfo.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,167 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* latitude,longitude,altitude,horizontal accuracy and vertical accuracy. +* +*/ + + +#include +#include +#include + + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsPositionInfo* CLbsPositionInfo::NewL() + { + CLbsPositionInfo* self = new( ELeave ) CLbsPositionInfo; + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsPositionInfo* CLbsPositionInfo::NewL( const TLocality& aLocality ) + { + CLbsPositionInfo* self = new( ELeave ) CLbsPositionInfo; + CleanupStack::PushL( self ); + self->ConstructL( aLocality ); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::~CLbsPositionInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsPositionInfo::~CLbsPositionInfo() + { + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::SetLocality() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsPositionInfo::SetLocality( + const TLocality& aLocality ) + { + iLocality = aLocality; + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::Locality() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsPositionInfo::GetLocality( TLocality& aLocality ) const + { + aLocality = iLocality; + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::Type() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +TLbsAreaInfoClassType CLbsPositionInfo::Type() + { + return ELbsAreaPositionInfoClass; + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::ValidateAreaInfoL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsPositionInfo::ValidateDataL() const + { + if( Math::IsNaN( iLocality.Latitude() ) || + Math::IsNaN( iLocality.Longitude() ) || + iLocality.HorizontalAccuracy() < 0.0 ) + { + User::Leave( KErrArgument ); + } + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::DoInternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsPositionInfo::DoInternaliseL( RReadStream& aStream ) + { + TReal64 latitude = aStream.ReadReal64L(); + TReal64 longitude = aStream.ReadReal64L(); + TReal32 altitude = aStream.ReadReal32L(); + iLocality.SetCoordinate( latitude, longitude, altitude ); + TInt datum = aStream.ReadInt32L(); + iLocality.SetDatum( TUid::Uid( datum ) ); + TReal32 hAccuracy = aStream.ReadReal32L(); + TReal32 vAccuracy = aStream.ReadReal32L(); + iLocality.SetAccuracy( hAccuracy, vAccuracy ); + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::DoExternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsPositionInfo::DoExternaliseL( RWriteStream& aStream ) const + { + aStream.WriteReal64L( iLocality.Latitude() ); + aStream.WriteReal64L( iLocality.Longitude() ); + aStream.WriteReal32L( iLocality.Altitude() ); + aStream.WriteInt32L( iLocality.Datum().iUid ); + aStream.WriteReal32L( iLocality.HorizontalAccuracy() ); + aStream.WriteReal32L( iLocality.VerticalAccuracy() ); + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::CLbsPositionInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +CLbsPositionInfo::CLbsPositionInfo() + { + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::ConstructL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsPositionInfo::ConstructL() + { + } + +// --------------------------------------------------------------------------- +// CLbsPositionInfo::ConstructL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsPositionInfo::ConstructL( const TLocality& aLocality ) + { + SetLocality( aLocality ); + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationwcdmainfo.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationwcdmainfo.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,333 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* cell information in a WCDMA PLMN. This class may also optionally contain +* neighbouring cell information +* +*/ + + +#include +#include + + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsWcdmaCellInfo* CLbsWcdmaCellInfo::NewL() + { + CLbsWcdmaCellInfo* self = new( ELeave ) CLbsWcdmaCellInfo; + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsWcdmaCellInfo* CLbsWcdmaCellInfo::NewL( const TInt aCountryCode, + const TInt aNetworkCode, + const TInt aUniqueCellId ) + { + CLbsWcdmaCellInfo* self = new( ELeave ) CLbsWcdmaCellInfo; + CleanupStack::PushL( self ); + self->ConstructL( aCountryCode, aNetworkCode, aUniqueCellId ); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::~CLbsWcdmaCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsWcdmaCellInfo::~CLbsWcdmaCellInfo() + { + ResetNeighbouringCellInfo(); + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::SetMobileCountryCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWcdmaCellInfo::SetMobileCountryCode( const TInt aCountryCode ) + { + iMCC = aCountryCode; + iDataValidationMask |= EWcdmaMCC; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::MobileCountryCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsWcdmaCellInfo::MobileCountryCode() const + { + return iMCC; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::SetMobileNetworkCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWcdmaCellInfo::SetMobileNetworkCode( const TInt aNetworkCode ) + { + iMNC = aNetworkCode; + iDataValidationMask |= EWcdmaMNC; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::MobileNetworkCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsWcdmaCellInfo::MobileNetworkCode() const + { + return iMNC; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::SetUniqueCellId() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWcdmaCellInfo::SetUniqueCellId( const TInt aUniqueCellId ) + { + iUCid = aUniqueCellId; + iDataValidationMask |= EWcdmaUCid; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::UniqueCellId() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsWcdmaCellInfo::UniqueCellId() const + { + return iUCid; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::SetScramblingCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWcdmaCellInfo::SetScramblingCode( const TInt aScramblingCode ) + { + iSCode = aScramblingCode; + iDataValidationMask |= EWcdmaSC; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::ScramblingCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsWcdmaCellInfo::ScramblingCode() const + { + return iSCode; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::AddNeighbouringCellInfoL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWcdmaCellInfo::AddNeighbouringCellInfoL( + TLbsWcdmaNeighbourCellInfo* + aNeighbourCellInfo ) + { + if( !aNeighbourCellInfo ) + { + User::Leave( KErrArgument ); + } + TLbsWcdmaNeighbourCellInfo wcdmaNeighbourCellInfo; + wcdmaNeighbourCellInfo.SetUniqueCellId( aNeighbourCellInfo->UniqueCellId()); + wcdmaNeighbourCellInfo.SetScramblingCode( aNeighbourCellInfo->ScramblingCode() ); + wcdmaNeighbourCellInfo.SetSignalStrength( aNeighbourCellInfo->SignalStrength() ); + wcdmaNeighbourCellInfo.SetPathloss( aNeighbourCellInfo->Pathloss() ); + iNeighbourCellInfo.AppendL( wcdmaNeighbourCellInfo ); + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::SetNeighbouringCellInfoList() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWcdmaCellInfo::GetNeighbouringCellInfoL( + RLbsWcdmaNeighbourCellInfoArray& + aNeighbourCellInfoList ) const + { + for( TInt i = 0; i < iNeighbourCellInfo.Count(); i++ ) + { + aNeighbourCellInfoList.AppendL( iNeighbourCellInfo[i] ); + } + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::ResetNeighbouringCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWcdmaCellInfo::ResetNeighbouringCellInfo() + { + iNeighbourCellInfo.Reset(); + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::Type() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +TLbsAreaInfoClassType CLbsWcdmaCellInfo::Type() + { + return ELbsAreaWcmdaCellInfoClass; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::DoInternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWcdmaCellInfo::DoInternaliseL( RReadStream& aStream ) + { + iMCC = aStream.ReadInt16L(); + iMNC = aStream.ReadInt16L(); + iUCid = aStream.ReadInt32L(); + iSCode = aStream.ReadInt16L(); + TInt count = aStream.ReadInt16L(); + for( TInt i = 0; i < count; i++ ) + { + TLbsWcdmaNeighbourCellInfo cellInfo; + cellInfo.SetUniqueCellId( aStream.ReadInt32L() ); + cellInfo.SetScramblingCode( aStream.ReadInt16L() ); + cellInfo.SetPathloss( aStream.ReadInt16L() ); + cellInfo.SetSignalStrength( aStream.ReadInt16L() ); + iNeighbourCellInfo.Append( cellInfo ); + } + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::DoExternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWcdmaCellInfo::DoExternaliseL( RWriteStream& aStream )const + { + aStream.WriteInt16L( iMCC ); + aStream.WriteInt16L( iMNC ); + aStream.WriteInt32L( iUCid ); + aStream.WriteInt16L( iSCode ); + TInt count = iNeighbourCellInfo.Count(); + aStream.WriteInt16L( count ); + for( TInt i = 0; i < count; i++ ) + { + aStream.WriteInt32L( iNeighbourCellInfo[i].UniqueCellId() ); + aStream.WriteInt16L( iNeighbourCellInfo[i].ScramblingCode() ); + aStream.WriteInt16L( iNeighbourCellInfo[i].Pathloss() ); + aStream.WriteInt16L( iNeighbourCellInfo[i].SignalStrength() ); + } + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::ValidateAreaInfoL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWcdmaCellInfo::ValidateDataL() const + { + // The following condition is to check the hierarchy of data values specified + if( ( iMCC < 0 || iMCC > 999 ) || + ( iMNC < 0 && iUCid > -1 ) || + ( iUCid < 0 && iSCode > -1 ) || + ( iUCid < 0 && iNeighbourCellInfo.Count() ) ) + User::Leave( KErrArgument ); + + // Check for range values if they are set specifically by clients + if( iDataValidationMask & EWcdmaMNC ) + { + if( iMNC < 0 || iMNC > 999 ) + User::Leave( KErrArgument ); + } + if( iDataValidationMask & EWcdmaUCid ) + { + if( iUCid < 0 || iUCid > 268435455 ) + User::Leave( KErrArgument ); + } + if( iDataValidationMask & EWcdmaSC ) + { + if( iSCode < 0 || iSCode > 511 ) + User::Leave( KErrArgument ); + } + + for( TInt i = 0; i < iNeighbourCellInfo.Count(); i++ ) + { + if( iNeighbourCellInfo[i].UniqueCellId() < 0 || + iNeighbourCellInfo[i].UniqueCellId() > 268435455 || + iNeighbourCellInfo[i].ScramblingCode() < 0 || + iNeighbourCellInfo[i].ScramblingCode() > 511 || + iNeighbourCellInfo[i].Pathloss() < 46 || + iNeighbourCellInfo[i].Pathloss() > 173 || + iNeighbourCellInfo[i].SignalStrength() < 0 || + iNeighbourCellInfo[i].SignalStrength() > 127 ) + { + User::Leave( KErrArgument ); + } + } + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::CLbsWcdmaCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +CLbsWcdmaCellInfo::CLbsWcdmaCellInfo() + { + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::ConstructL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWcdmaCellInfo::ConstructL() + { + iMCC = -1; + iMNC = -1; + iUCid = -1; + iSCode = -1; + iDataValidationMask = EWcdmaDataNull; + } + +// --------------------------------------------------------------------------- +// CLbsWcdmaCellInfo::ConstructL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWcdmaCellInfo::ConstructL( const TInt aCountryCode, + const TInt aNetworkCode, + const TInt aUniqueCellId ) + { + SetMobileCountryCode( aCountryCode ); + SetMobileNetworkCode( aNetworkCode ); + SetUniqueCellId( aUniqueCellId ); + iSCode = -1; + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationwcdmaneighbourinfo.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationwcdmaneighbourinfo.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a neighbouring cell +* information in a WCDMA PLMN. +* +*/ + + +#include + + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::TLbsWcdmaNeighbourCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TLbsWcdmaNeighbourCellInfo::TLbsWcdmaNeighbourCellInfo() + { + iUniqueCellId = -1; + iScramblingCode = -1; + iPathloss = -1; + iRssi = -1; + } + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::TLbsWcdmaNeighbourCellInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TLbsWcdmaNeighbourCellInfo::TLbsWcdmaNeighbourCellInfo( const TInt aUCid, + const TInt aSCode, + const TInt aPathloss, + const TInt aRssi ) + { + iUniqueCellId = aUCid; + iScramblingCode = aSCode; + iPathloss = aPathloss; + iRssi = aRssi; + } + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::SetUniqueCellId() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void TLbsWcdmaNeighbourCellInfo::SetUniqueCellId( const TInt aUniqueCellId ) + { + iUniqueCellId = aUniqueCellId; + } + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::UniqueCellId() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt TLbsWcdmaNeighbourCellInfo::UniqueCellId() const + { + return iUniqueCellId; + } + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::SetScramblingCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void TLbsWcdmaNeighbourCellInfo::SetScramblingCode( + const TInt aScramblingCode ) + { + iScramblingCode = aScramblingCode; + } + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::ScramblingCode() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt TLbsWcdmaNeighbourCellInfo::ScramblingCode() const + { + return iScramblingCode; + } + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::SetPathloss() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void TLbsWcdmaNeighbourCellInfo::SetPathloss( const TInt aPathloss ) + { + iPathloss = aPathloss; + } + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::Pathloss() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt TLbsWcdmaNeighbourCellInfo::Pathloss() const + { + return iPathloss; + } + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::SetSignalStrength() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void TLbsWcdmaNeighbourCellInfo::SetSignalStrength( const TInt aRssi ) + { + iRssi = aRssi; + } + +// --------------------------------------------------------------------------- +// TLbsWcdmaNeighbourCellInfo::SignalStrength() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt TLbsWcdmaNeighbourCellInfo::SignalStrength() const + { + return iRssi; + } diff -r 2cd881e4a6fb -r 90477588756a locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationwlaninfo.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmgmt/locmonitor/ConversionDataTypes/src/lbslocationwlaninfo.cpp Fri Apr 09 17:19:12 2010 +0100 @@ -0,0 +1,181 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data class representing a geographical area in terms of +* WLAN MAC ID. +* +*/ + + +#include +#include + + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsWlanInfo* CLbsWlanInfo::NewL() + { + CLbsWlanInfo* self = new( ELeave ) CLbsWlanInfo; + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::NewL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsWlanInfo* CLbsWlanInfo::NewL( const TLbsWlanMacAddress& MacAddress, + const TInt aPowRx ) + { + CLbsWlanInfo* self = new( ELeave ) CLbsWlanInfo; + CleanupStack::PushL( self ); + self->ConstructL( MacAddress, aPowRx ); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::~CLbsWlanInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C CLbsWlanInfo::~CLbsWlanInfo() + { + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::SetMacId() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWlanInfo::SetMacAddress( const TDesC8& aMacAddress ) + { + iMacAddress = aMacAddress; + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::MacId() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWlanInfo::GetMacAddress(TDes8& aMacAddress ) const + { + aMacAddress = iMacAddress; + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::SetSignalStrength() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C void CLbsWlanInfo::SetSignalStrength( const TInt aPowRx ) + { + iPowRx = aPowRx; + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::SignalStrength() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CLbsWlanInfo::SignalStrength() const + { + return iPowRx; + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::Type() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +TLbsAreaInfoClassType CLbsWlanInfo::Type() + { + return ELbsAreaWlanInfoClass; + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::DoInternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWlanInfo::DoInternaliseL( RReadStream& aStream ) + { + TInt len = aStream.ReadInt32L(); + aStream.ReadL( iMacAddress, len ); + iPowRx = aStream.ReadInt16L(); + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::DoExternaliseL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWlanInfo::DoExternaliseL( RWriteStream& aStream )const + { + TInt len = iMacAddress.Length(); + aStream.WriteInt32L( len ); + aStream.WriteL( iMacAddress,len ); + aStream.WriteInt16L( iPowRx ); + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::ValidateAreaInfoL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWlanInfo::ValidateDataL() const + { + if( !iMacAddress.Length() ) + User::Leave( KErrArgument ); + + if( iPowRx < 0 || iPowRx > 255 ) + User::Leave( KErrArgument ); + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::CLbsWlanInfo() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +CLbsWlanInfo::CLbsWlanInfo() + { + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::ConstructL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWlanInfo::ConstructL() + { + iMacAddress.FillZ(); + iPowRx = -1; + } + +// --------------------------------------------------------------------------- +// CLbsWlanInfo::ConstructL() +// other items were commented in the header +// --------------------------------------------------------------------------- +// +void CLbsWlanInfo::ConstructL( const TLbsWlanMacAddress& MacAddress, + const TInt aPowRx ) + { + SetMacAddress( MacAddress ); + SetSignalStrength( aPowRx ); + }