|
1 /* |
|
2 * Copyright (c) 2006-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: Establishing state class for outgoing hold/resume requests. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SVPHOLDOUTESTABLISHINGSTATE_H |
|
20 #define SVPHOLDOUTESTABLISHINGSTATE_H |
|
21 |
|
22 #include "svpholdstatebase.h" |
|
23 #include "svpholdcontext.h" |
|
24 #include "svputdefs.h" |
|
25 |
|
26 /** |
|
27 * Establishing state for local hold/resume requests. |
|
28 * @lib svp.dll |
|
29 * @since Series 60 3.2 |
|
30 */ |
|
31 class CSVPHoldOutEstablishingState : public CSVPHoldStateBase |
|
32 { |
|
33 public: // Constructors and destructor |
|
34 |
|
35 /** |
|
36 * Two-phased constructor. |
|
37 */ |
|
38 static CSVPHoldOutEstablishingState* NewLC(); |
|
39 |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 virtual ~CSVPHoldOutEstablishingState(); |
|
44 |
|
45 protected: // Functions from base classes |
|
46 |
|
47 /** |
|
48 * From CSVPHoldStateBase Apply concrete state. |
|
49 */ |
|
50 void DoApplyL( CSVPHoldContext& aContext ); |
|
51 |
|
52 /** |
|
53 * From CSVPHoldStateBase Called when the state is entered. |
|
54 */ |
|
55 void DoEnter( CSVPHoldContext& aContext ); |
|
56 |
|
57 /** |
|
58 * Checks if OutEstablishingState is active. |
|
59 */ |
|
60 TBool IsOutEstablishingStateActive(); |
|
61 |
|
62 private: |
|
63 |
|
64 /** |
|
65 * C++ default constructor. |
|
66 */ |
|
67 CSVPHoldOutEstablishingState(); |
|
68 |
|
69 /** |
|
70 * Handles local cases. |
|
71 */ |
|
72 void HandleLocalHoldL( CSVPHoldContext& aContext, |
|
73 CMceMediaStream* aMediaStream, |
|
74 TSVPHoldStateIndex& aNextState ); |
|
75 /** |
|
76 * Handles local hold case. |
|
77 */ |
|
78 void HandleLocalHoldingL( CSVPHoldContext& aContext, |
|
79 CMceMediaStream* mediaStream, |
|
80 TSVPHoldStateIndex& aNextState, |
|
81 TSVPHoldStateIndex aState = 0 ); |
|
82 |
|
83 /** |
|
84 * Handles local resume case. |
|
85 */ |
|
86 void HandleLocalResumingL( CSVPHoldContext& aContext, |
|
87 CMceMediaStream* mediaStream, |
|
88 TSVPHoldStateIndex& aNextState, |
|
89 TSVPHoldStateIndex aState = 0 ); |
|
90 |
|
91 /** |
|
92 * Checks acceptability of direction attribute from response. |
|
93 */ |
|
94 TInt CheckAttributeL( MDesC8Array* aAttributeLines, |
|
95 KSVPHoldAttributeIndex aNeededAttribute, |
|
96 TSVPHoldStateIndex& aNextState, |
|
97 CSVPHoldContext& aContext ); |
|
98 |
|
99 /** |
|
100 * Checks acceptability of direction attribute from response. |
|
101 */ |
|
102 TInt DefineDefaultCaseStateChange( CSVPHoldContext& aContext, |
|
103 TSVPHoldStateIndex& aNextState ); |
|
104 |
|
105 /** |
|
106 * Checks acceptability of response in case of sendrecv -response |
|
107 */ |
|
108 TInt ResolveStateFromSendRecvIndex( |
|
109 KSVPHoldAttributeIndex aNeededAttribute, |
|
110 TSVPHoldStateIndex& aNextState ); |
|
111 |
|
112 private: |
|
113 |
|
114 // For testing |
|
115 SVP_UT_DEFS |
|
116 |
|
117 }; |
|
118 |
|
119 #endif // SVPHOLDOUTESTABLISHINGSTATE_H |
|
120 |