contentmgmt/cafstreamingsupport/test/tscaf/source/tscafstep.cpp
branchRCL_3
changeset 96 a71299154b21
parent 95 641f389e9157
equal deleted inserted replaced
95:641f389e9157 96:a71299154b21
    14 // Implements the basic test step for the Streaming CAF test harness
    14 // Implements the basic test step for the Streaming CAF test harness
    15 // 
    15 // 
    16 //
    16 //
    17 
    17 
    18 #include "tscafstep.h"
    18 #include "tscafstep.h"
    19 #include "sdpconnectionfield.h"
    19 #ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
    20 #include "sdporiginfield.h"
    20 #include <sdpconnectionfield.h>
       
    21 #include <sdporiginfield.h>
       
    22 #endif
    21 
    23 
    22 TSdpAttribute::TSdpAttribute()
    24 TSdpAttribute::TSdpAttribute()
    23 	{
    25 	{
    24 	}
    26 	}
    25 
    27 
   117 	__UHEAP_MARKEND;
   119 	__UHEAP_MARKEND;
   118 	
   120 	
   119 	return TestStepResult();
   121 	return TestStepResult();
   120 	}
   122 	}
   121 
   123 
       
   124 #ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
   122 // We need this dummy function because TCleanupItem c'tor (see below) does not accept functions without parameters
   125 // We need this dummy function because TCleanupItem c'tor (see below) does not accept functions without parameters
   123 void CloseSdpCodecPool(TAny *)
   126 void CloseSdpCodecPool(TAny *)
   124 	{
   127 	{
   125 	SdpCodecStringPool::Close();
   128 	SdpCodecStringPool::Close();
   126 	}
   129 	}
   269 	//Add atrributes
   272 	//Add atrributes
   270 	AddAttributes2SdpL(*sdp, aSdpNum);
   273 	AddAttributes2SdpL(*sdp, aSdpNum);
   271 	
   274 	
   272 	return sdp;
   275 	return sdp;
   273 	}
   276 	}
       
   277 #endif
   274 
   278 
   275 CKeyStreamSink* CScafStep::CreateKeyStreamSinkLC(const TDesC& aFileName, const TDesC& aPrivPath)
   279 CKeyStreamSink* CScafStep::CreateKeyStreamSinkLC(const TDesC& aFileName, const TDesC& aPrivPath)
   276 /**
   280 /**
   277  	Creates a test key stream sink object.
   281  	Creates a test key stream sink object.
   278  	@param aFilePath The output file name of the test key stream sink.
   282  	@param aFilePath The output file name of the test key stream sink.
   310 /**
   314 /**
   311  	Delete the SDP document object and close the codec pool
   315  	Delete the SDP document object and close the codec pool
   312  	@param aSdp The SDP object which will be deleted.
   316  	@param aSdp The SDP object which will be deleted.
   313  */
   317  */
   314 	{
   318 	{
       
   319 #ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
   315 	delete reinterpret_cast<CSdpDocument *>(aSdpDoc);
   320 	delete reinterpret_cast<CSdpDocument *>(aSdpDoc);
   316 	SdpCodecStringPool::Close();
   321 	SdpCodecStringPool::Close();
       
   322 #else
       
   323 	(void) aSdpDoc;
       
   324 #endif
   317 	}
   325 	}
   318 
   326 
   319 void CScafStep::CopyFile2AgentsPrivateFolderL(RFs& aFs, const TDesC& aFileName, const TDesC& aPrivPath)
   327 void CScafStep::CopyFile2AgentsPrivateFolderL(RFs& aFs, const TDesC& aFileName, const TDesC& aPrivPath)
   320 /**
   328 /**
   321  	Copy a test file from Z drive to the private folder of the test agent server.
   329  	Copy a test file from Z drive to the private folder of the test agent server.
   346 	// Make the file writeable 
   354 	// Make the file writeable 
   347     User::LeaveIfError(fm->Attribs(*fTarget, 0, KEntryAttReadOnly, TTime(0), 0));
   355     User::LeaveIfError(fm->Attribs(*fTarget, 0, KEntryAttReadOnly, TTime(0), 0));
   348 	CleanupStack::PopAndDestroy(2, fTarget);
   356 	CleanupStack::PopAndDestroy(2, fTarget);
   349 	}
   357 	}
   350 
   358 
       
   359 #ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
   351 void CScafStep::AddAttributes2SdpL(CSdpMediaField& aSdp, TInt aSdpNum)
   360 void CScafStep::AddAttributes2SdpL(CSdpMediaField& aSdp, TInt aSdpNum)
   352 /**
   361 /**
   353  * Add attributes from the instance within the CSdpConfiguration array, where 
   362  * Add attributes from the instance within the CSdpConfiguration array, where 
   354  * the attribute information is stored, into the SDP object being constructed.
   363  * the attribute information is stored, into the SDP object being constructed.
   355  * @param aSdp The SDP object where the attribute is added.
   364  * @param aSdp The SDP object where the attribute is added.
   393 			CleanupStack::Pop(fmtpAttribute);
   402 			CleanupStack::Pop(fmtpAttribute);
   394 			}
   403 			}
   395 		CleanupStack::PopAndDestroy(3);
   404 		CleanupStack::PopAndDestroy(3);
   396 		}//for
   405 		}//for
   397 	}//End of function
   406 	}//End of function
       
   407 #endif
   398 
   408 
   399 void CScafStep::PrintErrorAndLeaveL(TDesC& aKey)
   409 void CScafStep::PrintErrorAndLeaveL(TDesC& aKey)
   400 /**
   410 /**
   401  	Prints an error message and then leaves with not found error.
   411  	Prints an error message and then leaves with not found error.
   402  	@param aKey The name of the key which is not found.
   412  	@param aKey The name of the key which is not found.