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 |
@internalComponent
|
sl@0
|
19 |
@released
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef STREAMAGENTINFO_H
|
sl@0
|
23 |
#define STREAMAGENTINFO_H
|
sl@0
|
24 |
|
sl@0
|
25 |
#include <e32base.h>
|
sl@0
|
26 |
|
sl@0
|
27 |
class CImplementationInformation;
|
sl@0
|
28 |
class CSdpMediaField;
|
sl@0
|
29 |
|
sl@0
|
30 |
namespace StreamAccess
|
sl@0
|
31 |
{
|
sl@0
|
32 |
|
sl@0
|
33 |
class CStreamAgentFactory;
|
sl@0
|
34 |
|
sl@0
|
35 |
/* Stores information regarding a Stream Agent interface plug-in implementation.
|
sl@0
|
36 |
*
|
sl@0
|
37 |
* Registration data from the plug-in's resource file and details about the
|
sl@0
|
38 |
* agents decryption capabilities are contained so that the stream agents credentials
|
sl@0
|
39 |
* can be obtained without the need to instantiate an instantce of it.
|
sl@0
|
40 |
*
|
sl@0
|
41 |
* If an instance of the agent is required, the StreamAgentFactoryL() method provides a
|
sl@0
|
42 |
* handle to it's factory object.
|
sl@0
|
43 |
*/
|
sl@0
|
44 |
class CStreamAgentInfo : public CBase
|
sl@0
|
45 |
{
|
sl@0
|
46 |
public:
|
sl@0
|
47 |
|
sl@0
|
48 |
/* Constructs a new instance of CStreamAgentInfo and pushs it onto the cleanup stack
|
sl@0
|
49 |
* @param aImplementationInfo Contains regristration information relating to the stream
|
sl@0
|
50 |
* agent interface implementation
|
sl@0
|
51 |
* @return Pointer to the new CStreamAgentInfo object
|
sl@0
|
52 |
*/
|
sl@0
|
53 |
static CStreamAgentInfo* NewLC(const CImplementationInformation& aImplementationInfo);
|
sl@0
|
54 |
|
sl@0
|
55 |
/* Destructor
|
sl@0
|
56 |
*/
|
sl@0
|
57 |
~CStreamAgentInfo();
|
sl@0
|
58 |
|
sl@0
|
59 |
/* Returns the name of the stream agent plug-in implementation
|
sl@0
|
60 |
* @return Name of the steam agent interface implementation
|
sl@0
|
61 |
*/
|
sl@0
|
62 |
const TDesC& Name() const;
|
sl@0
|
63 |
|
sl@0
|
64 |
/* Returns the implementation UID of the stream agent plug-in DLL
|
sl@0
|
65 |
* @return Implementation UID of the stream agent plug-in DLL
|
sl@0
|
66 |
*/
|
sl@0
|
67 |
TUid ImplementationUid() const;
|
sl@0
|
68 |
|
sl@0
|
69 |
/* Determines whether the stream agent is capable of decoding the specified key stream
|
sl@0
|
70 |
* @param aSdpKeyStream Conatins the metadata for SDP key management scheme of the stream
|
sl@0
|
71 |
* @return ETrue if the stream agent recognises the SDP format and is able to
|
sl@0
|
72 |
* decode the key stream
|
sl@0
|
73 |
* @return EFalse if the stream agent fails to recognise the SDP format or is unable to
|
sl@0
|
74 |
* decode the key stream
|
sl@0
|
75 |
*/
|
sl@0
|
76 |
TBool IsKeyStreamSupportedL(const CSdpMediaField& aSdpKeyStream) const;
|
sl@0
|
77 |
|
sl@0
|
78 |
/* Returns a handle to the stream agents factory.
|
sl@0
|
79 |
*
|
sl@0
|
80 |
* The factory is instantiated once and can then be called many times. This method
|
sl@0
|
81 |
* DOES NOT transfer ownership of the factory to the calling client.
|
sl@0
|
82 |
*
|
sl@0
|
83 |
* @return Reference to the CStreamAgentFactory instance
|
sl@0
|
84 |
*/
|
sl@0
|
85 |
CStreamAgentFactory& StreamAgentFactory() const;
|
sl@0
|
86 |
|
sl@0
|
87 |
protected:
|
sl@0
|
88 |
|
sl@0
|
89 |
/* Constructor
|
sl@0
|
90 |
*/
|
sl@0
|
91 |
CStreamAgentInfo();
|
sl@0
|
92 |
|
sl@0
|
93 |
/* Second phase of construction for CStreamAgentInfo
|
sl@0
|
94 |
* @param aImplementationInfo Contains registration information relating to the stream
|
sl@0
|
95 |
* agent interface implementation
|
sl@0
|
96 |
*/
|
sl@0
|
97 |
void ConstructL(const CImplementationInformation& aImplementationInfo);
|
sl@0
|
98 |
|
sl@0
|
99 |
private:
|
sl@0
|
100 |
|
sl@0
|
101 |
/* Name of the stream agent plug-in implementation
|
sl@0
|
102 |
*/
|
sl@0
|
103 |
HBufC* iName;
|
sl@0
|
104 |
|
sl@0
|
105 |
/* Implementation UID of the stream agent plug-in DLL
|
sl@0
|
106 |
*/
|
sl@0
|
107 |
TUid iImplementationUid;
|
sl@0
|
108 |
|
sl@0
|
109 |
/* Stream agent factory handle used to generate instances of the agent key stream decoder
|
sl@0
|
110 |
*/
|
sl@0
|
111 |
CStreamAgentFactory* iStreamAgentFactory;
|
sl@0
|
112 |
|
sl@0
|
113 |
// ECOM session key. This is set by REComSession::CreateImplementationL() during construction
|
sl@0
|
114 |
TUid iEcomKey;
|
sl@0
|
115 |
};
|
sl@0
|
116 |
} // namespace StreamAccess
|
sl@0
|
117 |
#endif /*STREAMAGENTINFO_H*/
|