|
1 /** @file |
|
2 * Copyright (c) 2005-2006 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: UPnP container class implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <e32base.h> |
|
21 #include "upnpobject.h" |
|
22 #include "upnpitemlist.h" |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 // ============================ MEMBER FUNCTIONS =============================== |
|
31 |
|
32 // ============================ MEMBER FUNCTIONS =============================== |
|
33 |
|
34 // ----------------------------------------------------------------------------- |
|
35 // CUpnpItemList::CUpnpItemList |
|
36 // C++ default constructor can NOT contain any code, that |
|
37 // might leave. |
|
38 // ----------------------------------------------------------------------------- |
|
39 // |
|
40 CUpnpItemList::CUpnpItemList() |
|
41 { |
|
42 } |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // CUpnpItemList::ConstructL |
|
46 // Symbian 2nd phase constructor can leave. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 void CUpnpItemList::ConstructL( ) |
|
50 { |
|
51 CUpnpObjectList::ConstructL(); |
|
52 } |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CUpnpItemList::NewL |
|
56 // Two-phased constructor. |
|
57 // ----------------------------------------------------------------------------- |
|
58 // |
|
59 EXPORT_C CUpnpItemList* CUpnpItemList::NewL() |
|
60 { |
|
61 CUpnpItemList* self = NewLC(); |
|
62 CleanupStack::Pop(self); |
|
63 |
|
64 return self; |
|
65 } |
|
66 // ----------------------------------------------------------------------------- |
|
67 // CUpnpItemList::NewL |
|
68 // Two-phased constructor. |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 EXPORT_C CUpnpItemList* CUpnpItemList::NewLC() |
|
72 { |
|
73 CUpnpItemList* self = new( ELeave ) CUpnpItemList; |
|
74 |
|
75 CleanupStack::PushL( self ); |
|
76 self->ConstructL( ); |
|
77 |
|
78 return self; |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // CUpnpItemList::~CUpnpItemList |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 CUpnpItemList::~CUpnpItemList() |
|
86 { |
|
87 } |
|
88 // ----------------------------------------------------------------------------- |
|
89 // CUpnpItemList::AppendObjectL |
|
90 // ----------------------------------------------------------------------------- |
|
91 // |
|
92 EXPORT_C void CUpnpItemList::AppendObjectL( CUpnpObject& aNewObject ) |
|
93 { |
|
94 // leave if not an item |
|
95 if(aNewObject.ObjectType() != EUPnPItem) |
|
96 { |
|
97 User::Leave(KErrArgument); |
|
98 } |
|
99 |
|
100 CUpnpObjectList::AppendObjectL(aNewObject); |
|
101 } |
|
102 |
|
103 // End of File |