contentmgmt/cafstreamingsupport/test/streamingtestagent/inc/stacommon.h
branchRCL_3
changeset 43 2f10d260163b
child 61 641f389e9157
equal deleted inserted replaced
42:eb9b28acd381 43:2f10d260163b
       
     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 the License "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 // Information shared between the Streaming Test Agent client and server implementations.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21  @test
       
    22 */
       
    23 
       
    24 #ifndef STACOMMON_H_
       
    25 #define STACOMMON_H_
       
    26 
       
    27 #include <e32base.h>
       
    28 #include <e32std.h>
       
    29 #include <e32cmn.h>
       
    30 #include <e32ver.h>
       
    31 #include <e32uid.h>
       
    32 #include <s32mem.h>
       
    33 #include <stringpool.h>
       
    34 #ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
       
    35 #include <sdpdocument.h>
       
    36 #include <sdpmediafield.h>
       
    37 #include <sdpattributefield.h>
       
    38 #include <sdpcodecstringpool.h>
       
    39 #include <sdpfmtattributefield.h>
       
    40 #include <sdpcodecstringconstants.h>
       
    41 #endif
       
    42 #include <caf/streaming/streamcaftypes.h>
       
    43 #include <caf/streaming/keyassociation.h>
       
    44 #include <caf/streaming/keystreamsink.h>
       
    45 #include <caf/caferr.h>
       
    46 
       
    47 namespace StreamAccess
       
    48 	{
       
    49 	_LIT(KStaName, "StreamingTestAgent");		///< Identifies Streaming Test Agent server.
       
    50 
       
    51 	const TInt KStaVerMajor = 1;		///< Streaming Test Agent version major component.
       
    52 	const TInt KStaVerMinor = 0;		///< Streaming Test Agent version minor component.
       
    53 	const TInt KStaVerBuild = 0;		///< Streaming Test Agent version build component.
       
    54 
       
    55 	inline TVersion StaVersion();
       
    56 		
       
    57 	/**
       
    58 		Executable which hosts the Streaming Test Agent.  Required to launch the process.
       
    59 
       
    60 		@see KUidStreamingTestAgent
       
    61 	*/
       
    62 	_LIT(KStaImageName, "staserver.exe");
       
    63 		
       
    64 	/**
       
    65 		Hosting the executable's secure ID.  Required to launch the process.
       
    66 
       
    67 		@see KStreamingTestAgentImageName
       
    68 	 */
       
    69 	const TUid KUidStreamingTestAgent = {0x1028588B};
       
    70 		
       
    71 	inline TUidType StaImageFullUid();
       
    72 	 		
       
    73 	/**
       
    74 		Delay in microseconds before the Streaming Test Agent server is shut down, after
       
    75 		the last remaining session has been closed.
       
    76 	 */
       
    77 	const TInt KStaShutdownPeriod = 2 * 1000 * 1000;
       
    78 	
       
    79 	enum TStaFunction
       
    80 	/**
       
    81 		Functions supported by the Streaming Test Agent session.
       
    82 	 */
       
    83 		{
       
    84 			EGetAttribute=0,         	 ///< Gets an attribute.
       
    85 			EGetStringAttributeSize, 	 ///< Gets the size of a string attribute.
       
    86 			EGetStringAttributeData, 	 ///< Gets the data of a string attribute.
       
    87 			EGetPostDeliveryRights,  	 ///< Gets the handle of a post-acqusition rights object file and the size of the mime type data.
       
    88 			ESendKeyStream,    	 	  	 ///< Sends a key stream (an encrypted short-term key).
       
    89 			ESetKeyStreamSink,   	 	 ///< Sends a key stream sink to the test agent server.
       
    90 			ESetSdpKeyStream,			 ///< Sends an SDP key stream field object to the streaming test agent server.
       
    91 			ESetSdpDocument,			 ///< Sends an SDP document object to the streaming test agent server.
       
    92 			ESetIpSecAssoc			 	 ///< Sends an IPSec association to the streaming test agent server.
       
    93 		};
       
    94 	
       
    95 	}//End of the namespace StreamAccess
       
    96 	
       
    97 	/** The file extension of the rights object files. */
       
    98 	_LIT(KRoFileExtension,".dr");
       
    99 	
       
   100 	/**
       
   101 		Test Stream Agent clients are panicked with this category when invalid
       
   102 		input to the server is detected.
       
   103 	 */
       
   104 	_LIT(KStaClientPanicCat, "STA-Client");
       
   105 	
       
   106 #include "stacommon.inl"
       
   107 
       
   108 #endif /*STACOMMON_H_*/