locationmgmt/locmonitor/test/LocInfoConversionUnitTest/src/LocInfoConversionHandler.cpp
author Billy Gibson <Billy.Gibson@nokia.com>
Fri, 28 May 2010 18:01:03 +0100
branchGeoConversion
changeset 34 0c0ad64c882c
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:
diff changeset
     1
/*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
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:
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:
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:
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:
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:
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:
diff changeset
     8
*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
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:
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:
diff changeset
    11
*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    12
* Contributors:
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    13
* 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    14
* Description: STIF testclass declaration
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    15
*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    16
*/
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    17
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    18
#include "LocInfoConversionHandler.h"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    19
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    20
CLocInfoConversionHanlder* CLocInfoConversionHanlder::NewL()
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    21
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    22
    CLocInfoConversionHanlder* self = new ( ELeave ) CLocInfoConversionHanlder;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    23
    CleanupStack::PushL( self );
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    24
    self->ConstructL();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    25
    CleanupStack::Pop( self );
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    26
    return self;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    27
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    28
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    29
CLocInfoConversionHanlder::CLocInfoConversionHanlder():CActive( EPriorityStandard )
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    30
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    31
    CActiveScheduler::Add( this );
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    32
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    33
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    34
CLocInfoConversionHanlder::~CLocInfoConversionHanlder()
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    35
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    36
    if( IsActive() )
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    37
        {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    38
        Cancel();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    39
        }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    40
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    41
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    42
void CLocInfoConversionHanlder::Start()
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    43
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    44
    iStatus = KRequestPending;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    45
    SetActive();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    46
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    47
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    48
void CLocInfoConversionHanlder::RunL()
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    49
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    50
    CActiveScheduler::Stop();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    51
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    52
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    53
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    54
void CLocInfoConversionHanlder::ConstructL()
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    55
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    56
    // Nothign to do here
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    57
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    58
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    59
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    60
void CLocInfoConversionHanlder::DoCancel()
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    61
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    62
    // Nothign to do here
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    63
    }