os/security/contentmgmt/cafstreamingsupport/inc/protectedstreamdesc.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
/**
sl@0
    17
 @file
sl@0
    18
 @publishedPartner
sl@0
    19
 @released
sl@0
    20
*/
sl@0
    21
sl@0
    22
#ifndef PROTECTEDSTREAMDESC_H
sl@0
    23
#define PROTECTEDSTREAMDESC_H
sl@0
    24
sl@0
    25
#include <e32base.h>
sl@0
    26
sl@0
    27
// Should be removed if and when direct TInetAddr usage is removed.
sl@0
    28
#include <in_sock.h>
sl@0
    29
sl@0
    30
class TInetAddr;
sl@0
    31
sl@0
    32
class RSubConnection;
sl@0
    33
sl@0
    34
namespace StreamAccess
sl@0
    35
	{
sl@0
    36
sl@0
    37
	class CKeyStreamSink;
sl@0
    38
	/**
sl@0
    39
	Represents parameters for the protected stream. Specific subclasses of this interface are used to define parameters relevant to
sl@0
    40
	the protection layer. 
sl@0
    41
	Instances of this interface are created by the clients of the consumer interface before calling CKeyStreamDecoder::NewL
sl@0
    42
	*/
sl@0
    43
	class CProtectedStreamDesc : public CBase
sl@0
    44
		{
sl@0
    45
	public:
sl@0
    46
		/**
sl@0
    47
 		Instantiates the correct implementation of key stream sink. Should be used for creating the binding between
sl@0
    48
		the short-term key stream that delivers the decryption keys for the traffic and the protocol which protects the
sl@0
    49
		traffic itself, e.g. IPSec, ISMACryp	
sl@0
    50
		*/
sl@0
    51
		virtual CKeyStreamSink* CreateKeyStreamSinkLC() const = 0;
sl@0
    52
		virtual ~CProtectedStreamDesc() {}
sl@0
    53
		};
sl@0
    54
sl@0
    55
	/**
sl@0
    56
	Represents a media stream protected by IPSec. 
sl@0
    57
	@see StreamAccess::CProtectedStreamDesc
sl@0
    58
	*/
sl@0
    59
	NONSHARABLE_CLASS(CIpSecProtectedStreamDesc) : public CProtectedStreamDesc
sl@0
    60
		{
sl@0
    61
	public:		
sl@0
    62
		/**
sl@0
    63
		Create a description of media stream protected by IPSec. 
sl@0
    64
		
sl@0
    65
		@param aSourceAddr Source connection address.
sl@0
    66
		@param aTargetAddr Target connection address.
sl@0
    67
		@return New CIpSecProtectedStreamDesc instance		
sl@0
    68
		
sl@0
    69
		*/
sl@0
    70
		IMPORT_C static CIpSecProtectedStreamDesc* NewLC(const TInetAddr& aSourceAddr, const TInetAddr& aTargetAddr);
sl@0
    71
			
sl@0
    72
		/**
sl@0
    73
		@see CProtectedStreamDesc::CreateKeyStreamSinkLC()
sl@0
    74
		*/		
sl@0
    75
		IMPORT_C CKeyStreamSink* CreateKeyStreamSinkLC() const;		
sl@0
    76
		
sl@0
    77
		//Destructor
sl@0
    78
		~CIpSecProtectedStreamDesc();
sl@0
    79
		
sl@0
    80
	private:
sl@0
    81
		CIpSecProtectedStreamDesc(const TInetAddr& aSourceAddr, const TInetAddr& aTargetAddr);
sl@0
    82
		
sl@0
    83
	private:	
sl@0
    84
		TInetAddr iSourceAddr;
sl@0
    85
		TInetAddr iTargetAddr;
sl@0
    86
		
sl@0
    87
		};
sl@0
    88
	} // namespace StreamAccess
sl@0
    89
#endif // PROTECTEDSTREAMDESC_H
sl@0
    90