1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/contentmgmt/cafstreamingsupport/inc/streamagentinfo.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,117 @@
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 + @internalComponent
1.22 + @released
1.23 +*/
1.24 +
1.25 +#ifndef STREAMAGENTINFO_H
1.26 +#define STREAMAGENTINFO_H
1.27 +
1.28 +#include <e32base.h>
1.29 +
1.30 +class CImplementationInformation;
1.31 +class CSdpMediaField;
1.32 +
1.33 +namespace StreamAccess
1.34 + {
1.35 +
1.36 + class CStreamAgentFactory;
1.37 +
1.38 + /* Stores information regarding a Stream Agent interface plug-in implementation.
1.39 + *
1.40 + * Registration data from the plug-in's resource file and details about the
1.41 + * agents decryption capabilities are contained so that the stream agents credentials
1.42 + * can be obtained without the need to instantiate an instantce of it.
1.43 + *
1.44 + * If an instance of the agent is required, the StreamAgentFactoryL() method provides a
1.45 + * handle to it's factory object.
1.46 + */
1.47 + class CStreamAgentInfo : public CBase
1.48 + {
1.49 + public:
1.50 +
1.51 + /* Constructs a new instance of CStreamAgentInfo and pushs it onto the cleanup stack
1.52 + * @param aImplementationInfo Contains regristration information relating to the stream
1.53 + * agent interface implementation
1.54 + * @return Pointer to the new CStreamAgentInfo object
1.55 + */
1.56 + static CStreamAgentInfo* NewLC(const CImplementationInformation& aImplementationInfo);
1.57 +
1.58 + /* Destructor
1.59 + */
1.60 + ~CStreamAgentInfo();
1.61 +
1.62 + /* Returns the name of the stream agent plug-in implementation
1.63 + * @return Name of the steam agent interface implementation
1.64 + */
1.65 + const TDesC& Name() const;
1.66 +
1.67 + /* Returns the implementation UID of the stream agent plug-in DLL
1.68 + * @return Implementation UID of the stream agent plug-in DLL
1.69 + */
1.70 + TUid ImplementationUid() const;
1.71 +
1.72 + /* Determines whether the stream agent is capable of decoding the specified key stream
1.73 + * @param aSdpKeyStream Conatins the metadata for SDP key management scheme of the stream
1.74 + * @return ETrue if the stream agent recognises the SDP format and is able to
1.75 + * decode the key stream
1.76 + * @return EFalse if the stream agent fails to recognise the SDP format or is unable to
1.77 + * decode the key stream
1.78 + */
1.79 + TBool IsKeyStreamSupportedL(const CSdpMediaField& aSdpKeyStream) const;
1.80 +
1.81 + /* Returns a handle to the stream agents factory.
1.82 + *
1.83 + * The factory is instantiated once and can then be called many times. This method
1.84 + * DOES NOT transfer ownership of the factory to the calling client.
1.85 + *
1.86 + * @return Reference to the CStreamAgentFactory instance
1.87 + */
1.88 + CStreamAgentFactory& StreamAgentFactory() const;
1.89 +
1.90 + protected:
1.91 +
1.92 + /* Constructor
1.93 + */
1.94 + CStreamAgentInfo();
1.95 +
1.96 + /* Second phase of construction for CStreamAgentInfo
1.97 + * @param aImplementationInfo Contains registration information relating to the stream
1.98 + * agent interface implementation
1.99 + */
1.100 + void ConstructL(const CImplementationInformation& aImplementationInfo);
1.101 +
1.102 + private:
1.103 +
1.104 + /* Name of the stream agent plug-in implementation
1.105 + */
1.106 + HBufC* iName;
1.107 +
1.108 + /* Implementation UID of the stream agent plug-in DLL
1.109 + */
1.110 + TUid iImplementationUid;
1.111 +
1.112 + /* Stream agent factory handle used to generate instances of the agent key stream decoder
1.113 + */
1.114 + CStreamAgentFactory* iStreamAgentFactory;
1.115 +
1.116 + // ECOM session key. This is set by REComSession::CreateImplementationL() during construction
1.117 + TUid iEcomKey;
1.118 + };
1.119 + } // namespace StreamAccess
1.120 +#endif /*STREAMAGENTINFO_H*/