contentmgmt/cafstreamingsupport/inc/protectedstreamdesc.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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedPartner
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef PROTECTEDSTREAMDESC_H
       
    23 #define PROTECTEDSTREAMDESC_H
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 // Should be removed if and when direct TInetAddr usage is removed.
       
    28 #include <in_sock.h>
       
    29 
       
    30 class TInetAddr;
       
    31 
       
    32 class RSubConnection;
       
    33 
       
    34 namespace StreamAccess
       
    35 	{
       
    36 
       
    37 	class CKeyStreamSink;
       
    38 	/**
       
    39 	Represents parameters for the protected stream. Specific subclasses of this interface are used to define parameters relevant to
       
    40 	the protection layer. 
       
    41 	Instances of this interface are created by the clients of the consumer interface before calling CKeyStreamDecoder::NewL
       
    42 	*/
       
    43 	class CProtectedStreamDesc : public CBase
       
    44 		{
       
    45 	public:
       
    46 		/**
       
    47  		Instantiates the correct implementation of key stream sink. Should be used for creating the binding between
       
    48 		the short-term key stream that delivers the decryption keys for the traffic and the protocol which protects the
       
    49 		traffic itself, e.g. IPSec, ISMACryp	
       
    50 		*/
       
    51 		virtual CKeyStreamSink* CreateKeyStreamSinkLC() const = 0;
       
    52 		virtual ~CProtectedStreamDesc() {}
       
    53 		};
       
    54 
       
    55 	/**
       
    56 	Represents a media stream protected by IPSec. 
       
    57 	@see StreamAccess::CProtectedStreamDesc
       
    58 	*/
       
    59 	NONSHARABLE_CLASS(CIpSecProtectedStreamDesc) : public CProtectedStreamDesc
       
    60 		{
       
    61 	public:		
       
    62 		/**
       
    63 		Create a description of media stream protected by IPSec. 
       
    64 		
       
    65 		@param aSourceAddr Source connection address.
       
    66 		@param aTargetAddr Target connection address.
       
    67 		@return New CIpSecProtectedStreamDesc instance		
       
    68 		
       
    69 		*/
       
    70 		IMPORT_C static CIpSecProtectedStreamDesc* NewLC(const TInetAddr& aSourceAddr, const TInetAddr& aTargetAddr);
       
    71 			
       
    72 		/**
       
    73 		@see CProtectedStreamDesc::CreateKeyStreamSinkLC()
       
    74 		*/		
       
    75 		IMPORT_C CKeyStreamSink* CreateKeyStreamSinkLC() const;		
       
    76 		
       
    77 		//Destructor
       
    78 		~CIpSecProtectedStreamDesc();
       
    79 		
       
    80 	private:
       
    81 		CIpSecProtectedStreamDesc(const TInetAddr& aSourceAddr, const TInetAddr& aTargetAddr);
       
    82 		
       
    83 	private:	
       
    84 		TInetAddr iSourceAddr;
       
    85 		TInetAddr iTargetAddr;
       
    86 		
       
    87 		};
       
    88 	} // namespace StreamAccess
       
    89 #endif // PROTECTEDSTREAMDESC_H
       
    90