106 // ----------------------------------------------------------------------------- |
106 // ----------------------------------------------------------------------------- |
107 // |
107 // |
108 CRightsReq* CRightsReq::NewL() |
108 CRightsReq* CRightsReq::NewL() |
109 { |
109 { |
110 CRightsReq* self = new( ELeave ) CRightsReq; |
110 CRightsReq* self = new( ELeave ) CRightsReq; |
111 |
111 |
112 CleanupStack::PushL( self ); |
112 CleanupStack::PushL( self ); |
113 self->ConstructL(); |
113 self->ConstructL(); |
114 CleanupStack::Pop(); |
114 CleanupStack::Pop(); |
115 |
115 |
116 return self; |
116 return self; |
117 } |
117 } |
118 |
118 |
119 |
119 |
120 // Destructor |
120 // Destructor |
121 CRightsReq::~CRightsReq() |
121 CRightsReq::~CRightsReq() |
122 { |
122 { |
123 iRoIdList.ResetAndDestroy(); |
123 iRoIdList.ResetAndDestroy(); |
124 iCertificateChain.ResetAndDestroy(); |
124 iCertificateChain.ResetAndDestroy(); |
195 BufAppendBase64L(b, *iCertificateChain[i]); |
195 BufAppendBase64L(b, *iCertificateChain[i]); |
196 BufAppendL(b, KReqCertEnd); |
196 BufAppendL(b, KReqCertEnd); |
197 } |
197 } |
198 BufAppendL(b, KReqCertChainEnd); |
198 BufAppendL(b, KReqCertChainEnd); |
199 } |
199 } |
200 |
200 |
201 if (iTransTrackIDs.Count() || |
201 if (iTransTrackIDs.Count() || |
202 iPeerKeyIdentifier.Length() || |
202 iPeerKeyIdentifier.Length() || |
203 iOcspResponderKeyId || |
203 iOcspResponderKeyId || |
204 iOcspInfoStored) |
204 iOcspInfoStored) |
205 { |
205 { |
206 BufAppendL(b, KReqExtensions); |
206 BufAppendL(b, KReqExtensions); |
207 } |
207 } |
208 |
208 |
209 if (iPeerKeyIdentifier.Length()) |
209 if (iPeerKeyIdentifier.Length()) |
210 { |
210 { |
211 BufAppendL(b, KReqPeerKey); |
211 BufAppendL(b, KReqPeerKey); |
212 BufAppendBase64L(b, iPeerKeyIdentifier); |
212 BufAppendBase64L(b, iPeerKeyIdentifier); |
213 BufAppendL(b, KReqPeerKeyEnd); |
213 BufAppendL(b, KReqPeerKeyEnd); |
214 } |
214 } |
215 |
215 |
216 if (iOcspInfoStored) |
216 if (iOcspInfoStored) |
217 { |
217 { |
218 BufAppendL(b, KReqNoOcspResponse); |
218 BufAppendL(b, KReqNoOcspResponse); |
219 } |
219 } |
220 |
220 |
221 if (iOcspResponderKeyId) |
221 if (iOcspResponderKeyId) |
222 { |
222 { |
223 BufAppendL(b, KReqOcspResponderKeyId); |
223 BufAppendL(b, KReqOcspResponderKeyId); |
224 BufAppendBase64L(b, *iOcspResponderKeyId); |
224 BufAppendBase64L(b, *iOcspResponderKeyId); |
225 BufAppendL(b, KReqOcspResponderKeyIdEnd); |
225 BufAppendL(b, KReqOcspResponderKeyIdEnd); |
226 } |
226 } |
227 |
227 |
228 for ( TInt i = 0; i < iTransTrackIDs.Count() && i < iContentIDs.Count(); i++ ) |
228 for ( TInt i = 0; i < iTransTrackIDs.Count() && i < iContentIDs.Count(); i++ ) |
229 { |
229 { |
230 BufAppendL(b, KReqTransactionContentId); |
230 BufAppendL(b, KReqTransactionContentId); |
231 BufAppendL(b, *iContentIDs[i]); |
231 BufAppendL(b, *iContentIDs[i]); |
232 BufAppendL(b, KReqTransactionContentIdEnd); |
232 BufAppendL(b, KReqTransactionContentIdEnd); |
233 BufAppendL(b, KReqTransactionId); |
233 BufAppendL(b, KReqTransactionId); |
234 BufAppendL(b, *iTransTrackIDs[i]); |
234 BufAppendL(b, *iTransTrackIDs[i]); |
235 BufAppendL(b, KReqTransactionIdEnd); |
235 BufAppendL(b, KReqTransactionIdEnd); |
236 } |
236 } |
237 |
237 |
238 if (iTransTrackIDs.Count() || |
238 if (iTransTrackIDs.Count() || |
239 iPeerKeyIdentifier.Length() || |
239 iPeerKeyIdentifier.Length() || |
240 iOcspResponderKeyId || |
240 iOcspResponderKeyId || |
241 iOcspInfoStored) |
241 iOcspInfoStored) |
242 { |
242 { |