1 /* |
1 /* |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
|
18 #include <e32err.h> |
18 #include "rlocationtrail.h" |
19 #include "rlocationtrail.h" |
19 |
20 |
20 RLocationTrail::RLocationTrail() |
21 RLocationTrail::RLocationTrail() |
|
22 : mTrailConnected(false), mTrailStarted(false) |
21 { |
23 { |
22 } |
24 } |
23 |
25 |
24 RLocationTrail::~RLocationTrail() |
26 RLocationTrail::~RLocationTrail() |
25 { |
27 { |
26 } |
28 } |
27 |
29 |
28 TInt RLocationTrail::Connect() |
30 int RLocationTrail::StartLocationTrail(TTrailCaptureSetting /*aState*/) |
29 { |
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; |
30 return KErrNone; |
59 return KErrNone; |
31 } |
60 } |
32 |
61 |
|
62 |
33 void RLocationTrail::Close() |
63 void RLocationTrail::Close() |
34 { |
64 { |
|
65 mTrailConnected = false; |
35 } |
66 } |
36 |
|
37 TInt RLocationTrail::StartLocationTrail(TTrailCaptureSetting aState) |
|
38 { |
|
39 return KErrNone; |
|
40 } |
|
41 |
|
42 TInt RLocationTrail::StopLocationTrail() |
|
43 { |
|
44 return KErrNone; |
|
45 } |
|
46 |
|
47 TInt RLocationTrail::GetLocationTrailState( TTrailState& aState ) |
|
48 { |
|
49 return KErrNone; |
|
50 } |
|
51 |
|
52 void RLocationTrail::NotifyLocationTrailStateChange( TRequestStatus& aStatus ) |
|
53 { |
|
54 } |
|
55 |
|
56 void RLocationTrail::CancelNotificationRequest() |
|
57 { |
|
58 } |
|
59 |
|
60 TInt RLocationTrail::RetrieveLocation( const TTime& aTimeStamp, |
|
61 TLocationData& aLocationData, |
|
62 TTrailState& aState ) |
|
63 { |
|
64 return KErrNone; |
|
65 } |
|
66 |
|
67 void RLocationTrail::CurrentLocation( TRequestStatus& aStatus, |
|
68 TLocationData& aLocationData) |
|
69 { |
|
70 } |
|
71 |
|
72 void RLocationTrail::CancelLocationRequest() |
|
73 { |
|
74 } |
|
75 |
|
76 TInt RLocationTrail::GetTrailCaptureSetting( TTrailCaptureSetting& aCaptureSetting ) |
|
77 { |
|
78 return KErrNone; |
|
79 } |
|
80 |
|
81 // end of file |
|