|
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 // |
|
15 |
|
16 void CUPnPDevice::AppendToServiceInfoTableL(const CUPnPServiceInfo* aValue) |
|
17 { |
|
18 iServiceInfo.AppendL(aValue); |
|
19 } |
|
20 |
|
21 TInt CUPnPDevice::CountOfServiceInfoTable () const |
|
22 { |
|
23 return iServiceInfo.Count(); |
|
24 } |
|
25 |
|
26 CUPnPServiceInfo* CUPnPDevice::AtServiceInfoTable ( TInt aIndex) const |
|
27 { |
|
28 return iServiceInfo[aIndex]; |
|
29 } |
|
30 |
|
31 void CUPnPDevice::DeleteServiceInfoAtIndexL(const TInt aIndex) |
|
32 { |
|
33 if( aIndex>=0 && aIndex<iServiceInfo.Count() ) |
|
34 { |
|
35 // first delete the object and then remove it from the array |
|
36 delete iServiceInfo[aIndex]; |
|
37 iServiceInfo.Remove(aIndex); |
|
38 } |
|
39 else |
|
40 { |
|
41 User::Leave(KErrNotFound); |
|
42 } |
|
43 } |
|
44 void CUPnPDevice::AppendToEmbeddedDeviceInfoTableL(const CUPnPDevice* aValue) |
|
45 { |
|
46 iEmbeddedDeviceInfo.AppendL(aValue); |
|
47 } |
|
48 |
|
49 TInt CUPnPDevice::CountOfEmbeddedDeviceInfoTable () const |
|
50 { |
|
51 return iEmbeddedDeviceInfo.Count(); |
|
52 } |
|
53 |
|
54 CUPnPDevice* CUPnPDevice::AtEmbeddedDeviceInfoTable(const TInt aIndex) const |
|
55 { |
|
56 return iEmbeddedDeviceInfo[aIndex]; |
|
57 } |
|
58 void CUPnPDevice::DeleteEmbeddedDeviceInfoAtIndexL(const TInt aIndex) |
|
59 { |
|
60 if( aIndex>=0 && aIndex<iEmbeddedDeviceInfo.Count() ) |
|
61 { |
|
62 // first delete the object and then remove it from the array |
|
63 delete iEmbeddedDeviceInfo[aIndex]; |
|
64 iEmbeddedDeviceInfo.Remove(aIndex); |
|
65 } |
|
66 else |
|
67 { |
|
68 User::Leave(KErrNotFound); |
|
69 } |
|
70 |
|
71 } |
|
72 void CUPnPDevice::AppendToIconInfoTableL(const CUPnPIconInfo* aValue) |
|
73 { |
|
74 TRAPD(err, iIconInfo.Append(aValue)); |
|
75 TInt xx=0; |
|
76 } |
|
77 |
|
78 TInt CUPnPDevice::CountOfIconInfoTable() const |
|
79 { |
|
80 return iIconInfo.Count(); |
|
81 } |
|
82 |
|
83 CUPnPIconInfo* CUPnPDevice::AtIconInfoTable( TInt aIndex) const |
|
84 { |
|
85 return iIconInfo[aIndex]; |
|
86 } |
|
87 void CUPnPDevice::SetDlna( TBool aValue) |
|
88 { |
|
89 iHasDlnaTag = aValue; |
|
90 } |
|
91 |
|
92 TBool CUPnPDevice::Dlna() const |
|
93 { |
|
94 return iHasDlnaTag; |
|
95 } |
|
96 |
|
97 //------------------------------------------------------------------- |
|
98 |
|
99 |
|
100 void CUPnPDeviceDescription::SetDeviceObjectL( CUPnPDevice *aValue) |
|
101 { |
|
102 iDeviceObj = aValue; |
|
103 } |
|
104 |
|
105 CUPnPDevice* CUPnPDeviceDescription::DeviceObject() const |
|
106 { |
|
107 return iDeviceObj; |
|
108 } |
|
109 |
|
110 |
|
111 void CUPnPDeviceDescription::SetMinorNumberL(const TInt aValue) |
|
112 { |
|
113 iVersion.iMinor = aValue; |
|
114 } |
|
115 |
|
116 const TInt CUPnPDeviceDescription::MinorNumber () const |
|
117 { |
|
118 return iVersion.iMinor; |
|
119 } |
|
120 |
|
121 void CUPnPDeviceDescription::SetMajorNumberL(const TInt aValue) |
|
122 { |
|
123 iVersion.iMajor = aValue; |
|
124 } |
|
125 |
|
126 const TInt CUPnPDeviceDescription::MajorNumber () const |
|
127 { |
|
128 return iVersion.iMajor; |
|
129 } |
|
130 |
|
131 |