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 |
@publishedPartner
|
sl@0
|
19 |
@released
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef STREAMAGENTFACTORY_H
|
sl@0
|
23 |
#define STREAMAGENTFACTORY_H
|
sl@0
|
24 |
|
sl@0
|
25 |
#include <caf/streaming/keystreamsink.h>
|
sl@0
|
26 |
#include <caf/streaming/streamagentinterface.h>
|
sl@0
|
27 |
#include <e32base.h>
|
sl@0
|
28 |
#include <ecom/ecom.h>
|
sl@0
|
29 |
#include <ecom/implementationproxy.h>
|
sl@0
|
30 |
|
sl@0
|
31 |
class CSdpMediaField;
|
sl@0
|
32 |
class CSdpDocument;
|
sl@0
|
33 |
|
sl@0
|
34 |
namespace StreamAccess
|
sl@0
|
35 |
{
|
sl@0
|
36 |
|
sl@0
|
37 |
/**
|
sl@0
|
38 |
Abstract interface handed out by an ECOM agent implementation by REComSession::CreateImplementationL().
|
sl@0
|
39 |
|
sl@0
|
40 |
CStreamAgentFactory defines an abstract factory that is responsible for creating instances of CKeyStreamDecoder.
|
sl@0
|
41 |
|
sl@0
|
42 |
Derived classes will hand out concrete product implementations which are specific for that particular agent.
|
sl@0
|
43 |
|
sl@0
|
44 |
Derived classes effectively represent the ECOM session handle used by Streaming CAF classes.
|
sl@0
|
45 |
|
sl@0
|
46 |
*/
|
sl@0
|
47 |
class CStreamAgentFactory : public CBase
|
sl@0
|
48 |
{
|
sl@0
|
49 |
public:
|
sl@0
|
50 |
/** Destructor. */
|
sl@0
|
51 |
IMPORT_C ~CStreamAgentFactory();
|
sl@0
|
52 |
|
sl@0
|
53 |
/**
|
sl@0
|
54 |
Factory function that creates a CAgentKeyStreamDecoder object for decoding and applying the short-term key stream.
|
sl@0
|
55 |
|
sl@0
|
56 |
@param aKeyStreamSink The reference to the necessary CKeyStreamSink object used to create the binding between
|
sl@0
|
57 |
the short-term key stream that delivers the decryption keys for the traffic and the protocol which protects the
|
sl@0
|
58 |
traffic itself.
|
sl@0
|
59 |
|
sl@0
|
60 |
NOTE: A copy of the key stream sink is made by the stream agent implementation during construction. This means
|
sl@0
|
61 |
that the local copy can be destroyed once it has been used to retrieve a handle to the desired CAgentKeyStreamDecoder
|
sl@0
|
62 |
object.
|
sl@0
|
63 |
|
sl@0
|
64 |
@param aSdpKeyStream Conatins the metadata for the SDP key management scheme of the stream
|
sl@0
|
65 |
@param aSdpDoc Contains a collection of SDP fields and values describing session.
|
sl@0
|
66 |
@return A pointer to the CAgentKeyStreamDecoder object. Ownership on the object is transferred to the client of the interface.
|
sl@0
|
67 |
@return NULL if the agent does not support the key management scheme specified in the SDP key stream definition.
|
sl@0
|
68 |
@leave KErrPermissionDenied if the process does not have the rights to instantiate key stream decoders.
|
sl@0
|
69 |
@leave ... One of the system-wide error codes.
|
sl@0
|
70 |
*/
|
sl@0
|
71 |
virtual CAgentKeyStreamDecoder* GetKeyStreamDecoderL(const CKeyStreamSink& aKeyStreamSink,
|
sl@0
|
72 |
const CSdpMediaField& aSdpKeyStream,
|
sl@0
|
73 |
const CSdpDocument& aSdpDoc) = 0;
|
sl@0
|
74 |
|
sl@0
|
75 |
/**
|
sl@0
|
76 |
Function to determine whether the stream agent supports the key management scheme specified in the SDP key stream definition
|
sl@0
|
77 |
|
sl@0
|
78 |
@param aSdpKeyStream Conatins the metadata for the SDP key management scheme of the stream
|
sl@0
|
79 |
@return ETrue if the stream agent recognises the SDP format and is able to decode the key stream
|
sl@0
|
80 |
@return EFalse if the stream agent fails to recofnise the SDP format or is unable to decode the key stream
|
sl@0
|
81 |
*/
|
sl@0
|
82 |
virtual TBool IsKeyStreamSupportedL(const CSdpMediaField& aSdpKeyStream) = 0;
|
sl@0
|
83 |
|
sl@0
|
84 |
protected:
|
sl@0
|
85 |
/** Constructor. */
|
sl@0
|
86 |
IMPORT_C CStreamAgentFactory();
|
sl@0
|
87 |
};
|
sl@0
|
88 |
|
sl@0
|
89 |
/** Hosting the Stream Agent Factory Interface UID. */
|
sl@0
|
90 |
const TUid KUidStreamAgentFactoryInterface = {0x10285890};
|
sl@0
|
91 |
|
sl@0
|
92 |
} // namespace StreamAccess
|
sl@0
|
93 |
#endif // STREAMAGENTFACTORY_H
|