284 } |
284 } |
285 |
285 |
286 return fileMode; |
286 return fileMode; |
287 } |
287 } |
288 |
288 |
289 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT |
|
290 |
|
291 TInt TF32DefaultAttributes::GetAttribute(const TDesC8& /*aHeaderData*/, TInt aAttribute, TInt& aValue) |
|
292 { |
|
293 return GetAttribute(aAttribute, aValue, KNullDesC); |
|
294 } |
|
295 |
|
296 TInt TF32DefaultAttributes::GetAttributeSet(const TDesC8& aHeaderData, RAttributeSet& aAttributeSet) |
|
297 { |
|
298 TInt i = 0; |
|
299 TInt attribute = 0; |
|
300 TInt value = 0; |
|
301 TInt err = KErrNone; |
|
302 TInt numAttributes = aAttributeSet.Count(); |
|
303 |
|
304 // loop through all the attriutes in the set and find their values |
|
305 for(i = 0; i < numAttributes; i++) |
|
306 { |
|
307 attribute = aAttributeSet[i]; |
|
308 err = GetAttribute(aHeaderData, attribute, value); |
|
309 aAttributeSet.SetValue(attribute, value, err); |
|
310 } |
|
311 return KErrNone; |
|
312 } |
|
313 |
|
314 TInt TF32DefaultAttributes::GetStringAttribute(const TDesC8& /*aHeaderData*/, TInt aAttribute, TDes& aValue) |
|
315 { |
|
316 TInt err = KErrNone; |
|
317 TBuf8 <KMaxDataTypeLength> mimeType; |
|
318 |
|
319 switch(aAttribute) |
|
320 { |
|
321 case EMimeType: |
|
322 aValue.Copy(KNullDesC()); |
|
323 break; |
|
324 case EContentID: |
|
325 aValue.Copy(KDefaultContentObject()); |
|
326 break; |
|
327 default: |
|
328 err = KErrCANotSupported; |
|
329 break; |
|
330 }; |
|
331 return err; |
|
332 } |
|
333 |
|
334 TInt TF32DefaultAttributes::GetStringAttributeSet(const TDesC8& aHeaderData, RStringAttributeSet& aStringAttributeSet) |
|
335 { |
|
336 TInt i = 0; |
|
337 TInt attribute = 0; |
|
338 TInt err = KErrNone; |
|
339 TBuf <KMaxDataTypeLength> buf; |
|
340 |
|
341 TInt numAttributes = aStringAttributeSet.Count(); |
|
342 |
|
343 // loop through all the attriutes in the set and find their values |
|
344 for(i = 0; i < numAttributes; i++) |
|
345 { |
|
346 buf.SetLength(0); |
|
347 attribute = aStringAttributeSet[i]; |
|
348 err = GetStringAttribute(aHeaderData, attribute, buf); |
|
349 err = aStringAttributeSet.SetValue(attribute, buf, err); |
|
350 if(err != KErrNone) |
|
351 { |
|
352 return err; |
|
353 } |
|
354 } |
|
355 return KErrNone; |
|
356 } |
|
357 |
|
358 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT |
|