author | Billy Gibson <Billy.Gibson@nokia.com> |
Fri, 28 May 2010 18:01:03 +0100 | |
branch | GeoConversion |
changeset 34 | 0c0ad64c882c |
parent 0 | 9cfd9a3ee49c |
permissions | -rw-r--r-- |
34
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
1 |
/* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
3 |
* All rights reserved. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
8 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
9 |
* Initial Contributors: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
11 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
12 |
* Contributors: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
13 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
14 |
* Description: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
15 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
16 |
*/ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
17 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
18 |
#include <lbsposition.h> |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
19 |
#include "clbsareapositionersubsession.h" |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
20 |
#include "lbslocmonitorserverdata.h" |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
21 |
#include "clbslocmonitorutils.h" |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
22 |
#include "lbsdevloggermacros.h" |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
23 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
24 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
25 |
//------------------------------------------------------------------------------- |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
26 |
// Methods called by the Server Framework for subsession creation and destruction |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
27 |
// ------------------------------------------------------------------------------ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
28 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
29 |
// |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
30 |
// Called by the Server Framework when the subsession is |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
31 |
// closed by the client or otherwise destroyed (i.e. if the |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
32 |
// owning session is closed). |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
33 |
// |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
34 |
void CLbsAreaPositionerSubsession::VirtualRelease() |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
35 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
36 |
LBSLOG(ELogP1,"CLbsAreaPositionerSubsession::VirtualRelease()"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
37 |
delete this; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
38 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
39 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
40 |
// Called by the server framework after creating this object |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
41 |
// in CSubSessionBase::GetImplL |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
42 |
void CLbsAreaPositionerSubsession::CreateSubSessionL(const RMessage2& aMessage, const CSecureServerBase* aServer) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
43 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
44 |
LBSLOG(ELogP1,"CLbsAreaPositionerSubsession::CreateSubSessionL()"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
45 |
iLocMonitorServer = reinterpret_cast<const CLbsLocMonitorServer*>(aServer); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
46 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
47 |
// set ourselves as an observer of server destruction |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
48 |
CLbsLocMonitorServer* server = const_cast<CLbsLocMonitorServer*>(iLocMonitorServer); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
49 |
server->SetLocMonServerDestructObserverL(*this); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
50 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
51 |
iSubsessionId.iSessionPtr = static_cast<CLbsLocMonitorSession*>(aMessage.Session()); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
52 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
53 |
TInt subsessionId; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
54 |
TPckg<TInt> subsessionIdBuf(subsessionId); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
55 |
User::LeaveIfError(aMessage.Read(3, subsessionIdBuf)); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
56 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
57 |
iSubsessionId.iSubsessionId = subsessionId; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
58 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
59 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
60 |
// Called by the Server Framework on sub-session closure |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
61 |
void CLbsAreaPositionerSubsession::CloseSubSession() |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
62 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
63 |
LBSLOG(ELogP1,"CLbsAreaPositionerSubsession::CloseSubSession()"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
64 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
65 |
// The server should not have been destroyed at this point |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
66 |
__ASSERT_DEBUG(iLocMonitorServer, User::Invariant()); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
67 |
// Release anything allocated in CreateSubSessionL. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
68 |
// remove ourselves as an observer of server destruction |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
69 |
CLbsLocMonitorServer* server = const_cast<CLbsLocMonitorServer*>(iLocMonitorServer); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
70 |
server->UnsetLocMonServerDestructObserver(*this); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
71 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
72 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
73 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
74 |
void CLbsAreaPositionerSubsession::DispatchL(const RMessage2& aMessage) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
75 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
76 |
LBSLOG(ELogP1,"CLbsAreaPositionerSubsession::DispatchL()"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
77 |
switch(aMessage.Function()) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
78 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
79 |
case ESetLastKnownPosition: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
80 |
SetLastKnownPositionL(aMessage); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
81 |
break; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
82 |
case EGetLastKnownPosition: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
83 |
case EGetLastKnownPositionArea: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
84 |
GetPositionL(aMessage); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
85 |
break; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
86 |
case ECancelGetLastKnownPosition: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
87 |
case ECancelGetLastKnownPositionArea: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
88 |
CancelGetPositionL(aMessage); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
89 |
break; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
90 |
default: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
91 |
__ASSERT_DEBUG(EFalse, User::Invariant()); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
92 |
break; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
93 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
94 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
95 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
96 |
void CLbsAreaPositionerSubsession::DispatchError(const RMessage2& /*aMessage*/, TInt /*aError*/) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
97 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
98 |
LBSLOG(ELogP1,"CLbsAreaPositionerSubsession::DispatchError()"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
99 |
// errors from DispatchL end up in here |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
100 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
101 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
102 |
// ----------------------------------------------------------------------------- |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
103 |
// Construction/Destruction methods not directly called by the Server framework |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
104 |
//------------------------------------------------------------------------------ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
105 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
106 |
CLbsAreaPositionerSubsession::CLbsAreaPositionerSubsession() |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
107 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
108 |
LBSLOG(ELogP1,"CLbsAreaPositionerSubsession::CLbsAreaPositionerSubsession()"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
109 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
110 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
111 |
CLbsAreaPositionerSubsession::~CLbsAreaPositionerSubsession() |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
112 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
113 |
LBSLOG(ELogP1,"->CLbsAreaPositionerSubsession::~CLbsAreaPositionerSubsession"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
114 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
115 |
if(iLocMonitorServer) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
116 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
117 |
// Tell the DB reader that this subsession is being deleted |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
118 |
// so that if there are any outanding requests from this session |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
119 |
// they are terminated with KErrServerTerminated. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
120 |
iLocMonitorServer->ReadRequestHandler().ClientTerminated(iSubsessionId); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
121 |
// remove ourselves as an observer of server destruction |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
122 |
CLbsLocMonitorServer* server = const_cast<CLbsLocMonitorServer*>(iLocMonitorServer); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
123 |
server->UnsetLocMonServerDestructObserver(*this); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
124 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
125 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
126 |
LBSLOG(ELogP1,"<-CLbsAreaPositionerSubsession::~CLbsAreaPositionerSubsession"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
127 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
128 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
129 |
CLbsAreaPositionerSubsession* CLbsAreaPositionerSubsession::NewL() |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
130 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
131 |
LBSLOG(ELogP1,"CLbsAreaPositionerSubsession::NewL()"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
132 |
CLbsAreaPositionerSubsession* self = new (ELeave) CLbsAreaPositionerSubsession; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
133 |
CleanupStack::PushL(self); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
134 |
self->ConstructL(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
135 |
CleanupStack::Pop(self); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
136 |
return self; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
137 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
138 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
139 |
void CLbsAreaPositionerSubsession::ConstructL() |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
140 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
141 |
LBSLOG(ELogP1,"CLbsAreaPositionerSubsession::ConstructL()"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
142 |
// Nothing to do |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
143 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
144 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
145 |
void CLbsAreaPositionerSubsession::LocMonServerDestructed() |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
146 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
147 |
iLocMonitorServer = NULL; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
148 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
149 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
150 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
151 |
//------------------------------------------------------------------------- |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
152 |
// Action methods |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
153 |
// (These method just relay the client request to a database writer or |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
154 |
// reader where requests of the same type are either serialized or |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
155 |
// merged into a single call to the database) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
156 |
//------------------------------------------------------------------------- |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
157 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
158 |
/* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
159 |
Called when a a client (e.g. Location Server) has a position that wants to |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
160 |
add to the database. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
161 |
*/ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
162 |
void CLbsAreaPositionerSubsession::SetLastKnownPositionL(const RMessage2& aMessage) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
163 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
164 |
LBSLOG(ELogP1,"->CLbsAreaPositionerSubsession::SetLastKnownPositionL"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
165 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
166 |
// Read the position |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
167 |
TPosition position; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
168 |
TPckg<TPosition> positionPkg(position); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
169 |
aMessage.ReadL(0, positionPkg, 0); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
170 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
171 |
// Complete the call |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
172 |
aMessage.Complete(KErrNone); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
173 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
174 |
// Pass the message on to the database writer |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
175 |
iLocMonitorServer->ReadRequestHandler().StoreLastKnownPosition(position); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
176 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
177 |
LBSLOG(ELogP1,"<-CLbsAreaPositionerSubsession::SetLastKnownPositionL"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
178 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
179 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
180 |
void CLbsAreaPositionerSubsession::GetPositionL(const RMessage2& aMessage) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
181 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
182 |
LBSLOG(ELogP1,"->CLbsAreaPositionerSubsession::GetPositionL"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
183 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
184 |
iLocMonitorServer->ReadRequestHandler().PositionRequestL(aMessage); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
185 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
186 |
LBSLOG(ELogP1,"<-CLbsAreaPositionerSubsession::GetPositionL"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
187 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
188 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
189 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
190 |
void CLbsAreaPositionerSubsession::CancelGetPositionL(const RMessage2& aMessage) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
191 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
192 |
LBSLOG(ELogP1,"->CLbsAreaPositionerSubsession::CancelGetPositionL"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
193 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
194 |
iLocMonitorServer->ReadRequestHandler().CancelPositionRequestL(aMessage); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
195 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
196 |
LBSLOG(ELogP1,"<-CLbsAreaPositionerSubsession::CancelGetPositionL"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
197 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
198 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
0
diff
changeset
|
199 |