|
1 // Copyright (c) 2008-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 "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 // subconparams.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #include <e32std.h> |
|
24 #include <e32test.h> |
|
25 #include "rtp_subconparams.h" |
|
26 #include "rtpcontrollerbase.h" |
|
27 |
|
28 |
|
29 /* Factory Method */ |
|
30 CSubConParameterSet* CSubConRTPParamFactory::NewL(TAny* aConstructionParameters) |
|
31 { |
|
32 TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters); |
|
33 switch(type) |
|
34 { |
|
35 case KSubConnRTPGenericParamsType: |
|
36 return new(ELeave) CSubConRTPGenericParamSet(); |
|
37 default: |
|
38 User::Leave(KErrNotFound); |
|
39 } |
|
40 return NULL; |
|
41 } |
|
42 |
|
43 |
|
44 CSubConRTPGenericParamSet::CSubConRTPGenericParamSet() |
|
45 : CSubConnectionProtocolParameterSet(), |
|
46 iRTPProtocolUiD(TUid::Uid(0)), |
|
47 iServiceProtocolID(0), |
|
48 iSubConnType(RSubConnection::EAttachToDefault), |
|
49 iMaxDropout(KRtpDefaultMaxDropout), |
|
50 iMaxMisorder(KRtpDefaultMaxMisorder), |
|
51 iMinSequencial(KRtpDefaultMinSequential), |
|
52 iRtcpInterval(0) |
|
53 /** Empty CSubConRTPGenericParamSet constructor |
|
54 */ |
|
55 { |
|
56 } |
|
57 |
|
58 void CSubConRTPGenericParamSet::SetProtocolUIDRtp(TUid aRTPProtocolUiD) |
|
59 { |
|
60 iRTPProtocolUiD = aRTPProtocolUiD; |
|
61 } |
|
62 |
|
63 |
|
64 void CSubConRTPGenericParamSet::SetServiceProtocolID(TInt aServiceProtocolID) |
|
65 { |
|
66 iServiceProtocolID = aServiceProtocolID; |
|
67 } |
|
68 |
|
69 void CSubConRTPGenericParamSet::SetLowerSubConnType(RSubConnection::TSubConnType aSubConnType) |
|
70 { |
|
71 iSubConnType = aSubConnType; |
|
72 } |
|
73 |
|
74 TUid CSubConRTPGenericParamSet::GetProtocolUiDRtp() |
|
75 { |
|
76 return iRTPProtocolUiD; |
|
77 } |
|
78 |
|
79 TInt CSubConRTPGenericParamSet::GetServiceProtocolID() |
|
80 { |
|
81 return iServiceProtocolID; |
|
82 } |
|
83 |
|
84 TInt CSubConRTPGenericParamSet::SetTierID(TUid aTierId) |
|
85 { |
|
86 ESock::TProtocolExtensionSpecifier extensionSpec(aTierId, TUid::Uid(KRtpScprFactoryImplementationUid)); |
|
87 return AddExtension(extensionSpec); |
|
88 } |
|
89 |
|
90 RSubConnection::TSubConnType CSubConRTPGenericParamSet::GetLowerSubConnType() |
|
91 { |
|
92 return iSubConnType; |
|
93 } |
|
94 |
|
95 |
|
96 void CSubConRTPGenericParamSet::SetBandWidth(TUint aBandWidth) |
|
97 { |
|
98 iBandWidth = aBandWidth; |
|
99 } |
|
100 |
|
101 void CSubConRTPGenericParamSet::SetMaxDropOut(TUint aMaxDropout) |
|
102 { |
|
103 iMaxDropout = aMaxDropout; |
|
104 } |
|
105 |
|
106 void CSubConRTPGenericParamSet::SetMaxMisorder(TUint aMaxMisorder) |
|
107 { |
|
108 iMaxMisorder = aMaxMisorder; |
|
109 } |
|
110 |
|
111 void CSubConRTPGenericParamSet::SetMinSequencial(TUint aMinSequential) |
|
112 { |
|
113 iMinSequencial = aMinSequential; |
|
114 } |
|
115 |
|
116 void CSubConRTPGenericParamSet::SetRtptimeConversion(TUint aRtpTimeConversion) |
|
117 { |
|
118 iRtpTimeConversion = aRtpTimeConversion; |
|
119 } |
|
120 |
|
121 void CSubConRTPGenericParamSet::SetRtpTimeNow(TUint aRtpTimeNow) |
|
122 { |
|
123 iRtpTimeNow = aRtpTimeNow; |
|
124 } |
|
125 |
|
126 void CSubConRTPGenericParamSet::SetRtpAutoSend(TBool aAutoSendRtcp) |
|
127 { |
|
128 iAutoSendRtcp = aAutoSendRtcp; |
|
129 } |
|
130 |
|
131 |
|
132 void CSubConRTPGenericParamSet::SetCNAMEL(const TDesC8& aCName) |
|
133 { |
|
134 iCName.CreateL(aCName); |
|
135 return; |
|
136 } |
|
137 |
|
138 void CSubConRTPGenericParamSet::SetDefDestinationAddr(TInetAddr& aDefDestAddr) |
|
139 { |
|
140 iDefDestAddr = aDefDestAddr; |
|
141 return; |
|
142 } |
|
143 |
|
144 void CSubConRTPGenericParamSet::SetRtcpReportInterval(const TTimeIntervalMicroSeconds32& aInterval) |
|
145 { |
|
146 iRtcpInterval = aInterval; |
|
147 return; |
|
148 } |
|
149 |
|
150 TUint CSubConRTPGenericParamSet::BandWidth() const |
|
151 { |
|
152 return iBandWidth; |
|
153 } |
|
154 |
|
155 TUint CSubConRTPGenericParamSet::MaxDropOut() const |
|
156 { |
|
157 return iMaxDropout; |
|
158 } |
|
159 |
|
160 TUint CSubConRTPGenericParamSet::MaxMisorder() const |
|
161 { |
|
162 return iMaxMisorder; |
|
163 } |
|
164 |
|
165 TUint CSubConRTPGenericParamSet::MinSequencial() const |
|
166 { |
|
167 return iMinSequencial; |
|
168 } |
|
169 |
|
170 TUint CSubConRTPGenericParamSet::RtptimeConversion() const |
|
171 { |
|
172 return iRtpTimeConversion; |
|
173 } |
|
174 |
|
175 TUint CSubConRTPGenericParamSet::RtpTimeNow() const |
|
176 { |
|
177 return iRtpTimeNow; |
|
178 } |
|
179 |
|
180 TBool CSubConRTPGenericParamSet::RtpAutoSend() const |
|
181 { |
|
182 return iAutoSendRtcp; |
|
183 } |
|
184 |
|
185 const TTimeIntervalMicroSeconds32& CSubConRTPGenericParamSet::GetRtcpReportInterval() const |
|
186 { |
|
187 return iRtcpInterval; |
|
188 } |
|
189 |
|
190 const TDesC8& CSubConRTPGenericParamSet::GetCNAME() const |
|
191 { |
|
192 return iCName; |
|
193 } |
|
194 const TInetAddr& CSubConRTPGenericParamSet::GetDefDestinationAddr() const |
|
195 { |
|
196 return iDefDestAddr; |
|
197 } |
|
198 |
|
199 CSubConRTPGenericParamSet::~CSubConRTPGenericParamSet() |
|
200 { |
|
201 iCName.Close(); |
|
202 } |
|
203 |
|
204 |
|
205 START_ATTRIBUTE_TABLE( CSubConRTPGenericParamSet, KSubConnRTPParamsImplUid, KSubConnRTPGenericParamsType ) |
|
206 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iRTPProtocolUiD, TMetaNumber ) |
|
207 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iServiceProtocolID, TMetaNumber ) |
|
208 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iSubConnType, TMeta<RSubConnection::TSubConnType> ) |
|
209 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iBandWidth, TMetaNumber ) |
|
210 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iMaxDropout, TMetaNumber ) |
|
211 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iMaxMisorder, TMetaNumber ) |
|
212 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iMinSequencial, TMetaNumber ) |
|
213 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iRtpTimeConversion, TMetaNumber ) |
|
214 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iRtpTimeNow, TMetaNumber ) |
|
215 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iAutoSendRtcp, TMetaNumber ) |
|
216 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iCName, TMetaBuf8) |
|
217 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iDefDestAddr, TMeta<TInetAddr>) |
|
218 REGISTER_ATTRIBUTE( CSubConRTPGenericParamSet, iRtcpInterval,TMeta<TTimeIntervalMicroSeconds32>) |
|
219 END_ATTRIBUTE_TABLE_BASE( CSubConnectionProtocolParameterSet,KSubConnGenericParamsImplUid) |
|
220 |