|
1 /* |
|
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 the License "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: CLandmarkObserver class for handling async requests |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CLANDMARKOBSERVER_H__ |
|
20 #define __CLANDMARKOBSERVER_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "mlandmarkobserver.h" |
|
24 |
|
25 //FORWARD DECLARATION |
|
26 class CLiwGenericParamList; |
|
27 class CLandmarkInterface; |
|
28 |
|
29 /** |
|
30 * CLandmarkObserver |
|
31 * This class acts as an observer for all asynchronous requests. After the request |
|
32 * is completed, it checks for error and packs it in output param list. If there |
|
33 * is no error, then the iterator is also packed into the output param list. |
|
34 */ |
|
35 // CLASS DECLARATION |
|
36 NONSHARABLE_CLASS(CLandmarkObserver): public CBase, public MLandmarkObserver |
|
37 { |
|
38 public: // New methods |
|
39 |
|
40 /** |
|
41 * NewL. |
|
42 * Two-phased constructor. |
|
43 * Create a CLandmarkObserver object. |
|
44 * @param aLmIface The CLandmarkInterface instance. |
|
45 * @return A pointer to the newly created instance of CLandmarkObserver. |
|
46 */ |
|
47 static CLandmarkObserver* NewL( CLandmarkInterface* aLmIface ); |
|
48 |
|
49 /** |
|
50 * ~CLandmarkObserver |
|
51 * Destructor. |
|
52 */ |
|
53 ~CLandmarkObserver() {} |
|
54 |
|
55 public:// from MLandmarkObserver |
|
56 |
|
57 // HandleLandmarkItemsL. |
|
58 // Notifies client of state change and calls MLiwNotifyCallback::HandleNotifyL(). |
|
59 void HandleLandmarkItemsL( CPosLmItemIterator* aIterator, |
|
60 TInt32 aTransactionId, TInt aError, const TDesC& aDatabaseUri ); |
|
61 |
|
62 // HandleCategoryItemsL. |
|
63 // Notifies client of state change and calls MLiwNotifyCallback::HandleNotifyL(). |
|
64 void HandleCategoryItemsL( CPosLmItemIterator* aIterator, |
|
65 TInt32 aTransactionId, TInt aError, const TDesC& aDatabaseUri ); |
|
66 |
|
67 private: // Constructors |
|
68 |
|
69 /** |
|
70 * CLandmarkObserver. |
|
71 * C++ default constructor. |
|
72 * @param aLmIface The CLandmarkInterface instance. |
|
73 */ |
|
74 CLandmarkObserver( CLandmarkInterface* aLmIface ); |
|
75 |
|
76 private: //Data |
|
77 |
|
78 /** |
|
79 * iLmIface |
|
80 * Handle to CLandmarkInterface instance. |
|
81 */ |
|
82 CLandmarkInterface* iLmIface; |
|
83 }; |
|
84 |
|
85 #endif // __CLANDMARKOBSERVER_H__ |
|
86 |
|
87 // End of File |