locationmgmt/locmonitor/lbslocmonitorserver/inc/clbsareapositionersubsession.h
author Billy Gibson <Billy.Gibson@nokia.com>
Fri, 28 May 2010 18:01:03 +0100
branchGeoConversion
changeset 34 0c0ad64c882c
parent 0 9cfd9a3ee49c
permissions -rw-r--r--
Updated version of the Location Monitor supporting the new New GeoConversion interfaces. Also includes API help information
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    19
#ifndef CLBSLOCMONITORPOSITIONERSUBSESSION_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
#define CLBSLOCMONITORPOSITIONERSUBSESSION_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
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    22
/**
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    23
@file
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    24
@internalComponent
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    25
@released
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    26
*/
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
#include <e32property.h>
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    29
#include "tserverstartparams.h"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    30
#include "csecureasbase.h"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    31
#include "csecureserverbase.h"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    32
#include "csecuresessionbase.h"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    33
#include "csecuresessionsubsessionbase.h"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    34
#include "csubsessionbase.h"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    35
#include "messageutils.h"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    36
#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
    37
#include "clbslocmonitorserver.h"
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
class CLbsLocMonitorServer;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    40
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    41
/*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    42
  Server side subsession of the Location Monitor server.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    43
  This subsession handles client's requests for the
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    44
  last known position and also the last known position
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    45
  for the current area information (e.g Global Cell ID).
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    46
  This subsession is also used by clients to supply an 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    47
  accurate position (e.g, a position obtained with GPS) so
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    48
  that the position is kept in a database together with 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    49
  area information.	
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
class CLbsAreaPositionerSubsession : public CBase, public MSubSessionImpl, public MLocMonServerDestructObserver
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
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    54
public:
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    55
	static 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
    56
    ~CLbsAreaPositionerSubsession();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    57
    
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    58
	// From MSubSessionImpl
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    59
	virtual void 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
    60
	virtual void 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
    61
	virtual void 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
    62
	virtual void CloseSubSession();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    63
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    64
	// via MSubSessionImpl::MRelease	
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    65
	void VirtualRelease();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    66
	// from MLocMonServerDestructObserver
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    67
	void LocMonServerDestructed();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    68
protected:
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    69
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    70
	CLbsAreaPositionerSubsession();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    71
	void ConstructL();
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
	// 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
    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
	void 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
    77
	void 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
    78
	void 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
    79
	
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    80
private:
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    81
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    82
	const 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
    83
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    84
	// Unique ID of this subsession
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    85
	CLbsLocMonitorUtils::sessionAndSubSessionId iSubsessionId;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    86
	};
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    87
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents: 0
diff changeset
    88
#endif //CLBSLOCMONITORPOSITIONERSUBSESSION_H