|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Base class for event handlers |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef ASYNCEVENTHANDLERBASE_H |
|
21 #define ASYNCEVENTHANDLERBASE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <DownloadMgrClient.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RHttpDownload; |
|
29 class MDownloadMgrUiLibRegModel; |
|
30 class CAsyncEventHandlerArray; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Base class for event handlers |
|
36 */ |
|
37 NONSHARABLE_CLASS( CAsyncEventHandlerBase ) : public CActive |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * C++ default constructor. It invokes RunL(). |
|
43 */ |
|
44 CAsyncEventHandlerBase( RHttpDownload& aDownload, |
|
45 THttpDownloadEvent aEvent, |
|
46 MDownloadMgrUiLibRegModel& aRegistryModel, |
|
47 CAsyncEventHandlerArray& aOwner ); |
|
48 |
|
49 /** |
|
50 * Destructor. It calls Cancel(). |
|
51 */ |
|
52 virtual ~CAsyncEventHandlerBase(); |
|
53 |
|
54 public: // New functions |
|
55 |
|
56 /** |
|
57 * Getters |
|
58 * @return Reference to the download mamber. |
|
59 */ |
|
60 RHttpDownload& Download(); |
|
61 const RHttpDownload& Download() const; |
|
62 |
|
63 protected: // Data |
|
64 |
|
65 RHttpDownload& iDownload; |
|
66 THttpDownloadEvent iEvent; |
|
67 MDownloadMgrUiLibRegModel& iRegistryModel; |
|
68 CAsyncEventHandlerArray& iOwner; |
|
69 }; |
|
70 |
|
71 #endif /* ASYNCEVENTHANDLERBASE_H */ |