|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Function definitions for VCC Calling State |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef TVCCSTATECALLING_H |
|
21 #define TVCCSTATECALLING_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <e32cmn.h> // HBufC |
|
26 |
|
27 #include "tvccstate.h" |
|
28 |
|
29 /** Calling state name */ |
|
30 const TUint KVccStateCalling = 1; |
|
31 |
|
32 //forward declarations |
|
33 class CVccPerformer; |
|
34 |
|
35 /** |
|
36 * The base class for VCC state machine implementation. |
|
37 * Contains default implementations for the functions. |
|
38 * Current state machine is: |
|
39 * |
|
40 * init -> calling -> releasing -> init |
|
41 * |
|
42 * @lib vccperformer.dll |
|
43 * @since S60 3.2 |
|
44 */ |
|
45 class TVccStateCalling: public TVccState |
|
46 { |
|
47 |
|
48 public: |
|
49 /** |
|
50 * c'tor |
|
51 */ |
|
52 TVccStateCalling(); |
|
53 |
|
54 /** |
|
55 * Links the state i.e. provides transition points. |
|
56 * @param aReleasing reference to the realising state |
|
57 * @param aInit reference to the init state |
|
58 * @param afailing reference to the failing state |
|
59 */ |
|
60 void LinkState( TVccState& aReleasing, |
|
61 TVccState& aInit, |
|
62 TVccState& aFailing); |
|
63 |
|
64 // From base class TVccState |
|
65 |
|
66 /** |
|
67 * @see TVccState::Name() |
|
68 */ |
|
69 TUint Name() const; |
|
70 |
|
71 /** |
|
72 * @See TVccState::HangUp() |
|
73 */ |
|
74 TInt HangUp(CVccPerformer& aContext, MCCPCall& aCall); |
|
75 |
|
76 /** |
|
77 * @see TVccState::CallStateChanged() |
|
78 */ |
|
79 void CallStateChanged( CVccPerformer& aContext, |
|
80 const MCCPCallObserver::TCCPCallState aState, |
|
81 MCCPCall* aCall ); |
|
82 |
|
83 /** |
|
84 * @see TVccState::CallStateChangedWithInband() |
|
85 */ |
|
86 void CallStateChangedWithInband(CVccPerformer& aContext, |
|
87 const MCCPCallObserver::TCCPCallState aState, |
|
88 MCCPCall* aCall ); |
|
89 |
|
90 /** |
|
91 * @see TVccState::CallEventOccurred() |
|
92 */ |
|
93 void CallEventOccurred( CVccPerformer& aContext, |
|
94 const MCCPCallObserver::TCCPCallEvent aEvent, |
|
95 MCCPCall* aCall ); |
|
96 |
|
97 /** |
|
98 * @see TVccState::ErrorOccurred() |
|
99 */ |
|
100 void ErrorOccurred( CVccPerformer& aContext, |
|
101 const TCCPError aError, |
|
102 MCCPCall* aCall ); |
|
103 |
|
104 private: |
|
105 |
|
106 //no copying |
|
107 TVccStateCalling(const TVccStateCalling&); |
|
108 TVccStateCalling operator = (const TVccStateCalling&); |
|
109 |
|
110 /** |
|
111 * Inspects the state changed for possible remote disconnect and other |
|
112 * failing hand-over cases. |
|
113 * @param aContext a state context |
|
114 * @param aState a current state value |
|
115 * @param aCall the call leg emetting the event |
|
116 * @param aCallee the object instance calling the callback |
|
117 * @param aCallback a function to call in case event must be emitted and not suppressed. |
|
118 */ |
|
119 void InspectChangedStates( CVccPerformer& aContext, |
|
120 const MCCPCallObserver::TCCPCallState aState, |
|
121 MCCPCall* aCall, |
|
122 MCCPCallObserver* aCallee, |
|
123 void( MCCPCallObserver::*aCallback)(const MCCPCallObserver::TCCPCallState, MCCPCall*)); |
|
124 |
|
125 private: // data |
|
126 /** |
|
127 * Reference to Releasing state |
|
128 * Not own. |
|
129 */ |
|
130 TVccState* iReleasing; |
|
131 |
|
132 /** |
|
133 * Reference to Init state |
|
134 * Not own. |
|
135 */ |
|
136 TVccState* iInit; |
|
137 |
|
138 /** |
|
139 * Reference to Failing state |
|
140 * Not own. |
|
141 */ |
|
142 TVccState* iFailing; |
|
143 }; |
|
144 |
|
145 #endif // TVCCSTATECALLING_H |
|
146 |
|
147 // End of File |