locationsystemui/locationsysui/posindicator/posindicatorhelperserver/src/posindicatorserversubsession.cpp
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     1 /*
       
     2 * Copyright (c) 2010 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: Implementation of subsession class.
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDES
       
    19 #include "posindicatorserversubsession.h"
       
    20 #include "posindicatorserversession.h"
       
    21 #include "posindicatorservercore.h"
       
    22 #include "posindicatorlocationrequestor.h"
       
    23 #include "posindicatorserverconst.h"
       
    24 #include "posindicatorlogger.h"
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // CPosIndicatorServerSubsession::NewL
       
    28 // ---------------------------------------------------------------------------
       
    29 CPosIndicatorServerSubsession* CPosIndicatorServerSubsession::NewL( 
       
    30                                                 CPosIndicatorLocationRequestor&
       
    31                                                 aLocationRequestor )
       
    32     { 
       
    33     FUNC("CPosIndicatorServerSubsession::NewL");
       
    34     CPosIndicatorServerSubsession* self = new ( ELeave ) 
       
    35                                     CPosIndicatorServerSubsession( aLocationRequestor );
       
    36     CleanupStack::PushL( self );
       
    37     self->ConstructL();
       
    38     CleanupStack::Pop( self );
       
    39     return self;
       
    40     }
       
    41 
       
    42 // ---------------------------------------------------------------------------
       
    43 // CPosIndicatorServerSubsession::CPosIndicatorServerSubsession
       
    44 // ---------------------------------------------------------------------------
       
    45 CPosIndicatorServerSubsession::CPosIndicatorServerSubsession(
       
    46                                                 CPosIndicatorLocationRequestor&
       
    47                                                 aLocationRequestor ):
       
    48                                                 iLocationRequestor( aLocationRequestor )
       
    49     {
       
    50     FUNC("CPosIndicatorServerSubsession::CPosIndicatorServerSubsession");
       
    51     }
       
    52 
       
    53 // ---------------------------------------------------------------------------
       
    54 // CPosIndicatorServerSubsession::~CPosIndicatorServerSubsession
       
    55 // ---------------------------------------------------------------------------
       
    56 CPosIndicatorServerSubsession::~CPosIndicatorServerSubsession()
       
    57     {
       
    58     FUNC("CPosIndicatorServerSubsession::~CPosIndicatorServerSubsession");
       
    59     }
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // CPosIndicatorServerSubsession::ConstructL
       
    63 // ---------------------------------------------------------------------------
       
    64 void CPosIndicatorServerSubsession::ConstructL()
       
    65     {
       
    66     FUNC("CPosIndicatorServerSubsession::ConstructL");
       
    67     }
       
    68 
       
    69 // ---------------------------------------------------------------------------
       
    70 // CPosIndicatorServerSubsession::ServiceL
       
    71 // ---------------------------------------------------------------------------
       
    72 void CPosIndicatorServerSubsession::ServiceL( const RMessage2 &aMessage )
       
    73     {
       
    74     FUNC("+ CPosIndicatorServerSubsession::ServiceL");
       
    75     switch( aMessage.Function() )
       
    76         {
       
    77         case EGetCurrentPosition:
       
    78             {
       
    79             iLocationRequestor.GetCurrentPosition( aMessage );
       
    80             break;
       
    81             }
       
    82         case EGetCurrentAddressInfoSize:
       
    83             {
       
    84             iLocationRequestor.GetCurrentAddressInfoSizeL( aMessage );
       
    85             break;
       
    86             }
       
    87         case EGetCurrentAddressInfo:
       
    88             {
       
    89             iLocationRequestor.GetCurrentAddressInfoL( aMessage );
       
    90             break;
       
    91             }
       
    92         case ECancelCurrentOperation:
       
    93             {
       
    94             iLocationRequestor.CancelRequest( aMessage );            
       
    95             break;
       
    96             }
       
    97         default:
       
    98             aMessage.Complete( KErrNotFound );
       
    99         }
       
   100     }
       
   101 
       
   102 // end of file