author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 18 Jan 2010 21:02:57 +0200 | |
changeset 27 | 02682e02e51f |
parent 26 | 5d0ec8b709be |
permissions | -rw-r--r-- |
5 | 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 |
||
26
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
49 |
/** |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
50 |
* ~CLandmarkObserver |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
51 |
* Destructor. |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
52 |
*/ |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
53 |
~CLandmarkObserver(); |
5 | 54 |
|
55 |
public:// from MLandmarkObserver |
|
56 |
||
26
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
57 |
// HandleLandmarkItemsL. |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
58 |
// Notifies client of state change and calls MLiwNotifyCallback::HandleNotifyL(). |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
59 |
void HandleLandmarkItemsL(CPosLmItemIterator* aIterator, |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
60 |
TInt32 aTransactionId, TInt aError, CLandmarkHandler* aHandler); |
5 | 61 |
|
26
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
62 |
// HandleCategoryItemsL. |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
63 |
// Notifies client of state change and calls MLiwNotifyCallback::HandleNotifyL(). |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
64 |
void HandleCategoryItemsL(CPosLmItemIterator* aIterator, |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
65 |
TInt32 aTransactionId, TInt aError, CLandmarkHandler* aHandler); |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
66 |
|
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
67 |
void HandleAddItemsL(TPosLmItemId aId, TInt32 aTransactionId, TInt aError); |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
68 |
|
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
69 |
void HandleItemsL(TInt32 aTransactionId, TInt aError); |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
70 |
|
5 | 71 |
|
72 |
private: // Constructors |
|
73 |
||
74 |
/** |
|
75 |
* CLandmarkObserver. |
|
76 |
* C++ default constructor. |
|
77 |
* @param aLmIface The CLandmarkInterface instance. |
|
78 |
*/ |
|
79 |
CLandmarkObserver( CLandmarkInterface* aLmIface ); |
|
80 |
||
81 |
private: //Data |
|
82 |
||
83 |
/** |
|
84 |
* iLmIface |
|
85 |
* Handle to CLandmarkInterface instance. |
|
86 |
*/ |
|
87 |
CLandmarkInterface* iLmIface; |
|
26
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
88 |
/** |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
89 |
* iId |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
90 |
* The id of the added/modified landmark/category. |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
91 |
*/ |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
92 |
HBufC* iId; |
5 | 93 |
}; |
94 |
||
95 |
#endif // __CLANDMARKOBSERVER_H__ |
|
96 |
||
97 |
// End of File |