sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: #ifndef PROTECTEDSTREAMDESC_H sl@0: #define PROTECTEDSTREAMDESC_H sl@0: sl@0: #include sl@0: sl@0: // Should be removed if and when direct TInetAddr usage is removed. sl@0: #include sl@0: sl@0: class TInetAddr; sl@0: sl@0: class RSubConnection; sl@0: sl@0: namespace StreamAccess sl@0: { sl@0: sl@0: class CKeyStreamSink; sl@0: /** sl@0: Represents parameters for the protected stream. Specific subclasses of this interface are used to define parameters relevant to sl@0: the protection layer. sl@0: Instances of this interface are created by the clients of the consumer interface before calling CKeyStreamDecoder::NewL sl@0: */ sl@0: class CProtectedStreamDesc : public CBase sl@0: { sl@0: public: sl@0: /** sl@0: Instantiates the correct implementation of key stream sink. Should be used for creating the binding between sl@0: the short-term key stream that delivers the decryption keys for the traffic and the protocol which protects the sl@0: traffic itself, e.g. IPSec, ISMACryp sl@0: */ sl@0: virtual CKeyStreamSink* CreateKeyStreamSinkLC() const = 0; sl@0: virtual ~CProtectedStreamDesc() {} sl@0: }; sl@0: sl@0: /** sl@0: Represents a media stream protected by IPSec. sl@0: @see StreamAccess::CProtectedStreamDesc sl@0: */ sl@0: NONSHARABLE_CLASS(CIpSecProtectedStreamDesc) : public CProtectedStreamDesc sl@0: { sl@0: public: sl@0: /** sl@0: Create a description of media stream protected by IPSec. sl@0: sl@0: @param aSourceAddr Source connection address. sl@0: @param aTargetAddr Target connection address. sl@0: @return New CIpSecProtectedStreamDesc instance sl@0: sl@0: */ sl@0: IMPORT_C static CIpSecProtectedStreamDesc* NewLC(const TInetAddr& aSourceAddr, const TInetAddr& aTargetAddr); sl@0: sl@0: /** sl@0: @see CProtectedStreamDesc::CreateKeyStreamSinkLC() sl@0: */ sl@0: IMPORT_C CKeyStreamSink* CreateKeyStreamSinkLC() const; sl@0: sl@0: //Destructor sl@0: ~CIpSecProtectedStreamDesc(); sl@0: sl@0: private: sl@0: CIpSecProtectedStreamDesc(const TInetAddr& aSourceAddr, const TInetAddr& aTargetAddr); sl@0: sl@0: private: sl@0: TInetAddr iSourceAddr; sl@0: TInetAddr iTargetAddr; sl@0: sl@0: }; sl@0: } // namespace StreamAccess sl@0: #endif // PROTECTEDSTREAMDESC_H sl@0: