24
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// This is the cpp file for MM Authenticate
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
*/
|
|
21 |
|
|
22 |
#include <e32base.h>
|
|
23 |
|
|
24 |
#include "ETELMM.H"
|
|
25 |
|
|
26 |
#include "testdef.h"
|
|
27 |
|
|
28 |
#include "TE_mmauthenticate.h"
|
|
29 |
|
|
30 |
|
|
31 |
CEtelMMTestAuthenticate::CEtelMMTestAuthenticate()
|
|
32 |
{
|
|
33 |
// store the name of this test case
|
|
34 |
SetTestStepName(_L("TestAuthenticate"));
|
|
35 |
}
|
|
36 |
|
|
37 |
// destructor
|
|
38 |
CEtelMMTestAuthenticate::~CEtelMMTestAuthenticate()
|
|
39 |
{
|
|
40 |
}
|
|
41 |
|
|
42 |
enum TVerdict CEtelMMTestAuthenticate::doTestStepL( void )
|
|
43 |
/**
|
|
44 |
* Test step Authenticate
|
|
45 |
*
|
|
46 |
*/
|
|
47 |
{
|
|
48 |
__UHEAP_MARK;
|
|
49 |
TInt ret;
|
|
50 |
RMobilePhone phone;
|
|
51 |
ret=phone.Open(iTelServer,DMMTSY_PHONE_NAMEAUTH1);
|
|
52 |
TEST(ret==KErrNone);
|
|
53 |
// start sanity test for
|
|
54 |
// 2.4 REQ3877 Enable retrieval of the IMS authentication parameters
|
|
55 |
|
|
56 |
TRequestStatus reqStatus;
|
|
57 |
RMobilePhone::TImsAuthenticateDataV5 authenticateData;
|
|
58 |
authenticateData.iAUTN=DMMTSY_PHONE_AUTN_IN;
|
|
59 |
authenticateData.iRAND=DMMTSY_PHONE_RAND_IN;
|
|
60 |
authenticateData.iRES=DMMTSY_PHONE_RES_IN;
|
|
61 |
authenticateData.iIK=DMMTSY_PHONE_IK_IN;
|
|
62 |
authenticateData.iCK=DMMTSY_PHONE_CK_IN;
|
|
63 |
authenticateData.iAUTS=DMMTSY_PHONE_AUTS_IN;
|
|
64 |
|
|
65 |
|
|
66 |
RMobilePhone::TImsAuthenticateDataV5Pckg authenticateDataPckgd(authenticateData);
|
|
67 |
phone.ImsAuthenticate (reqStatus,authenticateDataPckgd);
|
|
68 |
User::WaitForRequest(reqStatus);
|
|
69 |
TEST(reqStatus==KErrNone);
|
|
70 |
TEST(authenticateData.iAUTN==DMMTSY_PHONE_AUTN_OUT);
|
|
71 |
TEST(authenticateData.iRAND==DMMTSY_PHONE_RAND_OUT);
|
|
72 |
TEST(authenticateData.iRES==DMMTSY_PHONE_RES_OUT);
|
|
73 |
TEST(authenticateData.iIK==DMMTSY_PHONE_IK_OUT);
|
|
74 |
TEST(authenticateData.iCK==DMMTSY_PHONE_CK_OUT);
|
|
75 |
TEST(authenticateData.iAUTS==DMMTSY_PHONE_AUTS_OUT);
|
|
76 |
|
|
77 |
|
|
78 |
authenticateData.iAUTN=DMMTSY_PHONE_AUTN_IN;
|
|
79 |
authenticateData.iRAND=DMMTSY_PHONE_RAND_IN;
|
|
80 |
|
|
81 |
phone.ImsAuthenticate(reqStatus,authenticateDataPckgd);
|
|
82 |
phone.CancelAsyncRequest(EMobilePhoneIMSAuthenticate);
|
|
83 |
User::WaitForRequest(reqStatus);
|
|
84 |
TEST(reqStatus==KErrCancel);
|
|
85 |
|
|
86 |
|
|
87 |
phone.Close();
|
|
88 |
// end sanity test for
|
|
89 |
// 2.4 REQ3877 Enable retrieval of the IMS authentication parameters
|
|
90 |
__UHEAP_MARKEND;
|
|
91 |
|
|
92 |
return TestStepResult();
|
|
93 |
}
|
|
94 |
|
|
95 |
|