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