|
1 /* |
|
2 * Copyright (c) 2005-2009 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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * @file |
|
16 * This contains CommandProcessor.h |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef __COMMAND_PROCESSOR_H__ |
|
22 #define __COMMAND_PROCESSOR_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 class MCommandProcessorCallback |
|
27 /** |
|
28 * @internalComponent |
|
29 * @test |
|
30 * |
|
31 * Test timer completion callback |
|
32 */ |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * Method from which CCommandProcessor informs the user RunL call |
|
37 * |
|
38 * @leave system wide error |
|
39 */ |
|
40 virtual void NextCommandL() = 0; |
|
41 }; |
|
42 |
|
43 class CCommandProcessor : public CActive |
|
44 /** |
|
45 * @internalComponent |
|
46 * @test |
|
47 * |
|
48 * @see CActive |
|
49 * |
|
50 * Test Active Notification class |
|
51 * |
|
52 */ |
|
53 { |
|
54 public: |
|
55 IMPORT_C virtual ~CCommandProcessor(); |
|
56 IMPORT_C static CCommandProcessor* NewL(MCommandProcessorCallback& aCallback, TInt aPriority=EPriorityStandard); |
|
57 IMPORT_C static CCommandProcessor* NewLC(MCommandProcessorCallback& aCallback, TInt aPriority=EPriorityStandard); |
|
58 |
|
59 IMPORT_C void Activate(); |
|
60 IMPORT_C void KickState(); |
|
61 void RunL(); |
|
62 void DoCancel(); |
|
63 |
|
64 protected: |
|
65 CCommandProcessor(MCommandProcessorCallback& aCallback, TInt aPriority); |
|
66 |
|
67 private: |
|
68 void ConstructL(); |
|
69 |
|
70 private: |
|
71 /** |
|
72 * This is internal and not intended for use. |
|
73 */ |
|
74 MCommandProcessorCallback& iCallback; |
|
75 }; |
|
76 |
|
77 #endif /* __COMMAND_PROCESSOR_H__ */ |