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: Map of callback and transaction id.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef __CLANDMARKCALLBACKMAP_H__
|
|
20 |
#define __CLANDMARKCALLBACKMAP_H__
|
|
21 |
|
|
22 |
//INCLUDES
|
|
23 |
#include <e32base.h>
|
|
24 |
|
|
25 |
//FORWARD DECLARATION
|
|
26 |
class MLiwNotifyCallback;
|
|
27 |
|
|
28 |
/**
|
|
29 |
* CLandmarkCallbackMap
|
|
30 |
* This class keeps a map of the transaction id allocated to an asynchronous request with the callback
|
|
31 |
* of the request.
|
|
32 |
*/
|
|
33 |
|
|
34 |
// CLASS DECLARATION
|
|
35 |
NONSHARABLE_CLASS(CLandmarkCallbackMap): public CBase
|
|
36 |
{
|
|
37 |
public:// Constructors
|
|
38 |
|
|
39 |
/**
|
|
40 |
* CLandmarkCallbackMap
|
|
41 |
* Constructor.
|
|
42 |
*
|
|
43 |
* @param aTransactionId The transaction id alloted to asynchronous request.
|
|
44 |
* @param aCallback The callback associated with the asynchronous request.
|
|
45 |
*/
|
|
46 |
inline CLandmarkCallbackMap( TInt32 aTransactionId, MLiwNotifyCallback* aCallback );
|
|
47 |
|
|
48 |
/**
|
|
49 |
* ~CLandmarkCallbackMap
|
|
50 |
* Destructor.
|
|
51 |
*/
|
|
52 |
inline ~CLandmarkCallbackMap() {}
|
|
53 |
|
|
54 |
public:
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Set
|
|
58 |
* Sets the transaction id and callback.
|
|
59 |
*
|
|
60 |
* @param aTransactionId The transaction id alloted to asynchronous request.
|
|
61 |
* @param aCallback The callback associated with the asynchronous request.
|
|
62 |
*/
|
|
63 |
inline void Set( TInt32 aTransactionId, MLiwNotifyCallback* aCallback );
|
|
64 |
|
|
65 |
/**
|
|
66 |
* Get
|
|
67 |
* Gets the transaction id and callback.
|
|
68 |
*
|
|
69 |
* @param aTransactionId The transaction id alloted to asynchronous request.
|
|
70 |
* @param aCallback The reference to the callback associated with the asynchronous request.
|
|
71 |
* @return True if aCallback is set else False.
|
|
72 |
*/
|
|
73 |
inline TBool Get( TInt32 aTransactionId, MLiwNotifyCallback*& aCallback ) const;
|
|
74 |
|
|
75 |
|
|
76 |
private:// Data
|
|
77 |
|
|
78 |
/**
|
|
79 |
* iTransactionId
|
|
80 |
* The transaction id of the async call.
|
|
81 |
*/
|
|
82 |
TInt32 iTransactionId;
|
|
83 |
|
|
84 |
/**
|
|
85 |
* iCallback
|
|
86 |
* The handle to MLiwNotifyCallback.
|
|
87 |
*/
|
|
88 |
MLiwNotifyCallback* iCallback;
|
|
89 |
|
|
90 |
};
|
|
91 |
|
|
92 |
#include "clandmarkcallbackmap.inl"
|
|
93 |
|
|
94 |
#endif // __CLANDMARKCALLBACKMAP_H__
|