|
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 #include <e32base.h> |
|
17 #include "cstringpoolmanager.h" |
|
18 #include <upnpdescriptionschema.h> |
|
19 |
|
20 CStringPoolManager::CStringPoolManager() |
|
21 { |
|
22 } |
|
23 |
|
24 EXPORT_C CStringPoolManager* CStringPoolManager::NewL(const TStringTable& aStringTable) |
|
25 { |
|
26 CStringPoolManager* mgr = new (ELeave) CStringPoolManager(); |
|
27 CleanupStack::PushL(mgr); |
|
28 mgr->ConstructL(aStringTable); |
|
29 CleanupStack::Pop(mgr); |
|
30 return mgr; |
|
31 } |
|
32 EXPORT_C CStringPoolManager* CStringPoolManager::NewL() |
|
33 { |
|
34 CStringPoolManager* mgr = new (ELeave) CStringPoolManager(); |
|
35 CleanupStack::PushL(mgr); |
|
36 mgr->ConstructL(UPNPDESCRIPTIONXMLTAGS::Table ); |
|
37 CleanupStack::Pop(mgr); |
|
38 return mgr; |
|
39 } |
|
40 EXPORT_C void CStringPoolManager::Release() |
|
41 { |
|
42 delete this; |
|
43 } |
|
44 |
|
45 EXPORT_C RStringPool& CStringPoolManager::StringPool() |
|
46 { |
|
47 return iPool; |
|
48 } |
|
49 |
|
50 EXPORT_C void CStringPoolManager::SetStringTableL( const TStringTable& aStringTable ) |
|
51 { |
|
52 iStringTableArray.AppendL( aStringTable ); |
|
53 iPool.OpenL( aStringTable ); |
|
54 } |
|
55 EXPORT_C const TStringTable& CStringPoolManager::GetUPnPTable() |
|
56 { |
|
57 return UPNPDESCRIPTIONXMLTAGS::Table; |
|
58 } |
|
59 CStringPoolManager::~CStringPoolManager() |
|
60 { |
|
61 iPool.Close(); |
|
62 iStringTableArray.Close(); |
|
63 } |
|
64 |
|
65 void CStringPoolManager::ConstructL(const TStringTable& aStringTable) |
|
66 { |
|
67 iStringTableArray.AppendL( aStringTable ); |
|
68 iPool.OpenL( aStringTable ); |
|
69 } |
|
70 |
|
71 |
|
72 |