|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Implementation of collection manager API for external use |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "glxcollectionmanager.h" |
|
22 #include "glxcollectionmanagerimpl.h" |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // NewL |
|
26 // ----------------------------------------------------------------------------- |
|
27 // |
|
28 EXPORT_C CGlxCollectionManager* CGlxCollectionManager::NewL() |
|
29 { |
|
30 CGlxCollectionManager* self = new (ELeave) CGlxCollectionManager(); |
|
31 CleanupStack::PushL(self); |
|
32 self->ConstructL(); |
|
33 CleanupStack::Pop(self); |
|
34 return self; |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // Constructor |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CGlxCollectionManager::CGlxCollectionManager() |
|
42 { |
|
43 |
|
44 } |
|
45 // ----------------------------------------------------------------------------- |
|
46 // Destructor |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 EXPORT_C CGlxCollectionManager::~CGlxCollectionManager() |
|
50 { |
|
51 delete iImplementation; |
|
52 } |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CGlxCollectionManager::AddToCollectionL |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 EXPORT_C void CGlxCollectionManager::AddToCollectionL(const TDesC& aUri, |
|
59 TCollection aCollection, TRequestStatus& aRequestStatus) |
|
60 { |
|
61 iImplementation->AddToContainerL(aUri, aCollection, aRequestStatus); |
|
62 } |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CGlxCollectionManager::AddToCollectionL |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 EXPORT_C void CGlxCollectionManager::AddToCollectionL(const TDesC& aUri, |
|
68 TUint32 aCollectionId, TRequestStatus& aRequestStatus) |
|
69 { |
|
70 iImplementation->AddToContainerL(aUri, aCollectionId, aRequestStatus); |
|
71 } |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CGlxCollectionManager::CollectionInfoL |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 EXPORT_C void CGlxCollectionManager::CollectionInfoL(CGlxCollectionInfo& aInfo, |
|
77 TRequestStatus& aRequestStatus) |
|
78 { |
|
79 iImplementation->CollectionInfoL(aInfo, aRequestStatus); |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CGlxCollectionManager::Cancel |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 EXPORT_C void CGlxCollectionManager::Cancel() |
|
87 { |
|
88 iImplementation->Cancel(); |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // Second phase constructor |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 void CGlxCollectionManager::ConstructL() |
|
96 { |
|
97 iImplementation = new (ELeave) |
|
98 CGlxCollectionManagerImpl(); |
|
99 } |