First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #ifndef STREAMAGENTINFO_H
23 #define STREAMAGENTINFO_H
27 class CImplementationInformation;
30 namespace StreamAccess
33 class CStreamAgentFactory;
35 /* Stores information regarding a Stream Agent interface plug-in implementation.
37 * Registration data from the plug-in's resource file and details about the
38 * agents decryption capabilities are contained so that the stream agents credentials
39 * can be obtained without the need to instantiate an instantce of it.
41 * If an instance of the agent is required, the StreamAgentFactoryL() method provides a
42 * handle to it's factory object.
44 class CStreamAgentInfo : public CBase
48 /* Constructs a new instance of CStreamAgentInfo and pushs it onto the cleanup stack
49 * @param aImplementationInfo Contains regristration information relating to the stream
50 * agent interface implementation
51 * @return Pointer to the new CStreamAgentInfo object
53 static CStreamAgentInfo* NewLC(const CImplementationInformation& aImplementationInfo);
59 /* Returns the name of the stream agent plug-in implementation
60 * @return Name of the steam agent interface implementation
62 const TDesC& Name() const;
64 /* Returns the implementation UID of the stream agent plug-in DLL
65 * @return Implementation UID of the stream agent plug-in DLL
67 TUid ImplementationUid() const;
69 /* Determines whether the stream agent is capable of decoding the specified key stream
70 * @param aSdpKeyStream Conatins the metadata for SDP key management scheme of the stream
71 * @return ETrue if the stream agent recognises the SDP format and is able to
72 * decode the key stream
73 * @return EFalse if the stream agent fails to recognise the SDP format or is unable to
74 * decode the key stream
76 TBool IsKeyStreamSupportedL(const CSdpMediaField& aSdpKeyStream) const;
78 /* Returns a handle to the stream agents factory.
80 * The factory is instantiated once and can then be called many times. This method
81 * DOES NOT transfer ownership of the factory to the calling client.
83 * @return Reference to the CStreamAgentFactory instance
85 CStreamAgentFactory& StreamAgentFactory() const;
93 /* Second phase of construction for CStreamAgentInfo
94 * @param aImplementationInfo Contains registration information relating to the stream
95 * agent interface implementation
97 void ConstructL(const CImplementationInformation& aImplementationInfo);
101 /* Name of the stream agent plug-in implementation
105 /* Implementation UID of the stream agent plug-in DLL
107 TUid iImplementationUid;
109 /* Stream agent factory handle used to generate instances of the agent key stream decoder
111 CStreamAgentFactory* iStreamAgentFactory;
113 // ECOM session key. This is set by REComSession::CreateImplementationL() during construction
116 } // namespace StreamAccess
117 #endif /*STREAMAGENTINFO_H*/