authenticationservices/authenticationserver/test/securitytests/source/authreaddevicedata.cpp
changeset 31 c0e7917aa107
parent 29 ece3df019add
equal deleted inserted replaced
30:880bdb445c5c 31:c0e7917aa107
       
     1 /*
       
     2 * Copyright (c) 2009 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 the License "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: 
       
    15 * authreadedvicedata.cpp
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #include "authreaddevicedata.h"
       
    22 
       
    23 #include <authserver/authclient.h>
       
    24 #include <authserver/authmgrclient.h>
       
    25 #include <e32def.h>
       
    26 
       
    27 _LIT(KAuthReadDeviceDataSecName, "Auth ReadDeviceData APIs test");
       
    28 
       
    29 using namespace AuthServer;
       
    30 
       
    31 CAuthReadDeviceDataSecTest* CAuthReadDeviceDataSecTest::NewL()
       
    32 	{
       
    33 	CAuthReadDeviceDataSecTest* self=new(ELeave) CAuthReadDeviceDataSecTest();
       
    34 	CleanupStack::PushL(self);
       
    35 	self->ConstructL();
       
    36 	CleanupStack::Pop(self);
       
    37 	return self;
       
    38 	}
       
    39 
       
    40 CAuthReadDeviceDataSecTest::CAuthReadDeviceDataSecTest()
       
    41 	{
       
    42 	SetCapabilityRequired(ECapabilityReadDeviceData);
       
    43 	}
       
    44 	
       
    45 void CAuthReadDeviceDataSecTest::ConstructL()
       
    46 	{
       
    47 	SetNameL(KAuthReadDeviceDataSecName);
       
    48 	}
       
    49 
       
    50 void CAuthReadDeviceDataSecTest::RunTestL()
       
    51 	{
       
    52 	AuthServer::RAuthMgrClient authMgrClient;	
       
    53 	User::LeaveIfError(authMgrClient.Connect());
       
    54 	CleanupClosePushL(authMgrClient);
       
    55 	
       
    56 	TInt err(0);
       
    57 	
       
    58 	AuthServer::RIdentityIdArray idList;
       
    59 	TRAP(err, authMgrClient.IdentitiesL(idList));
       
    60 	idList.Close();
       
    61 	CheckFailL(err, _L("AuthServer::IdentitiesL()."));
       
    62 	
       
    63 	CleanupStack::PopAndDestroy(&authMgrClient);
       
    64 	}