|
1 /** @file |
|
2 * Copyright (c) 2007 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: Defines inline funtions for CUpnpContentHandler class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // ----------------------------------------------------------------------------- |
|
20 // CUpnpContentHandler::IsTagRepeatedL |
|
21 // Returns ETrue if tag on aPosition has been already found. |
|
22 // If not just set that now it is found. |
|
23 // ----------------------------------------------------------------------------- |
|
24 // |
|
25 template <class T> inline TBool CUpnpContentHandler::IsTagRepeated( |
|
26 TInt aPosition, TBitFlagsT<T>& aFoundTags ) |
|
27 { |
|
28 if ( aFoundTags.IsSet( aPosition ) ) |
|
29 { |
|
30 return ETrue; |
|
31 } |
|
32 aFoundTags.Set( aPosition ); |
|
33 return EFalse; |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CUpnpContentHandler::RepeatedTagCheckL |
|
38 // Leaves if tag on aPosition has been already found. |
|
39 // If not just set that now it is found. |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 template <class T> inline void CUpnpContentHandler::RepeatedTagCheckL( |
|
43 TInt aPosition, TBitFlagsT<T>& aFoundTags ) |
|
44 { |
|
45 if ( IsTagRepeated( aPosition, aFoundTags ) ) |
|
46 { |
|
47 User::Leave( KErrArgument ); //maxOccurents=1 |
|
48 } |
|
49 } |
|
50 |
|
51 // End of File |