|
1 /* |
|
2 * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __RtpSessionSrtp_H |
|
22 #define __RtpSessionSrtp_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <rtpheader.h> |
|
27 #include "rtpsession.h" |
|
28 #include <srtpsession.h> |
|
29 |
|
30 |
|
31 /** |
|
32 * class for rtp session. |
|
33 * |
|
34 * @lib RtpService.dll |
|
35 */ |
|
36 class CRtpSessionSrtp :public CRtpSession |
|
37 { |
|
38 |
|
39 public: // new functions |
|
40 static CRtpSessionSrtp* NewL( const TCreateSessionParams& aParams, |
|
41 TUint& aPort, |
|
42 TBool aEnableRtcp, |
|
43 const TRtcpParams* aRtcpParams, |
|
44 RSocketServ& aSocketServ, |
|
45 RConnection& aRConn, |
|
46 const TRtpId aSessionId, |
|
47 const CRtpSDES* aSdes, |
|
48 const TUint32* aProfileRTPTimeRates, |
|
49 const TBool aStandardRtp, |
|
50 const RLibrary& aLibrary, |
|
51 MRtpErrNotify& aErrNotify, |
|
52 MRtpAsignUniqueID& aAssignUniqueID, |
|
53 CSRTPSession& aSRTPSession); |
|
54 |
|
55 ~CRtpSessionSrtp(); |
|
56 |
|
57 TInt SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, |
|
58 const TDesC8& aPayloadData ); |
|
59 |
|
60 TInt SendRtpPacket( TRtpId aTranStreamId, |
|
61 const TRtpSendHeader& aHeaderInfo, |
|
62 const TDesC8& aPayloadData, |
|
63 TRequestStatus& aStatus ); |
|
64 |
|
65 |
|
66 TInt SendRtpPacket( TRtpId aTranStreamId, |
|
67 TRtpSequence aSequenceNum, |
|
68 const TRtpSendHeader& aHeaderInfo, |
|
69 const TDesC8& aPayloadData, |
|
70 TRequestStatus& aStatus ); |
|
71 |
|
72 //TInt SendRtcpByePacket( TRtpId aTranStreamId, const TDesC8& aReason ); |
|
73 //TInt SendRtcpAppPacket( TRtpId aTranStreamId, const TRtcpApp& aApp ); |
|
74 //TInt SendRtcpSrPacket( TRtpId aTranStreamId ); |
|
75 //TInt SendRtcpRrPacket( TRtpId aRecvStreamId ); |
|
76 void SendSRTCPReportL(TRtpSSRC aSSRC); |
|
77 TInt StartSession(); |
|
78 |
|
79 public: // from MReceivedNotify |
|
80 void OnRtpReceivedL(); |
|
81 void OnRtcpReceivedL(); |
|
82 |
|
83 private: // construction |
|
84 |
|
85 CRtpSessionSrtp( const TRtpId aSessionId, |
|
86 const TUint32* aProfileRTPTimeRates, |
|
87 const TBool aStandardRtp, |
|
88 MRtpErrNotify& aErrNotify, |
|
89 const CRtpSDES* aSdesInfo, |
|
90 MRtpAsignUniqueID& aAssignUniqueID, |
|
91 CSRTPSession& aSRTPSession ); |
|
92 |
|
93 void ConstructL( const TCreateSessionParams& aParams, |
|
94 TUint& aPort, |
|
95 TBool aEnableRtcp, |
|
96 const TRtcpParams* aRtcpParams, |
|
97 RSocketServ& aSocketServ, |
|
98 RConnection& aRConn, |
|
99 const RLibrary& aLibrary, |
|
100 MRtpErrNotify& aErrNotify ); |
|
101 |
|
102 TInt UnprotectRtp(TRtpSSRC ssrc); |
|
103 TInt UnprotectRtcp(TRtpSSRC ssrc); |
|
104 private: |
|
105 |
|
106 CSRTPSession& iSRTPSession; |
|
107 HBufC8* iSndPacket; |
|
108 HBufC8* iRecvPacket; |
|
109 HBufC8* iSndRtcpPacket; |
|
110 HBufC8* iRecvRtcpPacket; |
|
111 |
|
112 }; |
|
113 |
|
114 #endif // __RtpSessionSrtp_H |
|
115 |
|
116 // End of File |