os/security/contentmgmt/cafstreamingsupport/inc/protectedstreamdesc.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/contentmgmt/cafstreamingsupport/inc/protectedstreamdesc.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,90 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @publishedPartner
    1.22 + @released
    1.23 +*/
    1.24 +
    1.25 +#ifndef PROTECTEDSTREAMDESC_H
    1.26 +#define PROTECTEDSTREAMDESC_H
    1.27 +
    1.28 +#include <e32base.h>
    1.29 +
    1.30 +// Should be removed if and when direct TInetAddr usage is removed.
    1.31 +#include <in_sock.h>
    1.32 +
    1.33 +class TInetAddr;
    1.34 +
    1.35 +class RSubConnection;
    1.36 +
    1.37 +namespace StreamAccess
    1.38 +	{
    1.39 +
    1.40 +	class CKeyStreamSink;
    1.41 +	/**
    1.42 +	Represents parameters for the protected stream. Specific subclasses of this interface are used to define parameters relevant to
    1.43 +	the protection layer. 
    1.44 +	Instances of this interface are created by the clients of the consumer interface before calling CKeyStreamDecoder::NewL
    1.45 +	*/
    1.46 +	class CProtectedStreamDesc : public CBase
    1.47 +		{
    1.48 +	public:
    1.49 +		/**
    1.50 + 		Instantiates the correct implementation of key stream sink. Should be used for creating the binding between
    1.51 +		the short-term key stream that delivers the decryption keys for the traffic and the protocol which protects the
    1.52 +		traffic itself, e.g. IPSec, ISMACryp	
    1.53 +		*/
    1.54 +		virtual CKeyStreamSink* CreateKeyStreamSinkLC() const = 0;
    1.55 +		virtual ~CProtectedStreamDesc() {}
    1.56 +		};
    1.57 +
    1.58 +	/**
    1.59 +	Represents a media stream protected by IPSec. 
    1.60 +	@see StreamAccess::CProtectedStreamDesc
    1.61 +	*/
    1.62 +	NONSHARABLE_CLASS(CIpSecProtectedStreamDesc) : public CProtectedStreamDesc
    1.63 +		{
    1.64 +	public:		
    1.65 +		/**
    1.66 +		Create a description of media stream protected by IPSec. 
    1.67 +		
    1.68 +		@param aSourceAddr Source connection address.
    1.69 +		@param aTargetAddr Target connection address.
    1.70 +		@return New CIpSecProtectedStreamDesc instance		
    1.71 +		
    1.72 +		*/
    1.73 +		IMPORT_C static CIpSecProtectedStreamDesc* NewLC(const TInetAddr& aSourceAddr, const TInetAddr& aTargetAddr);
    1.74 +			
    1.75 +		/**
    1.76 +		@see CProtectedStreamDesc::CreateKeyStreamSinkLC()
    1.77 +		*/		
    1.78 +		IMPORT_C CKeyStreamSink* CreateKeyStreamSinkLC() const;		
    1.79 +		
    1.80 +		//Destructor
    1.81 +		~CIpSecProtectedStreamDesc();
    1.82 +		
    1.83 +	private:
    1.84 +		CIpSecProtectedStreamDesc(const TInetAddr& aSourceAddr, const TInetAddr& aTargetAddr);
    1.85 +		
    1.86 +	private:	
    1.87 +		TInetAddr iSourceAddr;
    1.88 +		TInetAddr iTargetAddr;
    1.89 +		
    1.90 +		};
    1.91 +	} // namespace StreamAccess
    1.92 +#endif // PROTECTEDSTREAMDESC_H
    1.93 +