equal
deleted
inserted
replaced
|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Standard example header for EPOC/32 SDK examples running as text console applications |
|
15 // |
|
16 |
|
17 #ifndef __CMSTD_H |
|
18 #define __CMSTD_H |
|
19 |
|
20 #include <e32base.h> |
|
21 |
|
22 class TestScheduler : public CActiveScheduler |
|
23 { |
|
24 public: |
|
25 void ErrorL(TInt aError) const; |
|
26 }; |
|
27 |
|
28 class CActiveConsole : public CActive |
|
29 { |
|
30 public: |
|
31 // Construction |
|
32 static CActiveConsole* NewLC( CConsoleBase* aConsole ); |
|
33 void ConstructL(); |
|
34 |
|
35 // Destruction |
|
36 ~CActiveConsole(); |
|
37 |
|
38 // Issue request |
|
39 void RequestCharacter(); |
|
40 |
|
41 // Cancel request. |
|
42 // Defined as pure virtual by CActive; |
|
43 // implementation provided by this class. |
|
44 void DoCancel(); |
|
45 |
|
46 // Service completed request. |
|
47 // Defined as pure virtual by CActive; |
|
48 // implementation provided by this class, |
|
49 void RunL(); |
|
50 |
|
51 // Called from RunL() - an implementation must be provided |
|
52 // by derived classes to handle the completed request |
|
53 virtual void ProcessKeyPress(TChar /*aChar*/) {}; |
|
54 |
|
55 protected: |
|
56 // Data members defined by this class |
|
57 CConsoleBase* iConsole; // A console for reading from |
|
58 private: |
|
59 CActiveConsole( CConsoleBase* aConsole ); |
|
60 }; |
|
61 |
|
62 #endif |