diff -r 63c982fb92f2 -r b73252188534 locationmanager/client/src/rlocationgeotagger.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/client/src/rlocationgeotagger.cpp Thu Aug 19 10:20:41 2010 +0300 @@ -0,0 +1,114 @@ +/* +* 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:An interface to Location Manager geo tagger +* +*/ + +#include +#include +#include + +#include +#include "rlocationgeotagger.h" +#include "locationmanagerdefs.h" +#include "locationmanagerdebug.h" + +EXPORT_C RLocationGeoTagger::RLocationGeoTagger() + : iTagPendingData (NULL) + { + } + +EXPORT_C RLocationGeoTagger::~RLocationGeoTagger() + { + delete iTagPendingData; + } + +// -------------------------------------------------------------------------- +// RLocationGeoTagger::IsTagPending +// -------------------------------------------------------------------------- +// +EXPORT_C void RLocationGeoTagger::GeoTagStaus( TRequestStatus& aStatus, + TGeoTaggingSatus& aTagPendingFlag ) + { + LOG( "RLocationGeoTagger::IsTagPending(), begin" ); + + delete iTagPendingData; + iTagPendingData = new TPckg( aTagPendingFlag); + + if ( iHandle && iTagPendingData ) + { + SendReceive( ELocManTagPending, TIpcArgs( iTagPendingData ), aStatus ); + } + else + { + if ( !iTagPendingData ) + { + CompleteRequest(aStatus, KErrNoMemory); + } + else + { + CompleteRequest(aStatus, KErrDisconnected); + } + } + LOG( "RLocationGeoTagger::IsTagPending(), end" ); + } + +// -------------------------------------------------------------------------- +// RLocationGeoTagger::StartGeoTagging +// -------------------------------------------------------------------------- +// +EXPORT_C void RLocationGeoTagger::StartGeoTagging + (TRequestStatus& aStatus, const TConnectionOption aConnectionOption ) + { + LOG( "RLocationGeoTagger::StartGeoTaggingL(), begin" ); + + if ( iHandle ) + { + SendReceive( ELocManStartGeoTaging, TIpcArgs( aConnectionOption ), aStatus); + } + LOG( "RLocationGeoTagger::StartGeoTaggingL(), end" ); + } + +// -------------------------------------------------------------------------- +// RLocationGeoTagger::CancelTagPendingRequest +// -------------------------------------------------------------------------- +// +EXPORT_C void RLocationGeoTagger::CancelTagPendingRequest() + { + LOG( "RLocationGeoTagger::CancelTagPendingRequest(), begin" ); + + if ( iHandle ) + { + SendReceive( ELocManCancelTagPendingReq); + } + LOG( "RLocationGeoTagger::CancelTagPendingRequest(), end" ); + } + + +// -------------------------------------------------------------------------- +// RLocationGeoTagger::CancelTagPendingRequest +// -------------------------------------------------------------------------- +// +EXPORT_C void RLocationGeoTagger::CancelGeoTaggingRequest() + { + LOG( "RLocationGeoTagger::CancelGeoTaggingRequest(), begin" ); + if ( iHandle ) + { + SendReceive( ELocManCancelGeoTaggingReq); + } + LOG( "RLocationGeoTagger::CancelGeoTaggingRequest(), end" ); + } + + +//End of File