os/security/contentmgmt/cafstreamingsupport/inc/streamagentinfo.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.
     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  @internalComponent
    19  @released
    20 */
    21 
    22 #ifndef STREAMAGENTINFO_H
    23 #define STREAMAGENTINFO_H
    24 
    25 #include <e32base.h>
    26 
    27 class CImplementationInformation;
    28 class CSdpMediaField;
    29 
    30 namespace StreamAccess
    31 	{
    32 	
    33 	class CStreamAgentFactory;
    34 	
    35 	/* Stores information regarding a Stream Agent interface plug-in implementation.
    36 	 * 
    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. 
    40 	 * 
    41 	 * If an instance of the agent is required, the StreamAgentFactoryL() method provides a
    42 	 * handle to it's factory object.
    43 	 */
    44 	class CStreamAgentInfo : public CBase
    45 		{
    46 	public:
    47 		
    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
    52 		 */
    53 		static CStreamAgentInfo* NewLC(const CImplementationInformation& aImplementationInfo);
    54 		
    55 		/* Destructor
    56 		 */
    57 		~CStreamAgentInfo();
    58 		
    59 		/* Returns the name of the stream agent plug-in implementation
    60 		 * @return Name of the steam agent interface implementation
    61 		 */
    62 		const TDesC& Name() const;
    63 		
    64 		/* Returns the implementation UID of the stream agent plug-in DLL
    65 		 * @return Implementation UID of the stream agent plug-in DLL
    66 		 */
    67 		TUid ImplementationUid() const;
    68 		
    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
    75 		 */
    76 		TBool IsKeyStreamSupportedL(const CSdpMediaField& aSdpKeyStream) const;
    77 		
    78 		/* Returns a handle to the stream agents factory.
    79 		 * 
    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.
    82 		 * 
    83 		 * @return Reference to the CStreamAgentFactory instance 
    84 		 */
    85 		CStreamAgentFactory& StreamAgentFactory() const;
    86 		
    87 	protected:
    88 	
    89 		/* Constructor
    90 		 */
    91 		CStreamAgentInfo();
    92 				
    93 		/* Second phase of construction for CStreamAgentInfo 
    94 		 * @param aImplementationInfo Contains registration information relating to the stream 
    95 		 * agent interface implementation 
    96 		 */
    97 		void ConstructL(const CImplementationInformation& aImplementationInfo);
    98 		
    99 	private:
   100 		
   101 		/* Name of the stream agent plug-in implementation
   102 		 */
   103 		HBufC* iName;
   104 		
   105 		/* Implementation UID of the stream agent plug-in DLL
   106 		 */
   107 		TUid iImplementationUid;
   108 		
   109 		/* Stream agent factory handle used to generate instances of the agent key stream decoder
   110 		 */
   111 		CStreamAgentFactory* iStreamAgentFactory;
   112 		
   113 		// ECOM session key. This is set by REComSession::CreateImplementationL() during construction
   114 		TUid iEcomKey;	
   115 		};
   116 	} // namespace StreamAccess
   117 #endif /*STREAMAGENTINFO_H*/