equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
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 |
|
18 #include <e32err.h> |
|
19 #include "rlocationtrail.h" |
|
20 |
|
21 RLocationTrail::RLocationTrail() |
|
22 : mTrailConnected(false), mTrailStarted(false) |
|
23 { |
|
24 } |
|
25 |
|
26 RLocationTrail::~RLocationTrail() |
|
27 { |
|
28 } |
|
29 |
|
30 int RLocationTrail::StartLocationTrail(TTrailCaptureSetting /*aState*/) |
|
31 { |
|
32 int err = KErrNone; |
|
33 |
|
34 if (mTrailConnected) { |
|
35 mTrailStarted = true; |
|
36 } else { |
|
37 err = KErrGeneral; |
|
38 } |
|
39 |
|
40 return err; |
|
41 } |
|
42 |
|
43 int RLocationTrail::StopLocationTrail() |
|
44 { |
|
45 int err = KErrNone; |
|
46 if (!mTrailConnected || !mTrailStarted) { |
|
47 err = KErrGeneral; |
|
48 } else { |
|
49 mTrailStarted = false; |
|
50 } |
|
51 return err; |
|
52 } |
|
53 |
|
54 |
|
55 |
|
56 int RLocationTrail::Connect() |
|
57 { |
|
58 mTrailConnected = true; |
|
59 return KErrNone; |
|
60 } |
|
61 |
|
62 |
|
63 void RLocationTrail::Close() |
|
64 { |
|
65 mTrailConnected = false; |
|
66 } |