|
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 // |
|
15 |
|
16 |
|
17 #ifndef __CBASEMENUASYNC_H__ |
|
18 #define __CBASEMENUASYNC_H__ |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <etel3rdparty.h> |
|
22 #include <e32cons.h> |
|
23 #include "CISVAPIAsync.h" |
|
24 |
|
25 _LIT(KNewLine, "\n"); |
|
26 _LIT(KError, "iStatus != KErrNone, Something's Wrong!\n"); |
|
27 |
|
28 /** |
|
29 Base Class providing functionality for and control of Etel 3rd Party Instances. |
|
30 Also controls user input and handles displaying information to the user. |
|
31 */ |
|
32 class CBaseMenuAsync : public CActive, public MExecAsync |
|
33 { |
|
34 |
|
35 // Methods |
|
36 public: |
|
37 void Start(); |
|
38 void CompleteOwnRequest(TInt aErr); |
|
39 void PostOwnRequest(); |
|
40 virtual void Terminate(); |
|
41 |
|
42 protected: |
|
43 CBaseMenuAsync(CConsoleBase& aConsole); |
|
44 |
|
45 void GetInput(); |
|
46 inline CTelephony* GetTelObj() const; |
|
47 inline CConsoleBase* GConsole() const; |
|
48 virtual void DoCancel() = 0; |
|
49 void ConstructL(); |
|
50 // Data |
|
51 protected: |
|
52 /** |
|
53 The current operating state of the active object. |
|
54 */ |
|
55 TState iState; |
|
56 /** |
|
57 CTelephony Instance used by all member active objects |
|
58 to make calls to ETel ISV. |
|
59 */ |
|
60 CTelephony* iTelephony; |
|
61 /** |
|
62 Active object to perform next operations on. |
|
63 */ |
|
64 CISVAPIBase* iLastOperation; |
|
65 /** |
|
66 Console instance. |
|
67 */ |
|
68 CConsoleBase* iConsole; |
|
69 }; |
|
70 |
|
71 /** |
|
72 Returns a pointer to object pointed to by iTelephony. |
|
73 |
|
74 @return Pointer to CTelephony object used to make ETel ISV calls |
|
75 */ |
|
76 inline CTelephony* CBaseMenuAsync::GetTelObj() const |
|
77 { |
|
78 return iTelephony; |
|
79 } |
|
80 |
|
81 /** |
|
82 Returns a pointer to object pointed to by iConsole. |
|
83 |
|
84 @return Pointer to CConsoleBase object used to display output |
|
85 */ |
|
86 inline CConsoleBase* CBaseMenuAsync::GConsole() const |
|
87 { |
|
88 return iConsole; |
|
89 } |
|
90 |
|
91 #endif // __CBASEMENUASYNC_H__ |
|
92 |