locsrv_plat/map_and_navigation_provider_discovery_api/tsrc/src/testmnproviderfinder.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 2007 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: Provides testing of MnProviderFinder class methods
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 
       
    22 #include "testmnproviderfinder.h"
       
    23 #include <MnProviderFinder.h>
       
    24 #include <MnProvider.h>
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // TestMnProviderFinder::TestMnProviderFinder
       
    30 // C++ default constructor can NOT contain any code, that
       
    31 // might leave.
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 TestMnProviderFinder::TestMnProviderFinder( CStifLogger* aLog ) 
       
    35 	{
       
    36 	iLog = aLog;
       
    37 	}
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // TestMnProviderFinder::NewL
       
    41 // 
       
    42 // 
       
    43 // -----------------------------------------------------------------------------
       
    44 //	
       
    45 TestMnProviderFinder* TestMnProviderFinder::NewL(CStifLogger* aLog)
       
    46 	{
       
    47 	TestMnProviderFinder* self = new (ELeave) TestMnProviderFinder( aLog );
       
    48 	CleanupStack::PushL( self );
       
    49     self->ConstructL();
       
    50     CleanupStack::Pop(); 
       
    51     return self; 
       
    52 	}
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // TestMnProviderFinder::ConstructL
       
    56 // 
       
    57 // 
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 void TestMnProviderFinder::ConstructL()
       
    61 	{
       
    62 	
       
    63 	}	
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // TestMnProviderFinder::~TestMnProviderFinder
       
    67 // 
       
    68 // 
       
    69 // -----------------------------------------------------------------------------
       
    70 //
       
    71 TestMnProviderFinder::~TestMnProviderFinder()
       
    72 	{
       
    73 	
       
    74 	}
       
    75 	
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // TestMnProviderFinder::FindAllProvidersL
       
    79 // 
       
    80 // 
       
    81 // -----------------------------------------------------------------------------
       
    82 //
       
    83 TInt TestMnProviderFinder::FindAllProvidersL( CStifItemParser& /*aItem*/ )
       
    84 	{
       
    85 	RPointerArray<CMnProvider> providerArray;
       
    86 	MnProviderFinder::FindProvidersL( providerArray );
       
    87 	
       
    88 	providerArray.ResetAndDestroy();
       
    89 	return KErrNone;
       
    90 	}
       
    91 	
       
    92 // -----------------------------------------------------------------------------
       
    93 // TestMnProviderFinder::FindSelectedProvidersL
       
    94 // 
       
    95 // 
       
    96 // -----------------------------------------------------------------------------
       
    97 //
       
    98 TInt TestMnProviderFinder::FindSelectedProvidersL( CStifItemParser& /*aItem*/ )
       
    99 	{
       
   100 	
       
   101 	RPointerArray<CMnProvider> providerArray;
       
   102 	MnProviderFinder::FindProvidersL( providerArray, CMnProvider::EServiceNavigation | CMnProvider::EServiceMapView );
       
   103 	
       
   104 	providerArray.ResetAndDestroy();
       
   105 	return KErrNone;
       
   106 	}	
       
   107