contentmgmt/cafstreamingsupport/test/streamingtestagent/inc/testkeystreamsink.h
branchRCL_3
changeset 43 2f10d260163b
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 // Defines the test key stream sink object for the streaming test agent.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21  @test
       
    22 */
       
    23 
       
    24 
       
    25 #ifndef TESTKEYSTREAMSINK_H_
       
    26 #define TESTKEYSTREAMSINK_H_
       
    27 
       
    28 #include <caf/streaming/keystreamsink.h>
       
    29 #include <s32strm.h>
       
    30 #include <e32const.h>
       
    31 #include <f32file.h>
       
    32 #include "testkeyassociation.h"
       
    33 
       
    34 namespace StreamAccess
       
    35 	{
       
    36 	
       
    37 	NONSHARABLE_CLASS(CTestKeyStreamSink) : public CKeyStreamSink
       
    38 	/**
       
    39 		A specific key stream sink for the streaming test agent.
       
    40 		Differs from the correspondent implementations of IPSec, SRTP and ISMACryp.
       
    41 	 */
       
    42 		{
       
    43 	public:
       
    44 		IMPORT_C static CTestKeyStreamSink* NewL(RReadStream& aStream);
       
    45 		IMPORT_C static CTestKeyStreamSink* NewL(const TDesC& aOutput);
       
    46 		IMPORT_C ~CTestKeyStreamSink();
       
    47 		
       
    48 		IMPORT_C CKeyStreamSink *CloneLC() const;
       
    49 		
       
    50 		// CKeyStreamSink interface
       
    51 		IMPORT_C void ProcessNewKeyAssociationL(const CKeyAssociation& aKeyAssociation);
       
    52 		IMPORT_C void SetEncryptionAlgorithmL(const TEncryptionAlgorithm& aEncryptionAlgorithm);
       
    53 		IMPORT_C void SetAuthenticationAlgorithmL(const TAuthenticationAlgorithm& aAuthenticationAlgorithm);
       
    54 	protected:
       
    55 		IMPORT_C void DoExternalizeL(RWriteStream& aStream) const;
       
    56 	private:
       
    57 		CTestKeyStreamSink();
       
    58 		void ConstructL(const TDesC& aOutput);
       
    59 		void InternalizeL(RReadStream& aStream);
       
    60 		
       
    61 	private:
       
    62 		HBufC* iOutput; ///< The fully qualified path of the output file in which the key association is stored.
       
    63 		RFs iFs;
       
    64 		};
       
    65 	
       
    66 	}//End of the namespace StreamAccess
       
    67 
       
    68 #endif /*TESTKEYSTREAMSINK_H_*/