contentmgmt/referencedrmagent/RefTestAgent/streamingrefagent/source/server/srasession.cpp
changeset 19 cd501b96611d
parent 8 35751d3474b7
child 61 641f389e9157
--- a/contentmgmt/referencedrmagent/RefTestAgent/streamingrefagent/source/server/srasession.cpp	Mon Oct 12 10:17:04 2009 +0300
+++ b/contentmgmt/referencedrmagent/RefTestAgent/streamingrefagent/source/server/srasession.cpp	Fri Nov 06 13:21:00 2009 +0200
@@ -23,7 +23,9 @@
 #include "sraprocessor.h"
 #include "srautils.h"
 #include <s32file.h>
+#ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
 #include <sdpconnectionfield.h>
+#endif
 
 CSraSession::CSraSession()
 //constructor
@@ -40,8 +42,10 @@
 		
 	delete iKeyStreamSink;
 	delete iRo;
+#ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
 	delete iSdp;
 	delete iSdpDoc;
+#endif
 	delete iProcessor;
 	iMutex.Close();
 	}
@@ -327,6 +331,7 @@
  	@param	aMessage	Standard server-side handle to message.
   */
 	{
+#ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
 	TInt len = aMessage.GetDesMaxLengthL(0);
 	HBufC8* des = HBufC8::NewLC(len);
 	TPtr8 ptr(des->Des());
@@ -350,6 +355,10 @@
 		}
 	StartProcessorL();
 	aMessage.Complete(KErrNone);
+#else
+	(void) aMessage;
+	User::Leave(KErrCANoRights);
+#endif
 	}
 
 
@@ -360,6 +369,7 @@
  	@param	aMessage	Standard server-side handle to message.
   */
 	{
+#ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
 	TInt len = aMessage.GetDesMaxLengthL(0);
 	HBufC8* des = HBufC8::NewLC(len);
 	TPtr8 ptr(des->Des());
@@ -374,6 +384,9 @@
 	CleanupStack::PopAndDestroy(des);
 	
 	aMessage.Complete(KErrNone);
+#else
+	(void) aMessage;
+#endif
 	}
 
 
@@ -383,6 +396,7 @@
  	and then process that by using the key stream sink.
  */
 	{
+#ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
 	// Mutex is used to synchronise the agent with the test harness.
 	// A real-life agent should not need to use a mutex object.
 	User::LeaveIfError(iMutex.CreateGlobal(KSraMutexName));
@@ -419,4 +433,5 @@
 	
 	// Launch the processor
 	iProcessor->StartProcessing();
+#endif
 	}