42
|
1 |
/*
|
46
|
2 |
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
42
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
46
|
18 |
#include <e32err.h>
|
42
|
19 |
#include "rlocationtrail.h"
|
|
20 |
|
|
21 |
RLocationTrail::RLocationTrail()
|
46
|
22 |
: mTrailConnected(false), mTrailStarted(false)
|
42
|
23 |
{
|
|
24 |
}
|
|
25 |
|
|
26 |
RLocationTrail::~RLocationTrail()
|
|
27 |
{
|
|
28 |
}
|
|
29 |
|
46
|
30 |
int RLocationTrail::StartLocationTrail(TTrailCaptureSetting /*aState*/)
|
42
|
31 |
{
|
46
|
32 |
int err = KErrNone;
|
|
33 |
|
|
34 |
if (mTrailConnected) {
|
|
35 |
mTrailStarted = true;
|
|
36 |
} else {
|
|
37 |
err = KErrGeneral;
|
|
38 |
}
|
|
39 |
|
|
40 |
return err;
|
42
|
41 |
}
|
|
42 |
|
46
|
43 |
int RLocationTrail::StopLocationTrail()
|
42
|
44 |
{
|
46
|
45 |
int err = KErrNone;
|
|
46 |
if (!mTrailConnected || !mTrailStarted) {
|
|
47 |
err = KErrGeneral;
|
|
48 |
} else {
|
|
49 |
mTrailStarted = false;
|
|
50 |
}
|
|
51 |
return err;
|
42
|
52 |
}
|
|
53 |
|
46
|
54 |
|
|
55 |
|
|
56 |
int RLocationTrail::Connect()
|
42
|
57 |
{
|
46
|
58 |
mTrailConnected = true;
|
42
|
59 |
return KErrNone;
|
|
60 |
}
|
|
61 |
|
|
62 |
|
46
|
63 |
void RLocationTrail::Close()
|
42
|
64 |
{
|
46
|
65 |
mTrailConnected = false;
|
42
|
66 |
}
|