|
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 // Defines the Test 'Single Process' Stream Agent Key Stream Decoder object. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @test |
|
21 */ |
|
22 |
|
23 #ifndef TESTSINGLEPROCESSKEYSTREAMDECODER_H |
|
24 #define TESTSINGLEPROCESSKEYSTREAMDECODER_H |
|
25 |
|
26 #include <s32file.h> |
|
27 |
|
28 #include "testkeystreamdecoderbase.h" |
|
29 #include "stacommon.h" |
|
30 #include "srarightsobject.h" |
|
31 #include "srautils.h" |
|
32 |
|
33 #include "testkeyassociation.h" |
|
34 #include "testkeystreamsink.h" |
|
35 |
|
36 class CSdpDocument; |
|
37 class CSdpDocument; |
|
38 namespace StreamAccess |
|
39 { |
|
40 NONSHARABLE_CLASS(CTestSingleProcessKeyStreamDecoder) : public CTestKeyStreamDecoderBase |
|
41 { |
|
42 public: |
|
43 IMPORT_C static CTestSingleProcessKeyStreamDecoder* NewL(const CKeyStreamSink& aKeyStreamSink, |
|
44 const CSdpMediaField& aSdpKeyStream, |
|
45 const CSdpDocument& aSdpDoc); |
|
46 IMPORT_C static CTestSingleProcessKeyStreamDecoder* NewLC(const CKeyStreamSink& aKeyStreamSink, |
|
47 const CSdpMediaField& aSdpKeyStream, |
|
48 const CSdpDocument& aSdpDoc); |
|
49 ~CTestSingleProcessKeyStreamDecoder(); |
|
50 |
|
51 //From CAgentKeyStreamDecoder |
|
52 IMPORT_C void GetAttributeL(const TAttribute& aAttribute, TBool& aValue); |
|
53 IMPORT_C HBufC* GetStringAttributeLC(const TStringAttribute& aAttribute); |
|
54 IMPORT_C void GetPostDeliveryRightsL(RFile& aFile, TDes8& aCid, TDes8& aRightsMimeType, TDes8& aContentMimeType); |
|
55 |
|
56 //From CTestKeyStreamDecoderBase |
|
57 IMPORT_C void SendKeyStreamL(const TDesC8& aKey) const; |
|
58 IMPORT_C void SendIpSecAssociationL(TInt32 aSpi, HBufC8* aEncryptionKey, HBufC8* aAuthenticationKey) const; |
|
59 |
|
60 protected: |
|
61 void SetRoL(); |
|
62 void VerifyRoL(); |
|
63 |
|
64 private: |
|
65 CTestSingleProcessKeyStreamDecoder(); |
|
66 |
|
67 void ConstructL(const CKeyStreamSink& aKeyStreamSink, |
|
68 const CSdpMediaField& aSdpKeyStream, |
|
69 const CSdpDocument& aSdpDoc); |
|
70 |
|
71 private: |
|
72 RFs iFs; |
|
73 |
|
74 CKeyStreamSink* iKeyStreamSink; |
|
75 CSdpMediaField* iSdp; |
|
76 CSdpDocument* iSdpDoc; |
|
77 CSraRightsObject* iRo; |
|
78 }; |
|
79 |
|
80 }//End of the namespace StreamAccess |
|
81 #endif /*TESTSINGLEPROCESSKEYSTREAMDECODER_H*/ |