telephonyserverplugins/common_tsy/test/component/src/cctsyprivacyfu.cpp
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2007-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 // The TEFUnit test suite for Privacy in the Common TSY.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20 */
       
    21 #include "cctsyprivacyfu.h"
       
    22 #include <etel.h>
       
    23 #include <etelmm.h>
       
    24 #include <et_clsvr.h>
       
    25 #include <ctsy/mmtsy_names.h>
       
    26 #include <ctsy/serviceapi/mmtsy_ipcdefs.h>
       
    27 #include "tmockltsydata.h"
       
    28 #include <ctsy/serviceapi/gsmerror.h>
       
    29 
       
    30 CTestSuite* CCTsyPrivacyFU::CreateSuiteL(const TDesC& aName)
       
    31 	{
       
    32 	SUB_SUITE;
       
    33 
       
    34 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestSetPrivacy0001L);
       
    35 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestSetPrivacy0006L);
       
    36 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestSetPrivacy0011L);
       
    37 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyPrivacyConfirmation0001L);
       
    38 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyPrivacyConfirmation0002L);
       
    39 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyPrivacyConfirmation0004L);
       
    40 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyPrivacyConfirmation0006L);
       
    41 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyPrivacyConfirmation0007L);
       
    42 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyPrivacyConfirmation0009L);
       
    43 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyPrivacyConfirmation00011L);
       
    44 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyPrivacyConfirmation00012L);
       
    45 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyPrivacyConfirmation00014L);
       
    46 
       
    47 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestGetDefaultPrivacy0001L);
       
    48 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestSetDefaultPrivacy0001L);
       
    49 	ADD_TEST_STEP_ISO_CPP(CCTsyPrivacyFU, TestNotifyDefaultPrivacyChange0001L);
       
    50 
       
    51 	END_SUITE;
       
    52 	}
       
    53 
       
    54 
       
    55 void CCTsyPrivacyFU::DoSetPrivacyL(const TDesC& aLineName,RMobilePhone::TMobilePhonePrivacy aPrivacySetting)
       
    56 	{
       
    57 	OpenEtelServerL(EUseExtendedError);
       
    58 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
    59 	OpenPhoneL();
       
    60 
       
    61 	RLine line;
       
    62 	TInt err = line.Open(iPhone, aLineName);
       
    63 	ASSERT_EQUALS(KErrNone, err)
       
    64 	CleanupClosePushL(line);
       
    65 	
       
    66 	RMobileCall mobileCall;
       
    67 	err = mobileCall.OpenNewCall(line);
       
    68 	ASSERT_EQUALS(KErrNone, err)
       
    69 	CleanupClosePushL(mobileCall);
       
    70 	
       
    71 	// EMobileCallSetPrivacy is not passed to LTSY
       
    72 	// CTSY returns KErrNotSupported immediately
       
    73 	err = mobileCall.SetPrivacy(aPrivacySetting);
       
    74 	ASSERT_EQUALS(KErrNotSupported, err);
       
    75 
       
    76 	AssertMockLtsyStatusL();
       
    77 
       
    78 	CleanupStack::PopAndDestroy(3, this); // mobileCall, line, this	
       
    79 
       
    80 	}
       
    81 
       
    82 
       
    83 void CCTsyPrivacyFU::DoNotifyPrivacyConfirmationL(const TDesC& aLineName)
       
    84 	{
       
    85 	OpenEtelServerL(EUseExtendedError);
       
    86 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
    87 	OpenPhoneL();
       
    88 
       
    89 	RLine line;
       
    90 	RMobileCall mobileCall;
       
    91 
       
    92 	TInt err = line.Open(iPhone, aLineName);
       
    93 	ASSERT_EQUALS(KErrNone, err)
       
    94 	CleanupClosePushL(line);
       
    95 	
       
    96 	err = mobileCall.OpenNewCall(line);
       
    97 	ASSERT_EQUALS(KErrNone, err)
       
    98 	CleanupClosePushL(mobileCall);
       
    99 
       
   100  	//-------------------------------------------------------------------------
       
   101 	// TEST C: Successful completion request of
       
   102 	// RMobileCall::NotifyPrivacyConfirmation when result is not cached.
       
   103  	//-------------------------------------------------------------------------
       
   104 
       
   105 	// invoke RMobilePhone::NotifyPrivacyConfirmation
       
   106 	TRequestStatus notifyStatus;
       
   107 
       
   108 	// initialize the variable to be set by CTSY with the value other than passed to MockLTSY
       
   109 	RMobilePhone::TMobilePhonePrivacy privacy = RMobilePhone::EPrivacyOn;
       
   110 	mobileCall.NotifyPrivacyConfirmation(notifyStatus,privacy);
       
   111 
       
   112 	// prepare the data to be returned from MockLTSY
       
   113 	RMobilePhone::TMobilePhonePrivacy privacySetting = RMobilePhone::EPrivacyUnspecified;
       
   114 	TMockLtsyCallData1<RMobilePhone::TMobilePhonePrivacy> privacySettingData(privacySetting);
       
   115 
       
   116 	RBuf8 data;
       
   117 	CleanupClosePushL(data);
       
   118 	privacySettingData.SerialiseL(data);
       
   119 
       
   120 	// trigger EMobileCallNotifyPrivacyConfirmation completion via MockLTSY 
       
   121 	TRequestStatus mockLtsyStatus;
       
   122 	iMockLTSY.NotifyTerminated(mockLtsyStatus); 
       
   123 	iMockLTSY.CompleteL(EMobileCallNotifyPrivacyConfirmation, KErrNone,data);
       
   124 	User::WaitForRequest(mockLtsyStatus);
       
   125 	ASSERT_EQUALS(KErrNone,mockLtsyStatus.Int());
       
   126 
       
   127 	// wait for RMobilePhone::NotifyPrivacyConfirmation completion
       
   128 	User::WaitForRequest(notifyStatus);
       
   129 
       
   130 	ASSERT_EQUALS(KErrNone,notifyStatus.Int());
       
   131 	ASSERT_EQUALS(RMobilePhone::EPrivacyUnspecified, privacy);
       
   132 	AssertMockLtsyStatusL();
       
   133 	
       
   134  	//-------------------------------------------------------------------------
       
   135 	// TEST E: Unsolicited completion of RMobileCall::NotifyPrivacyConfirmation
       
   136 	// from LTSY.
       
   137  	//-------------------------------------------------------------------------
       
   138 
       
   139 	iMockLTSY.NotifyTerminated(mockLtsyStatus); 
       
   140 	iMockLTSY.CompleteL(EMobileCallNotifyPrivacyConfirmation, KErrNone,data);
       
   141 	User::WaitForRequest(mockLtsyStatus);
       
   142 	ASSERT_EQUALS(KErrNone,mockLtsyStatus.Int());
       
   143 	AssertMockLtsyStatusL();
       
   144 
       
   145 	CleanupStack::PopAndDestroy(4, this); // data, mobileCall, line, this
       
   146 	}
       
   147 
       
   148 
       
   149 void CCTsyPrivacyFU::DoCancelNotifyPrivacyConfirmationL(const TDesC& aLineName)
       
   150 	{
       
   151 	OpenEtelServerL(EUseExtendedError);
       
   152 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   153 	OpenPhoneL();
       
   154 
       
   155 	RLine line;
       
   156 	RMobileCall mobileCall;
       
   157 
       
   158 	TInt err = line.Open(iPhone, aLineName);
       
   159 	ASSERT_EQUALS(KErrNone, err)
       
   160 	CleanupClosePushL(line);
       
   161 	
       
   162 	err = mobileCall.OpenNewCall(line);
       
   163 	ASSERT_EQUALS(KErrNone, err)
       
   164     CleanupClosePushL(mobileCall);
       
   165 
       
   166  	//-------------------------------------------------------------------------
       
   167 	// Test cancelling of RMobileCall::NotifyPrivacyConfirmation
       
   168  	//-------------------------------------------------------------------------
       
   169 	TRequestStatus notifyStatus;
       
   170 
       
   171 	RMobilePhone::TMobilePhonePrivacy privacy;
       
   172 	mobileCall.NotifyPrivacyConfirmation(notifyStatus,privacy);
       
   173 	mobileCall.CancelAsyncRequest(EMobileCallNotifyPrivacyConfirmation);
       
   174 	User::WaitForRequest(notifyStatus);
       
   175 
       
   176     ASSERT_EQUALS(KErrCancel, notifyStatus.Int());
       
   177 
       
   178 	AssertMockLtsyStatusL(); // just in case
       
   179 
       
   180 	CleanupStack::PopAndDestroy(3); // mobileCall, line, this
       
   181 	}
       
   182 	
       
   183 void CCTsyPrivacyFU::DoMultiNotifyPrivacyConfirmationL(const TDesC& aLineName)
       
   184 	{
       
   185 	//-------------------------------------------------------------------------
       
   186 	// Test A: Test multiple clients requesting RMobileCall::NotifyPrivacyConfirmation
       
   187  	//-------------------------------------------------------------------------
       
   188 
       
   189 	// Open first client					
       
   190 	OpenEtelServerL(EUseExtendedError);
       
   191 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   192 	OpenPhoneL();
       
   193 
       
   194 	RLine line1;
       
   195 	TInt err = line1.Open(iPhone, aLineName);
       
   196 	ASSERT_EQUALS(KErrNone, err)
       
   197     CleanupClosePushL(line1);
       
   198 	
       
   199 	RMobileCall mobileCall1;
       
   200 	err = mobileCall1.OpenNewCall(line1);
       
   201 	ASSERT_EQUALS(KErrNone, err)
       
   202     CleanupClosePushL(mobileCall1);
       
   203 
       
   204 	// Open second client
       
   205 	RTelServer telServer2;
       
   206 	TInt ret = telServer2.Connect();
       
   207 	ASSERT_EQUALS(KErrNone, ret);
       
   208 	CleanupClosePushL(telServer2);
       
   209 
       
   210 	RMobilePhone phone2;
       
   211 	ret = phone2.Open(telServer2,KMmTsyPhoneName);
       
   212 	ASSERT_EQUALS(KErrNone, ret);
       
   213 	CleanupClosePushL(phone2);
       
   214 
       
   215 	RLine line2;
       
   216 	err = line2.Open(phone2, aLineName);
       
   217 	ASSERT_EQUALS(KErrNone, err)
       
   218     CleanupClosePushL(line2);
       
   219 	
       
   220 	RMobileCall mobileCall2;
       
   221 	err = mobileCall2.OpenNewCall(line2);
       
   222 	ASSERT_EQUALS(KErrNone, err)
       
   223     CleanupClosePushL(mobileCall2);
       
   224 
       
   225 	// initialize variables with values other than passed to MockLTSY
       
   226 	RMobilePhone::TMobilePhonePrivacy privacy1 = RMobilePhone::EPrivacyOn;
       
   227 	RMobilePhone::TMobilePhonePrivacy privacy2 = RMobilePhone::EPrivacyOff;
       
   228 
       
   229 	// request notifications
       
   230 	TRequestStatus notifyStatus1;
       
   231 	TRequestStatus notifyStatus2;
       
   232 
       
   233 	mobileCall1.NotifyPrivacyConfirmation(notifyStatus1,privacy1);
       
   234 	mobileCall2.NotifyPrivacyConfirmation(notifyStatus2,privacy2);
       
   235 
       
   236 	// trigger EMobileCallNotifyPrivacyConfirmation completion via MockLTSY 
       
   237 	RMobilePhone::TMobilePhonePrivacy privacySetting = RMobilePhone::EPrivacyUnspecified;
       
   238 	TMockLtsyCallData1<RMobilePhone::TMobilePhonePrivacy> privacySettingData(privacySetting);
       
   239 
       
   240 	RBuf8 data;
       
   241 	CleanupClosePushL(data);
       
   242 	privacySettingData.SerialiseL(data);
       
   243 
       
   244 	TRequestStatus mockLtsyStatus;
       
   245 	iMockLTSY.NotifyTerminated(mockLtsyStatus); 
       
   246 	iMockLTSY.CompleteL(EMobileCallNotifyPrivacyConfirmation, KErrNone,data);
       
   247 	User::WaitForRequest(mockLtsyStatus);
       
   248 	CleanupStack::PopAndDestroy(1,&data); // data
       
   249 	ASSERT_EQUALS(KErrNone,mockLtsyStatus.Int());
       
   250 
       
   251 	
       
   252 	// wait for both notifications
       
   253 	User::WaitForRequest(notifyStatus1);
       
   254 	ASSERT_EQUALS(KErrNone,notifyStatus1.Int());
       
   255     ASSERT_EQUALS(RMobilePhone::EPrivacyUnspecified, privacy1);
       
   256 
       
   257 	User::WaitForRequest(notifyStatus2);
       
   258 	ASSERT_EQUALS(KErrNone,notifyStatus2.Int());
       
   259     ASSERT_EQUALS(RMobilePhone::EPrivacyUnspecified, privacy2);
       
   260 
       
   261 	// cleanup second client
       
   262 	CleanupStack::PopAndDestroy(4,&telServer2); // mobileCall2, line2, phone2, telServer2
       
   263 
       
   264 	AssertMockLtsyStatusL();
       
   265 	
       
   266 	// cleanup first client
       
   267 	CleanupStack::PopAndDestroy(3, this); // mobileCall1, line1, this
       
   268 	}
       
   269 
       
   270 
       
   271 //
       
   272 // Actual test cases
       
   273 //
       
   274 
       
   275 
       
   276 /**
       
   277 @SYMTestCaseID BA-CTSY-PRI-CSP-0001
       
   278 @SYMComponent  telephony_ctsy
       
   279 @SYMTestCaseDesc Test support in CTSY for RMobileCall::SetPrivacy for voice calls
       
   280 @SYMTestPriority High
       
   281 @SYMTestActions Invokes RMobileCall::SetPrivacy for voice calls
       
   282 @SYMTestExpectedResults Pass
       
   283 @SYMTestType CT
       
   284 */
       
   285 void CCTsyPrivacyFU::TestSetPrivacy0001L()
       
   286 	{
       
   287 	DoSetPrivacyL(KMmTsyVoice1LineName,RMobilePhone::EPrivacyOn);	
       
   288 	}
       
   289 
       
   290 
       
   291 /**
       
   292 @SYMTestCaseID BA-CTSY-PRI-CSP-0006
       
   293 @SYMComponent  telephony_ctsy
       
   294 @SYMTestCaseDesc Test support in CTSY for RMobileCall::SetPrivacy for data calls
       
   295 @SYMTestPriority High
       
   296 @SYMTestActions Invokes RMobileCall::SetPrivacy for data calls
       
   297 @SYMTestExpectedResults Pass
       
   298 @SYMTestType CT
       
   299 */
       
   300 void CCTsyPrivacyFU::TestSetPrivacy0006L()
       
   301 	{
       
   302 	DoSetPrivacyL(KMmTsyDataLineName,RMobilePhone::EPrivacyOn);
       
   303 	}
       
   304 
       
   305 
       
   306 /**
       
   307 @SYMTestCaseID BA-CTSY-PRI-CSP-0011
       
   308 @SYMComponent  telephony_ctsy
       
   309 @SYMTestCaseDesc Test support in CTSY for RMobileCall::SetPrivacy for fax calls
       
   310 @SYMTestPriority High
       
   311 @SYMTestActions Invokes RMobileCall::SetPrivacy for fax calls
       
   312 @SYMTestExpectedResults Pass
       
   313 @SYMTestType CT
       
   314 */
       
   315 void CCTsyPrivacyFU::TestSetPrivacy0011L()
       
   316 	{
       
   317 	DoSetPrivacyL(KMmTsyFaxLineName,RMobilePhone::EPrivacyOn);
       
   318 	}
       
   319 
       
   320 
       
   321 /**
       
   322 @SYMTestCaseID BA-CTSY-PRI-CNPC-0001
       
   323 @SYMComponent  telephony_ctsy
       
   324 @SYMTestCaseDesc Test support in CTSY for RMobileCall::NotifyPrivacyConfirmation for voice calls
       
   325 @SYMTestPriority High
       
   326 @SYMTestActions Invokes RMobileCall::NotifyPrivacyConfirmation for voice calls
       
   327 @SYMTestExpectedResults Pass
       
   328 @SYMTestType CT
       
   329 */
       
   330 void CCTsyPrivacyFU::TestNotifyPrivacyConfirmation0001L()
       
   331 	{
       
   332 	DoNotifyPrivacyConfirmationL(KMmTsyVoice1LineName);	
       
   333 	}
       
   334 
       
   335 
       
   336 /**
       
   337 @SYMTestCaseID BA-CTSY-PRI-CNPC-0002
       
   338 @SYMComponent  telephony_ctsy
       
   339 @SYMTestCaseDesc Test support in CTSY for cancelling of RMobileCall::NotifyPrivacyConfirmation for voice calls
       
   340 @SYMTestPriority High
       
   341 @SYMTestActions Invokes cancelling of RMobileCall::NotifyPrivacyConfirmation for voice calls
       
   342 @SYMTestExpectedResults Pass
       
   343 @SYMTestType CT
       
   344 */
       
   345 void CCTsyPrivacyFU::TestNotifyPrivacyConfirmation0002L()
       
   346 	{
       
   347 	DoCancelNotifyPrivacyConfirmationL(KMmTsyVoice1LineName);
       
   348 	}
       
   349 
       
   350 
       
   351 /**
       
   352 @SYMTestCaseID BA-CTSY-PRI-CNPC-0004
       
   353 @SYMComponent  telephony_ctsy
       
   354 @SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileCall::NotifyPrivacyConfirmation for voice calls
       
   355 @SYMTestPriority High
       
   356 @SYMTestActions Invokes multiple client requests to RMobileCall::NotifyPrivacyConfirmation for voice calls
       
   357 @SYMTestExpectedResults Pass
       
   358 @SYMTestType CT
       
   359 */
       
   360 void CCTsyPrivacyFU::TestNotifyPrivacyConfirmation0004L()
       
   361 	{
       
   362 	DoMultiNotifyPrivacyConfirmationL(KMmTsyVoice1LineName);	
       
   363 	}
       
   364 
       
   365 
       
   366 /**
       
   367 @SYMTestCaseID BA-CTSY-PRI-CNPC-0006
       
   368 @SYMComponent  telephony_ctsy
       
   369 @SYMTestCaseDesc Test support in CTSY for RMobileCall::NotifyPrivacyConfirmation for data calls
       
   370 @SYMTestPriority High
       
   371 @SYMTestActions Invokes RMobileCall::NotifyPrivacyConfirmation for data calls
       
   372 @SYMTestExpectedResults Pass
       
   373 @SYMTestType CT
       
   374 */
       
   375 void CCTsyPrivacyFU::TestNotifyPrivacyConfirmation0006L()
       
   376 	{
       
   377 	DoNotifyPrivacyConfirmationL(KMmTsyDataLineName);	
       
   378 	}
       
   379 
       
   380 
       
   381 /**
       
   382 @SYMTestCaseID BA-CTSY-PRI-CNPC-0007
       
   383 @SYMComponent  telephony_ctsy
       
   384 @SYMTestCaseDesc Test support in CTSY for cancelling of RMobileCall::NotifyPrivacyConfirmation for data calls
       
   385 @SYMTestPriority High
       
   386 @SYMTestActions Invokes cancelling of RMobileCall::NotifyPrivacyConfirmation for data calls
       
   387 @SYMTestExpectedResults Pass
       
   388 @SYMTestType CT
       
   389 */
       
   390 void CCTsyPrivacyFU::TestNotifyPrivacyConfirmation0007L()
       
   391 	{
       
   392 	DoCancelNotifyPrivacyConfirmationL(KMmTsyDataLineName);
       
   393 	}
       
   394 
       
   395 
       
   396 /**
       
   397 @SYMTestCaseID BA-CTSY-PRI-CNPC-0009
       
   398 @SYMComponent  telephony_ctsy
       
   399 @SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileCall::NotifyPrivacyConfirmation for data calls
       
   400 @SYMTestPriority High
       
   401 @SYMTestActions Invokes multiple client requests to RMobileCall::NotifyPrivacyConfirmation for data calls
       
   402 @SYMTestExpectedResults Pass
       
   403 @SYMTestType CT
       
   404 */
       
   405 void CCTsyPrivacyFU::TestNotifyPrivacyConfirmation0009L()
       
   406 	{
       
   407 	DoMultiNotifyPrivacyConfirmationL(KMmTsyDataLineName);	
       
   408 	}
       
   409 
       
   410 
       
   411 /**
       
   412 @SYMTestCaseID BA-CTSY-PRI-CNPC-00011
       
   413 @SYMComponent  telephony_ctsy
       
   414 @SYMTestCaseDesc Test support in CTSY for RMobileCall::NotifyPrivacyConfirmation for fax calls
       
   415 @SYMTestPriority High
       
   416 @SYMTestActions Invokes RMobileCall::NotifyPrivacyConfirmation for fax calls
       
   417 @SYMTestExpectedResults Pass
       
   418 @SYMTestType CT
       
   419 */
       
   420 void CCTsyPrivacyFU::TestNotifyPrivacyConfirmation00011L()
       
   421 	{
       
   422 	DoNotifyPrivacyConfirmationL(KMmTsyFaxLineName);	
       
   423 	}
       
   424 
       
   425 
       
   426 /**
       
   427 @SYMTestCaseID BA-CTSY-PRI-CNPC-00012
       
   428 @SYMComponent  telephony_ctsy
       
   429 @SYMTestCaseDesc Test support in CTSY for cancelling of RMobileCall::NotifyPrivacyConfirmation for fax calls
       
   430 @SYMTestPriority High
       
   431 @SYMTestActions Invokes cancelling of RMobileCall::NotifyPrivacyConfirmation for fax calls
       
   432 @SYMTestExpectedResults Pass
       
   433 @SYMTestType CT
       
   434 */
       
   435 void CCTsyPrivacyFU::TestNotifyPrivacyConfirmation00012L()
       
   436 	{
       
   437 	DoCancelNotifyPrivacyConfirmationL(KMmTsyFaxLineName);
       
   438 	}
       
   439 
       
   440 /**
       
   441 @SYMTestCaseID BA-CTSY-PRI-CNPC-00014
       
   442 @SYMComponent  telephony_ctsy
       
   443 @SYMTestCaseDesc Test support in CTSY for multiple client requests to RMobileCall::NotifyPrivacyConfirmation for fax calls
       
   444 @SYMTestPriority High
       
   445 @SYMTestActions Invokes multiple client requests to RMobileCall::NotifyPrivacyConfirmation for fax calls
       
   446 @SYMTestExpectedResults Pass
       
   447 @SYMTestType CT
       
   448 */
       
   449 void CCTsyPrivacyFU::TestNotifyPrivacyConfirmation00014L()
       
   450 	{
       
   451 	DoMultiNotifyPrivacyConfirmationL(KMmTsyFaxLineName);	
       
   452 	}
       
   453 
       
   454 
       
   455 /**
       
   456 @SYMTestCaseID BA-CTSY-PRI-MGDP-0001
       
   457 @SYMComponent  telephony_ctsy
       
   458 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetDefaultPrivacy
       
   459 @SYMTestPriority High
       
   460 @SYMTestActions Invokes RMobilePhone::GetDefaultPrivacy
       
   461 @SYMTestExpectedResults Pass
       
   462 @SYMTestType CT
       
   463 */
       
   464 void CCTsyPrivacyFU::TestGetDefaultPrivacy0001L()
       
   465 	{
       
   466 
       
   467 	OpenEtelServerL(EUseExtendedError);
       
   468 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   469 	OpenPhoneL();
       
   470 
       
   471 	// EMobilePhoneGetDefaultPrivacy is not passed to LTSY
       
   472 	// CTSY returns KErrNotSupported immediately
       
   473 	RMobilePhone::TMobilePhonePrivacy privacy;
       
   474 	TInt err = iPhone.GetDefaultPrivacy(privacy);
       
   475 	ASSERT_EQUALS(KErrNotSupported, err);
       
   476 	
       
   477 	AssertMockLtsyStatusL();
       
   478 
       
   479 	CleanupStack::PopAndDestroy(1, this); // data, this
       
   480 	
       
   481 	}
       
   482 
       
   483 
       
   484 /**
       
   485 @SYMTestCaseID BA-CTSY-PRI-MSDP-0001
       
   486 @SYMComponent  telephony_ctsy
       
   487 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::SetDefaultPrivacy
       
   488 @SYMTestPriority High
       
   489 @SYMTestActions Invokes RMobilePhone::SetDefaultPrivacy
       
   490 @SYMTestExpectedResults Pass
       
   491 @SYMTestType CT
       
   492 */
       
   493 void CCTsyPrivacyFU::TestSetDefaultPrivacy0001L()
       
   494 	{
       
   495 
       
   496 	OpenEtelServerL(EUseExtendedError);
       
   497 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   498 	OpenPhoneL();
       
   499 
       
   500 	// EMobilePhoneSetDefaultPrivacy is not passed to LTSY
       
   501 	// CTSY returns KErrNotSupported immediately
       
   502 	TRequestStatus requestStatus;
       
   503 	RMobilePhone::TMobilePhonePrivacy privacy = RMobilePhone::EPrivacyOn;
       
   504 	iPhone.SetDefaultPrivacy(requestStatus,privacy);
       
   505 	User::WaitForRequest(requestStatus);
       
   506 	ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
       
   507 
       
   508 	AssertMockLtsyStatusL();
       
   509 	CleanupStack::PopAndDestroy(1, this); // data, this
       
   510 	
       
   511 	}
       
   512 
       
   513 
       
   514 /**
       
   515 @SYMTestCaseID BA-CTSY-PRI-MNDPC-0001
       
   516 @SYMComponent  telephony_ctsy
       
   517 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::NotifyDefaultPrivacyChange
       
   518 @SYMTestPriority High
       
   519 @SYMTestActions Invokes RMobilePhone::NotifyDefaultPrivacyChange
       
   520 @SYMTestExpectedResults Pass
       
   521 @SYMTestType CT
       
   522 */
       
   523 void CCTsyPrivacyFU::TestNotifyDefaultPrivacyChange0001L()
       
   524 	{
       
   525 
       
   526 	OpenEtelServerL(EUseExtendedError);
       
   527 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   528 	OpenPhoneL();
       
   529 
       
   530 	// EMobilePhoneNotifyDefaultPrivacyChange is not passed to LTSY
       
   531 	// CTSY returns KErrNotSupported immediately
       
   532 	TRequestStatus requestStatus;
       
   533 	RMobilePhone::TMobilePhonePrivacy privacy;
       
   534 	iPhone.NotifyDefaultPrivacyChange(requestStatus,privacy);
       
   535 	User::WaitForRequest(requestStatus);
       
   536 	ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
       
   537 
       
   538 	AssertMockLtsyStatusL();
       
   539 
       
   540 	CleanupStack::PopAndDestroy(1, this); // data, this
       
   541 	
       
   542 	}
       
   543 
       
   544 
       
   545