1 /* |
|
2 * Copyright (c) 2006-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: Processor object for running harvester requests |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef HARVESTERNOTIFICATIONQUEUE_H |
|
20 #define HARVESTERNOTIFICATIONQUEUE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class CHarvesterClientAO; |
|
25 class MHarvestObserver; |
|
26 |
|
27 /** |
|
28 * Processor object for running queued tasks. |
|
29 * |
|
30 */ |
|
31 class CHarvesterNotificationQueue: public CBase |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 * Two-phased constructor. |
|
37 * |
|
38 * @return Instance of CHarvesterNotificationQueue. |
|
39 */ |
|
40 static CHarvesterNotificationQueue* NewL(); |
|
41 |
|
42 /** |
|
43 * Destructor |
|
44 * |
|
45 */ |
|
46 virtual ~CHarvesterNotificationQueue(); |
|
47 |
|
48 /** |
|
49 * Adds new request to the queue. |
|
50 * |
|
51 * @param aRequest Request to be added to the queue. |
|
52 */ |
|
53 void AddRequestL( CHarvesterClientAO* aRequest ); |
|
54 |
|
55 /** |
|
56 * Marks request completed. |
|
57 */ |
|
58 void Cleanup( TBool aShutdown ); |
|
59 |
|
60 void SetObserver( MHarvestObserver* aObserver ); |
|
61 |
|
62 private: |
|
63 |
|
64 /** |
|
65 * C++ default constructor |
|
66 * @return Instance of CHarvesterNotificationQueue. |
|
67 */ |
|
68 CHarvesterNotificationQueue(); |
|
69 |
|
70 /** |
|
71 * Symbian 2nd phase constructor can leave. |
|
72 */ |
|
73 void ConstructL(); |
|
74 |
|
75 private: |
|
76 |
|
77 /** |
|
78 * Array of active objects for each pending harvester request. |
|
79 */ |
|
80 RPointerArray <CHarvesterClientAO> iRequests; |
|
81 |
|
82 }; |
|
83 |
|
84 #endif // HARVESTERNOTIFICATIONQUEUE_H |
|