|
1 /* |
|
2 * Copyright (c) 2009 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:An interface to Location Manager geo tagger |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <f32file.h> |
|
19 #include <s32mem.h> |
|
20 #include <data_caging_path_literals.hrh> |
|
21 |
|
22 #include <locationeventdef.h> |
|
23 #include "rlocationgeotagger.h" |
|
24 #include "locationmanagerdefs.h" |
|
25 #include "locationmanagerdebug.h" |
|
26 |
|
27 EXPORT_C RLocationGeoTagger::RLocationGeoTagger() |
|
28 : iTagPendingData (NULL) |
|
29 { |
|
30 } |
|
31 |
|
32 EXPORT_C RLocationGeoTagger::~RLocationGeoTagger() |
|
33 { |
|
34 delete iTagPendingData; |
|
35 } |
|
36 |
|
37 // -------------------------------------------------------------------------- |
|
38 // RLocationGeoTagger::IsTagPending |
|
39 // -------------------------------------------------------------------------- |
|
40 // |
|
41 EXPORT_C void RLocationGeoTagger::GeoTagStaus( TRequestStatus& aStatus, |
|
42 TGeoTaggingSatus& aTagPendingFlag ) |
|
43 { |
|
44 LOG( "RLocationGeoTagger::IsTagPending(), begin" ); |
|
45 |
|
46 delete iTagPendingData; |
|
47 iTagPendingData = new TPckg<TGeoTaggingSatus>( aTagPendingFlag); |
|
48 |
|
49 if ( iHandle && iTagPendingData ) |
|
50 { |
|
51 SendReceive( ELocManTagPending, TIpcArgs( iTagPendingData ), aStatus ); |
|
52 } |
|
53 else |
|
54 { |
|
55 if ( !iTagPendingData ) |
|
56 { |
|
57 CompleteRequest(aStatus, KErrNoMemory); |
|
58 } |
|
59 else |
|
60 { |
|
61 CompleteRequest(aStatus, KErrDisconnected); |
|
62 } |
|
63 } |
|
64 LOG( "RLocationGeoTagger::IsTagPending(), end" ); |
|
65 } |
|
66 |
|
67 // -------------------------------------------------------------------------- |
|
68 // RLocationGeoTagger::StartGeoTagging |
|
69 // -------------------------------------------------------------------------- |
|
70 // |
|
71 EXPORT_C void RLocationGeoTagger::StartGeoTagging |
|
72 (TRequestStatus& aStatus, const TConnectionOption aConnectionOption ) |
|
73 { |
|
74 LOG( "RLocationGeoTagger::StartGeoTaggingL(), begin" ); |
|
75 |
|
76 if ( iHandle ) |
|
77 { |
|
78 SendReceive( ELocManStartGeoTaging, TIpcArgs( aConnectionOption ), aStatus); |
|
79 } |
|
80 LOG( "RLocationGeoTagger::StartGeoTaggingL(), end" ); |
|
81 } |
|
82 |
|
83 // -------------------------------------------------------------------------- |
|
84 // RLocationGeoTagger::CancelTagPendingRequest |
|
85 // -------------------------------------------------------------------------- |
|
86 // |
|
87 EXPORT_C void RLocationGeoTagger::CancelTagPendingRequest() |
|
88 { |
|
89 LOG( "RLocationGeoTagger::CancelTagPendingRequest(), begin" ); |
|
90 |
|
91 if ( iHandle ) |
|
92 { |
|
93 SendReceive( ELocManCancelTagPendingReq); |
|
94 } |
|
95 LOG( "RLocationGeoTagger::CancelTagPendingRequest(), end" ); |
|
96 } |
|
97 |
|
98 |
|
99 // -------------------------------------------------------------------------- |
|
100 // RLocationGeoTagger::CancelTagPendingRequest |
|
101 // -------------------------------------------------------------------------- |
|
102 // |
|
103 EXPORT_C void RLocationGeoTagger::CancelGeoTaggingRequest() |
|
104 { |
|
105 LOG( "RLocationGeoTagger::CancelGeoTaggingRequest(), begin" ); |
|
106 if ( iHandle ) |
|
107 { |
|
108 SendReceive( ELocManCancelGeoTaggingReq); |
|
109 } |
|
110 LOG( "RLocationGeoTagger::CancelGeoTaggingRequest(), end" ); |
|
111 } |
|
112 |
|
113 |
|
114 //End of File |