|
1 /* |
|
2 * Copyright (c) 2007 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: CMnActiveCallback class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MN_ACTIVECALLBACK_H_ |
|
20 #define MN_ACTIVECALLBACK_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class CMnMapImage; |
|
25 class MMnMapImageRenderCallback; |
|
26 class RMnMapImageServiceClient; |
|
27 |
|
28 /** This is an active object, which calls MMnMapImageRenderCallback, |
|
29 when its asyncronous request is completed. Used to wrap |
|
30 asynchronous CMnMapImage::RenderL. */ |
|
31 NONSHARABLE_CLASS( CMnActiveCallback ): public CActive |
|
32 { |
|
33 public: |
|
34 static CMnActiveCallback* NewL( |
|
35 CMnMapImage& aOwner, |
|
36 RMnMapImageServiceClient& aSession ); |
|
37 |
|
38 void StartL( CFbsBitmap& aBitmap, MMnMapImageRenderCallback& aCallback ); |
|
39 |
|
40 protected: // From CActive |
|
41 void RunL(); |
|
42 void DoCancel(); |
|
43 TInt RunError( TInt aError ); |
|
44 |
|
45 private: |
|
46 CMnActiveCallback( |
|
47 CMnMapImage& aOwner, |
|
48 RMnMapImageServiceClient& aSession ); |
|
49 |
|
50 private: |
|
51 CMnMapImage& iOwner; |
|
52 RMnMapImageServiceClient& iSession; |
|
53 MMnMapImageRenderCallback* iCallback; |
|
54 }; |
|
55 |
|
56 #endif //MN_ACTIVECALLBACK_H_ |