|
1 /* |
|
2 * Copyright (c) 2004 - 2007 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 "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Call control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CVTCTLCALLCONTROL_H |
|
21 #define CVTCTLCALLCONTROL_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "MVtCtlCallControl.h" |
|
26 #include "MVtCtlCallStatusObserver.h" |
|
27 #include <etelmm.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class MVtCtlEventObserver; |
|
31 class CVtCtlSessionContainer; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Call control implementation. |
|
37 * |
|
38 * @lib CSCallCtrl.lib |
|
39 * @since 2.6 |
|
40 */ |
|
41 NONSHARABLE_CLASS( CVtCtlCallControl ) : |
|
42 public CBase, |
|
43 public MVtCtlCallControl, |
|
44 public MVtCtlCallStatusObserver |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 * @param aEventObserver reference to event observer |
|
51 * @param aCommandObserver reference to command observer |
|
52 * @return call control |
|
53 */ |
|
54 static CVtCtlCallControl* NewL( |
|
55 MVtCtlEventObserver& aEventObserver ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CVtCtlCallControl(); |
|
61 |
|
62 public: // From MVtCtlCallControl |
|
63 |
|
64 /** |
|
65 * @see MVtCtlCallControl::GetDuration |
|
66 */ |
|
67 virtual TInt GetDuration( |
|
68 TVtCtlSessionId aId, |
|
69 TVtCtlDuration& aDuration ); |
|
70 |
|
71 |
|
72 /** |
|
73 * @see MVtCtlCallControl::GetSessionInfoL |
|
74 */ |
|
75 virtual void GetSessionInfoL( |
|
76 TVtCtlSessionId aId, |
|
77 TDes8& aInfo ); |
|
78 |
|
79 /** |
|
80 * @see MVtCtlCallControl::GetSessionState |
|
81 */ |
|
82 virtual TVtCtlState GetSessionState( |
|
83 TVtCtlSessionId aId ) const; |
|
84 |
|
85 /** |
|
86 * @see MVtCtlCallControl::GetPreviousPreviousState |
|
87 */ |
|
88 virtual TVtCtlState GetPreviousPreviousState( |
|
89 TVtCtlSessionId aId ) const; |
|
90 |
|
91 public: // from MVtCtlCallStatusObserver |
|
92 |
|
93 /** |
|
94 * @see MVtCtlCallStatusObserver::HandleCallStatusChangeL |
|
95 */ |
|
96 virtual void HandleCallStatusChangeL( |
|
97 TVtCtlSessionId aId, |
|
98 MVtCtlCallControl::TVtCtlState aStatus, |
|
99 MVtCtlCallControl::TVtCtlState aPreviousStatus ); |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * C++ constructor. |
|
105 */ |
|
106 CVtCtlCallControl( |
|
107 MVtCtlEventObserver& aEventObserver ); |
|
108 |
|
109 /** |
|
110 * By default Symbian 2nd phase constructor is private. |
|
111 */ |
|
112 void ConstructL(); |
|
113 |
|
114 private: |
|
115 |
|
116 /** |
|
117 * Validates that data passed as descriptor is of |
|
118 * correct type. If not leaves KErrNotSupported. |
|
119 * @param aData TVtCtlType derived class represented as descriptor |
|
120 * @param aExtension expected type |
|
121 */ |
|
122 static void ValidateDataExtensionL( |
|
123 TDesC8& aData, |
|
124 TInt aExtension ); |
|
125 |
|
126 private: // Data |
|
127 |
|
128 // Event observer |
|
129 MVtCtlEventObserver& iEventObserver; |
|
130 |
|
131 // Container for ETel sessions |
|
132 CVtCtlSessionContainer* iContainer; |
|
133 }; |
|
134 |
|
135 #endif // CVTCTLCALLCONTROL_H |
|
136 |
|
137 // End of File |