|
1 // Copyright (c) 2002-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 // $Header$ |
|
15 // This header file defines miscellaneous CCmd* command classes, |
|
16 // e.g. CCmdCase and CCmdSelect. |
|
17 // |
|
18 // |
|
19 |
|
20 #ifndef __CMDMISC_H__ |
|
21 #define __CMDMISC_H__ |
|
22 |
|
23 //----------------------------------------------------------------------------- |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <e32cons.h> |
|
27 |
|
28 //----------------------------------------------------------------------------- |
|
29 |
|
30 #include "GT0149.h" // |
|
31 //#include "TextCommands.h" |
|
32 #include "TfrLex.h" |
|
33 #include "ECommandIDs.h" |
|
34 #include "TEngine.h" |
|
35 #include "CCmdBase.h" // Base class for commands |
|
36 #include "CCmdFamily.h" // Command set |
|
37 |
|
38 //----------------------------------------------------------------------------- |
|
39 |
|
40 class CCmdCase : public CCmdBase |
|
41 { |
|
42 public: // Construction and destruction |
|
43 |
|
44 static CCmdCase* NewL ( TInt aCommandId, const TDesC& aKeyphrase ); |
|
45 static CCmdCase* NewLC( TInt aCommandId, const TDesC& aKeyphrase ); |
|
46 virtual ~CCmdCase(); |
|
47 |
|
48 protected: // From CCmdBase |
|
49 |
|
50 void ConstructL( TInt aCommandId, const TDesC& aKeyphrase); |
|
51 CCmdCase() { }; |
|
52 |
|
53 public: // From CCmdBase |
|
54 TBool Recognize( const TDesC& aCommand ); |
|
55 TInt ProcessL ( const TDesC& aCommand ); |
|
56 }; |
|
57 |
|
58 //----------------------------------------------------------------------------- |
|
59 |
|
60 class CCmdEndCase : public CCmdBase |
|
61 { |
|
62 public: // Construction and destruction |
|
63 |
|
64 static CCmdEndCase* NewL ( TInt aCommandId, const TDesC& aKeyphrase ); |
|
65 static CCmdEndCase* NewLC( TInt aCommandId, const TDesC& aKeyphrase ); |
|
66 virtual ~CCmdEndCase(); |
|
67 |
|
68 protected: // From CCmdBase |
|
69 |
|
70 void ConstructL( TInt aCommandId, const TDesC& aKeyphrase); |
|
71 CCmdEndCase() { }; |
|
72 |
|
73 public: // From CCmdBase |
|
74 |
|
75 TBool Recognize( const TDesC& aCommand ); |
|
76 TInt ProcessL ( const TDesC& aCommand ); |
|
77 |
|
78 }; |
|
79 |
|
80 //----------------------------------------------------------------------------- |
|
81 |
|
82 class CCmdSelect : public CCmdBase |
|
83 { |
|
84 public: // Construction and destruction |
|
85 |
|
86 static CCmdSelect* NewL ( TInt aCommandId, const TDesC& aKeyphrase ); |
|
87 static CCmdSelect* NewLC( TInt aCommandId, const TDesC& aKeyphrase ); |
|
88 virtual ~CCmdSelect(); |
|
89 |
|
90 protected: // From CCmdBase |
|
91 |
|
92 void ConstructL( TInt aCommandId, const TDesC& aKeyphrase); |
|
93 CCmdSelect() { }; |
|
94 |
|
95 public: // From CCmdBase |
|
96 |
|
97 TInt ProcessL( const TDesC& aCommand ); |
|
98 |
|
99 public: // New functions |
|
100 |
|
101 TPtrC Selector() const; |
|
102 TBool Selected( const TDesC& aCandidate ); |
|
103 |
|
104 private: // Data |
|
105 |
|
106 HBufC* iSelector; |
|
107 |
|
108 }; |
|
109 |
|
110 //----------------------------------------------------------------------------- |
|
111 |
|
112 #endif // __CMDMISC_H__ |
|
113 |
|
114 //----------------------------------------------------------------------------- |
|
115 // End of File |
|
116 //----------------------------------------------------------------------------- |
|
117 |
|
118 |