contentmgmt/cafstreamingsupport/test/streamingtestagent/source/server/stasession.cpp
changeset 85 1efb81185f1c
parent 56 c11c717470d0
child 96 a71299154b21
equal deleted inserted replaced
77:956a80986d49 85:1efb81185f1c
    37  */
    37  */
    38 	{
    38 	{
    39 	delete iBuffer;	
    39 	delete iBuffer;	
    40 	delete iKeyStreamSink;
    40 	delete iKeyStreamSink;
    41 	delete iRo;
    41 	delete iRo;
    42 #ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
       
    43 	delete iSdp;
    42 	delete iSdp;
    44 	delete iSdpDoc;
    43 	delete iSdpDoc;
    45 #endif
       
    46 	}
    44 	}
    47 
    45 
    48 	
    46 	
    49 CStaSession* CStaSession::NewL(CStaServer& aServer)
    47 CStaSession* CStaSession::NewL(CStaServer& aServer)
    50 /**
    48 /**
   345 /**
   343 /**
   346  	Gets an SDP object from the client.
   344  	Gets an SDP object from the client.
   347  	@param	aMessage	Standard server-side handle to message.
   345  	@param	aMessage	Standard server-side handle to message.
   348   */
   346   */
   349 	{
   347 	{
   350 #ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
       
   351 	TInt len = aMessage.GetDesMaxLengthL(0);
   348 	TInt len = aMessage.GetDesMaxLengthL(0);
   352 	HBufC8* des = HBufC8::NewLC(len);
   349 	HBufC8* des = HBufC8::NewLC(len);
   353 	TPtr8 ptr(des->Des());
   350 	TPtr8 ptr(des->Des());
   354 	aMessage.ReadL(0,ptr);
   351 	aMessage.ReadL(0,ptr);
   355 	
   352 	
   365 	//Leave if no RO has been found
   362 	//Leave if no RO has been found
   366 	if(!iRo)
   363 	if(!iRo)
   367 		{
   364 		{
   368 		User::Leave(KErrCANoRights);
   365 		User::Leave(KErrCANoRights);
   369 		}
   366 		}
   370 #else
       
   371 	(void) aMessage;
       
   372 	User::Leave(KErrCANoRights);
       
   373 #endif
       
   374 	}
   367 	}
   375 
   368 
   376 void CStaSession::SetSdpDocumentL(const RMessage2& aMessage)
   369 void CStaSession::SetSdpDocumentL(const RMessage2& aMessage)
   377 /**
   370 /**
   378  	Sets the SDP document object coming from the client.
   371  	Sets the SDP document object coming from the client.
   379  	
   372  	
   380  	@param	aMessage	Standard server-side handle to message.
   373  	@param	aMessage	Standard server-side handle to message.
   381   */
   374   */
   382 	{
   375 	{
   383 #ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
       
   384 	TInt len = aMessage.GetDesMaxLengthL(0);
   376 	TInt len = aMessage.GetDesMaxLengthL(0);
   385 	HBufC8* des = HBufC8::NewLC(len);
   377 	HBufC8* des = HBufC8::NewLC(len);
   386 	TPtr8 ptr(des->Des());
   378 	TPtr8 ptr(des->Des());
   387 	aMessage.ReadL(0,ptr);
   379 	aMessage.ReadL(0,ptr);
   388 	
   380 	
   391 	iSdpDoc = NULL;
   383 	iSdpDoc = NULL;
   392 	
   384 	
   393 	// Decode the SDP document object from the encoded data
   385 	// Decode the SDP document object from the encoded data
   394 	iSdpDoc = CSdpDocument::DecodeL(*des);
   386 	iSdpDoc = CSdpDocument::DecodeL(*des);
   395 	CleanupStack::PopAndDestroy(des);
   387 	CleanupStack::PopAndDestroy(des);
   396 #else
       
   397 	(void) aMessage;
       
   398 #endif
       
   399 	}
   388 	}
   400 
   389 
   401 void CStaSession::VerifyRoL()
   390 void CStaSession::VerifyRoL()
   402 /**
   391 /**
   403  	Verifies that the rights object exists.
   392  	Verifies that the rights object exists.