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